File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public void setTableList(String table) {
41
41
public static List <Double > convertStringToList (String input ) {
42
42
List <Double > result = new ArrayList <>();
43
43
// Split the input string on any number of whitespace characters
44
- String [] parts = input .split ("\s + " );
44
+ String [] parts = input .split (" " );
45
45
46
46
for (String part : parts ) {
47
47
result .add (Double .parseDouble (part ));
Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ public class Parser {
5
5
public static String isQueryAlreadyExists (Network net ,String queryVarName ,ArrayList <String > queryAndEvidencesWithOutcome ){
6
6
String ans = "-1" ;
7
7
for (int i = 0 ; i < net .getVarbyName (queryVarName ).getCpt ().length ; i ++) {
8
- ArrayList <String > row = new ArrayList <>(List .of (net .getVarbyName (queryVarName ).getCpt ()[i ]));
8
+ ArrayList <String > row = new ArrayList <>();
9
+ for (String element : net .getVarbyName (queryVarName ).getCpt ()[i ]){
10
+ row .add (element );
11
+ }
9
12
boolean first = row .subList (0 ,row .size ()-1 ).containsAll (queryAndEvidencesWithOutcome );
10
13
boolean second = queryAndEvidencesWithOutcome .containsAll (row .subList (0 ,row .size ()-1 ));
11
14
if (first &&second ) {
You can’t perform that action at this time.
0 commit comments