| 1225 | } |
| 1226 | |
| 1227 | RelationID 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 | |
| 1247 | void Graph_RemoveRelation |
| 1248 | ( |