-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cpp
49 lines (41 loc) · 983 Bytes
/
test.cpp
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "lambda.hh"
// Test 1: Select all nodes with label equal to "davis"
NodeConditionT node_eql_to_davis(VertexId nodeId) {
NodeConditionT res;
res.node = nodeId;
res.cond = StrConditionT_EQ;
strcpy(res.operand, "davis");
return res;
}
NodeConditionT node_neq_to_berkeley(VertexId nodeId) {
NodeConditionT res;
res.node = nodeId;
res.cond = StrConditionT_NEQ;
strcpy(res.operand, "berkeley");
return res;
}
EdgeConditionT edge_gt_n(VertexId src, VertexId dest, int n) {
EdgeConditionT res;
res.src = src;
res.dest = dest;
res.cond = IntConditionT_GT;
res.operand = n;
return res;
}
EdgeLabelT edgeLabel(VertexId src, VertexId dest, int label) {
EdgeLabelT res;
res.src = src;
res.dest = dest;
res.label = label;
return res;
}
NodeConditionT dummyN() {
NodeConditionT res;
res.cond = StrConditionT_WILDCARD;
return res;
}
EdgeConditionT dummyE() {
EdgeConditionT res;
res.cond = IntConditionT_WILDCARD;
return res;
}