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

Function Graph_AddRelationType

src/graph/graph.c:1227–1245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1225}
1226
1227RelationID Graph_AddRelationType
1228(
1229 Graph *g
1230) {
1231 ASSERT(g);
1232
1233 RG_Matrix m;
1234 size_t n = Graph_RequiredMatrixDim(g);
1235
1236 RG_Matrix_new(&m, GrB_UINT64, n, n);
1237
1238 array_append(g->relations, m);
1239
1240 // adding a new relationship type, update the stats structures to support it
1241 GraphStatistics_IntroduceRelationship(&g->stats);
1242
1243 RelationID relationID = Graph_RelationTypeCount(g) - 1;
1244 return relationID;
1245}
1246
1247void Graph_RemoveRelation
1248(

Callers 12

_InitGraphDataStructureFunction · 0.85
_InitGraphDataStructureFunction · 0.85
_InitGraphDataStructureFunction · 0.85
_InitGraphDataStructureFunction · 0.85
_InitGraphDataStructureFunction · 0.85
_InitGraphDataStructureFunction · 0.85
GraphContext_AddSchemaFunction · 0.85
BuildGraphFunction · 0.85
test_removeNodesFunction · 0.85
test_getEdgeFunction · 0.85

Calls 4

Graph_RequiredMatrixDimFunction · 0.85
RG_Matrix_newFunction · 0.85
Graph_RelationTypeCountFunction · 0.85

Tested by 5

BuildGraphFunction · 0.68
test_removeNodesFunction · 0.68
test_getEdgeFunction · 0.68