MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / DisjointGraph

Function DisjointGraph

tests/unit/test_query_graph.c:122–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122QueryGraph *DisjointGraph() {
123 // create a disjoint graph
124 // (A)->(B) (C)
125 size_t node_cap = 3;
126 size_t edge_cap = 1;
127
128 // create nodes
129 const char *relation = "R";
130
131 QGNode *A = QGNode_New("A");
132 QGNode *B = QGNode_New("B");
133 QGNode *C = QGNode_New("C");
134
135 QGEdge *AB = QGEdge_New(relation, "AB");
136
137 QueryGraph *g = QueryGraph_New(node_cap, edge_cap);
138 QueryGraph_AddNode(g, A);
139 QueryGraph_AddNode(g, B);
140 QueryGraph_AddNode(g, C);
141
142 QueryGraph_ConnectNodes(g, A, B, AB);
143
144 return g;
145}
146
147QueryGraph *SingleNodeCycleGraph() {
148 // create a disjoint graph

Callers 1

Calls 5

QGNode_NewFunction · 0.85
QGEdge_NewFunction · 0.85
QueryGraph_NewFunction · 0.85
QueryGraph_AddNodeFunction · 0.85
QueryGraph_ConnectNodesFunction · 0.85

Tested by

no test coverage detected