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

Function Graph_AddLabel

src/graph/graph.c:1188–1206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1186}
1187
1188LabelID Graph_AddLabel
1189(
1190 Graph *g
1191) {
1192 ASSERT(g != NULL);
1193
1194 RG_Matrix m;
1195 GrB_Info info;
1196 size_t n = Graph_RequiredMatrixDim(g);
1197 RG_Matrix_new(&m, GrB_BOOL, n, n);
1198
1199 array_append(g->labels, m);
1200
1201 // adding a new label, update the stats structures to support it
1202 GraphStatistics_IntroduceLabel(&g->stats);
1203
1204 LabelID l = Graph_LabelTypeCount(g) - 1;
1205 return l;
1206}
1207
1208void Graph_RemoveLabel
1209(

Callers 8

_InitGraphDataStructureFunction · 0.85
_InitGraphDataStructureFunction · 0.85
_InitGraphDataStructureFunction · 0.85
_InitGraphDataStructureFunction · 0.85
_InitGraphDataStructureFunction · 0.85
_InitGraphDataStructureFunction · 0.85
GraphContext_AddSchemaFunction · 0.85

Calls 4

Graph_RequiredMatrixDimFunction · 0.85
RG_Matrix_newFunction · 0.85
Graph_LabelTypeCountFunction · 0.85

Tested by 1