return true if node is labeled as 'l'
| 743 | |
| 744 | // return true if node is labeled as 'l' |
| 745 | bool Graph_IsNodeLabeled |
| 746 | ( |
| 747 | Graph *g, // graph to operate on |
| 748 | NodeID id, // node ID to inspect |
| 749 | LabelID l // label to check for |
| 750 | ) { |
| 751 | ASSERT(g != NULL); |
| 752 | ASSERT(id != INVALID_ENTITY_ID); |
| 753 | |
| 754 | bool x; |
| 755 | // consult with labels matrix |
| 756 | RG_Matrix nl = Graph_GetNodeLabelMatrix(g); |
| 757 | GrB_Info info = RG_Matrix_extractElement_BOOL(&x, nl, id, l); |
| 758 | ASSERT(info == GrB_SUCCESS || info == GrB_NO_VALUE); |
| 759 | return info == GrB_SUCCESS; |
| 760 | } |
| 761 | |
| 762 | // dissociates each label in 'lbls' from given node |
| 763 | void Graph_RemoveNodeLabels |
no test coverage detected