| 1186 | } |
| 1187 | |
| 1188 | LabelID 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 | |
| 1208 | void Graph_RemoveLabel |
| 1209 | ( |