MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / gmt_traverse_eq

Function gmt_traverse_eq

tests/test_graph_mem.c:155–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155static bool gmt_traverse_eq(const cbm_traverse_result_t *a, const cbm_traverse_result_t *b) {
156 if (!gmt_node_eq(&a->root, &b->root) || a->visited_count != b->visited_count ||
157 a->edge_count != b->edge_count || a->truncated != b->truncated ||
158 a->edges_truncated != b->edges_truncated) {
159 return false;
160 }
161 for (int i = 0; i < a->visited_count; i++) {
162 if (a->visited[i].hop != b->visited[i].hop ||
163 !gmt_node_eq(&a->visited[i].node, &b->visited[i].node)) {
164 return false;
165 }
166 }
167 for (int i = 0; i < a->edge_count; i++) {
168 if (!gmt_edge_eq(&a->edges[i], &b->edges[i])) {
169 return false;
170 }
171 }
172 return true;
173}
174
175typedef struct {
176 const char *types[3];

Callers 2

gmt_bfs_sameFunction · 0.85
gmt_thread_mainFunction · 0.85

Calls 2

gmt_node_eqFunction · 0.85
gmt_edge_eqFunction · 0.85

Tested by

no test coverage detected