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

Function louvain_node_index

src/store/store.c:9945–9952  ·  view source on GitHub ↗

Build deduplicated, normalized edge weight arrays from raw edges. * Returns total number of unique edges in *out_wn. */ Find the index of a node ID in the nodes array, or -1. */

Source from the content-addressed store, hash-verified

9943 * Returns total number of unique edges in *out_wn. */
9944/* Find the index of a node ID in the nodes array, or -1. */
9945static int louvain_node_index(const int64_t *nodes, int n, int64_t id) {
9946 for (int i = 0; i < n; i++) {
9947 if (nodes[i] == id) {
9948 return i;
9949 }
9950 }
9951 return CBM_NOT_FOUND;
9952}
9953
9954static void louvain_build_weights(const int64_t *nodes, int n, const cbm_louvain_edge_t *edges,
9955 int edge_count, int **out_wsi, int **out_wdi, double **out_ww,

Callers 1

louvain_build_weightsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected