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. */
| 9943 | * Returns total number of unique edges in *out_wn. */ |
| 9944 | /* Find the index of a node ID in the nodes array, or -1. */ |
| 9945 | static 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 | |
| 9954 | static 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, |
no outgoing calls
no test coverage detected