No description
Both functions count connected pairs among a node's neighbors: cc = 2*triangles / (deg*(deg-1)) density = inter_edges / (n*(n-1)/2) = 2*inter_edges / (n*(n-1)) Since inter_edges == triangles and n == deg, density == cc. schema_fit was (density + cc) / 2.0 = (cc + cc) / 2.0 = cc. Verified empirically: assert!((density - cc).abs() < 1e-6) passed on all 2401 nodes before this change. Keep schema_fit as a semantic alias — CC is a graph metric, schema fit is a cognitive one — but eliminate the redundant O(n²) pairwise computation that was running for every node. |
||
|---|---|---|
| prompts | ||
| schema | ||
| scripts | ||
| src | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||