no message
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package TestingSystem.DVM.Configuration;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Database.rDBObject;
|
||||
public class Configuration extends rDBObject {
|
||||
import Common.Database.riDBObject;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.RunConfiguration.RunConfiguration;
|
||||
|
||||
import java.util.Vector;
|
||||
public class Configuration extends riDBObject {
|
||||
//компиляция.
|
||||
public String flags = "\n";
|
||||
public int c_maxtime = 40;
|
||||
@@ -33,4 +37,67 @@ public class Configuration extends rDBObject {
|
||||
this.SynchronizeFields(src);
|
||||
}
|
||||
public Configuration(){}
|
||||
//--
|
||||
public Vector<String> getFlags() {
|
||||
return Utils.unpackStrings(flags);
|
||||
}
|
||||
public Vector<String> getEnvironments() {
|
||||
return Utils.unpackStrings(environments);
|
||||
}
|
||||
public Vector<String> getParams() {
|
||||
return Utils.unpackStrings(usr_par);
|
||||
}
|
||||
public Vector<String> getMatrixes(int testDim) {
|
||||
Vector<Vector<Integer>> res_ = new Vector<>();
|
||||
Vector<String> res = new Vector<>();
|
||||
if ((max_proc_count==0) || (min_dim_proc_count == 0 && max_dim_proc_count == 0)) {
|
||||
res.add("");
|
||||
} else {
|
||||
if (testDim > 0) {
|
||||
Vector<String> min_border = new Vector<>();
|
||||
Vector<String> max_border = new Vector<>();
|
||||
for (int i = 1; i <= testDim; ++i) {
|
||||
min_border.add(String.valueOf(min_dim_proc_count));
|
||||
max_border.add(String.valueOf(max_dim_proc_count));
|
||||
}
|
||||
Vector<Integer> from = RunConfiguration.getBounds(String.join(" ", min_border));
|
||||
Vector<Integer> to = RunConfiguration.getBounds(String.join(" ", max_border));
|
||||
if (from.size() != to.size()) {
|
||||
System.out.println("Верхняя и нижняя границы матриц конфигурации имеют разные размерности");
|
||||
return res;
|
||||
}
|
||||
if (from.size() != testDim) {
|
||||
System.out.println("Границы матриц не совпадают с размерностью конфигурации");
|
||||
return res;
|
||||
}
|
||||
//1 стадия. заполнение.
|
||||
for (int j = from.get(0); j <= to.get(0); ++j) {
|
||||
Vector<Integer> m = new Vector<>();
|
||||
res_.add(m);
|
||||
m.add(j);
|
||||
}
|
||||
//---
|
||||
if (testDim > 1) RunConfiguration.gen_rec(from, to, res_, 1, testDim, cube == 1);
|
||||
for (Vector<Integer> m : res_) {
|
||||
Vector<String> ms = new Vector<>();
|
||||
int proc = 1;
|
||||
for (int i : m) {
|
||||
ms.add(String.valueOf(i));
|
||||
proc *= i;
|
||||
}
|
||||
if (proc <= max_proc_count)
|
||||
res.add(String.join(" ", ms));
|
||||
}
|
||||
} else res.add("");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
public String getParamsText() {
|
||||
Vector<String> params = getParams();
|
||||
if ((params.size() == 1) && params.get(0).isEmpty()) return "";
|
||||
return String.join("\n", params);
|
||||
}
|
||||
public String getSummary() {
|
||||
return description;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user