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

Function Path_ContainsNode

src/datatypes/path/path.c:72–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72bool Path_ContainsNode(const Path *p, Node *n) {
73 uint32_t pathDepth = Path_NodeCount(p);
74 EntityID nId = ENTITY_GET_ID(n);
75 for(int i = 0; i < pathDepth; i++) {
76 if(ENTITY_GET_ID(p->nodes + i) == nId) return true;
77 }
78 return false;
79}
80
81Path *Path_Clone(const Path *p) {
82 Path *clone = rm_malloc(sizeof(Path));

Callers 4

SPpaths_nextFunction · 0.85
SSpaths_nextFunction · 0.85
_AllPathsCtx_NextPathFunction · 0.85
test_pathFunction · 0.85

Calls 1

Path_NodeCountFunction · 0.85

Tested by 1

test_pathFunction · 0.68