-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathGraphY.java
More file actions
31 lines (24 loc) · 814 Bytes
/
GraphY.java
File metadata and controls
31 lines (24 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package graph;
import edu.illinois.cs.cogcomp.sl.core.IStructure;
import java.util.Arrays;
import java.util.List;
public class GraphY implements IStructure {
// Labels only for relevant quants, and for question
// Order : Vertex label for each quantity, followed by vertex label of question,
// next, edge labels for all edges (following order of for loop on the above
// vertex order)
public List<String> labels;
public GraphY(List<String> labels) {
this.labels = labels;
}
public static float getLoss(GraphY y1, GraphY y2) {
if((""+ Arrays.asList(y1.labels)).equals((""+ Arrays.asList(y2.labels)))) {
return 0.0f;
}
return 1.0f;
}
@Override
public String toString() {
return ""+Arrays.asList(labels);
}
}