++
добавление учета пробелов в сравнение
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Arrays;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.Index;
|
||||
import Common.Utils.IntegerPairJson;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.ProjectData.DBArray.DBArray;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Templates.TemplateDimension;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Templates.TemplateDimensionState;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Templates.TemplateLink;
|
||||
import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion;
|
||||
import _VisualDVM.ProjectData.SapforData.Regions.UI.ArrayAlignmentBar;
|
||||
import com.google.gson.annotations.Expose;
|
||||
@@ -21,6 +18,9 @@ import java.util.List;
|
||||
import java.util.Vector;
|
||||
import java.util.stream.Collectors;
|
||||
public class ProjectArray extends DBObject {
|
||||
//--
|
||||
//----------------------------------------------------------------------
|
||||
public static final String[] alignNames = {"i", "j", "k", "l", "m", "n", "q", "r", "s", "t", "u", "w", "x", "y", "z"};
|
||||
@Expose
|
||||
public long id;
|
||||
@Expose
|
||||
@@ -34,10 +34,6 @@ public class ProjectArray extends DBObject {
|
||||
@Expose
|
||||
public int typeSize;
|
||||
@Expose
|
||||
int state;
|
||||
@Expose
|
||||
int location;
|
||||
@Expose
|
||||
public String locName;
|
||||
@Expose
|
||||
public int isTemplFlag;
|
||||
@@ -45,17 +41,6 @@ public class ProjectArray extends DBObject {
|
||||
public int isLoopArrayFlag;
|
||||
@Expose
|
||||
public Vector<ArrayDecl> declPlaces = new Vector<>();
|
||||
@Expose
|
||||
List<Integer> deprecateToDist = new Vector<>();
|
||||
@Expose
|
||||
List<Integer> mappedDims = new Vector<>();
|
||||
@Expose
|
||||
Vector<IntegerPairJson> sizes = new Vector<>();
|
||||
@Expose
|
||||
Vector<String> regions = new Vector<>();
|
||||
//--
|
||||
//----------------------------------------------------------------------
|
||||
public static final String[] alignNames = {"i", "j", "k", "l", "m", "n", "q", "r", "s", "t", "u", "w", "x", "y", "z"};
|
||||
public String UniqKey;
|
||||
public BigInteger address;
|
||||
//только для шаблонов. для ФИЛЬТРА управления распределением измерений.
|
||||
@@ -73,6 +58,33 @@ public class ProjectArray extends DBObject {
|
||||
public LinkedHashMap<Integer, Dimension> ac_new;
|
||||
//https://stackoverflow.com/questions/4941372/how-to-insert-image-into-jtable-cell
|
||||
public ArrayAlignmentBar bar = null;
|
||||
@Expose
|
||||
int state;
|
||||
@Expose
|
||||
int location;
|
||||
@Expose
|
||||
List<Integer> deprecateToDist = new Vector<>();
|
||||
@Expose
|
||||
List<Integer> mappedDims = new Vector<>();
|
||||
@Expose
|
||||
Vector<IntegerPairJson> sizes = new Vector<>();
|
||||
@Expose
|
||||
Vector<String> regions = new Vector<>();
|
||||
public static String fill_binary(int d, String binary) {
|
||||
int delta = Math.abs(binary.length() - d);
|
||||
String res = binary;
|
||||
for (int i = 0; i < delta; ++i) {
|
||||
res = ("0" + res);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
//длина должна быть равной, ищем есть ли совпадающие позиции с единицами
|
||||
public static boolean mask(String banned, String variant) {
|
||||
for (int i = 0; i < variant.length(); ++i)
|
||||
if ((variant.toCharArray()[i] == '1') && (banned.toCharArray()[i] == '1')) //попался, масконосец!
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
//------
|
||||
public void print() {
|
||||
Vector<String> res = new Vector<>();
|
||||
@@ -119,21 +131,6 @@ public class ProjectArray extends DBObject {
|
||||
ac_new = new LinkedHashMap<>();
|
||||
//--FileForm
|
||||
}
|
||||
public static String fill_binary(int d, String binary) {
|
||||
int delta = Math.abs(binary.length() - d);
|
||||
String res = binary;
|
||||
for (int i = 0; i < delta; ++i) {
|
||||
res = ("0" + res);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
//длина должна быть равной, ищем есть ли совпадающие позиции с единицами
|
||||
public static boolean mask(String banned, String variant) {
|
||||
for (int i = 0; i < variant.length(); ++i)
|
||||
if ((variant.toCharArray()[i] == '1') && (banned.toCharArray()[i] == '1')) //попался, масконосец!
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public String printLinks() {
|
||||
Vector<String> res = links.keySet().stream().map(Object::toString).collect(Collectors.toCollection(Vector::new));
|
||||
return String.join(" ", res);
|
||||
|
||||
Reference in New Issue
Block a user