1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! The rim: capabilities in scope for this subfield but not yet built.
//!
//! These modules are intentionally empty. Each names a genuine gap identified in
//! ADR-0290 and its adversarial rim verification; they are documented here so the
//! surface is discoverable and so no one re-derives whether they belong. Nothing in
//! the rim is stubbed with an erroring API — a missing capability is absent, not a
//! runtime landmine.
/// Null-model / random-graph generators for significance testing.
///
/// Implemented (ADR-0290, TRUE algorithmic voids): configuration model (raw and
/// simple), double-edge-swap degree-preserving rewiring, Watts–Strogatz, LFR
/// benchmark. All generators accept `&mut impl Rng` for seeded reproducibility.
/// Structure-aware graph kernels.
///
/// Implemented (ADR-0290, phase 5): a graphlet kernel that reduces to the census
/// substrate's own class-count vectors (no reimplementation of graphlet counting),
/// a Weisfeiler–Lehman subtree kernel (label refinement, shared cross-graph
/// alphabet), a shortest-path kernel (BFS distance histograms), and a generic
/// Gram-matrix builder with optional cosine normalization. See
/// [`kernels::graphlet_kernel`], [`kernels::wl_kernel`],
/// [`kernels::shortest_path_kernel`], and [`kernels::gram_matrix`].
/// Motif significance: z-scores and empirical p-values against a null model.
///
/// Compares an observed census / motif count against an ensemble from
/// [`null_model`] to score over- and under-representation per target class
/// (ADR-0290). See [`significance::motif_significance`] and
/// [`significance::census_significance_profile`].
/// Neighborhood statistics — a sibling module *outside* the census substrate.
///
/// Implements link-prediction indices (common neighbors, Jaccard, Adamic-Adar,
/// resource allocation, preferential attachment), degree assortativity
/// (Newman/Pearson), rich-club coefficient φ(k), and local/average/global
/// clustering coefficients with triangle counting. (ADR-0290, cohesion re-homing;
/// live threat: if `franken_networkx` internals ship over petgraph types, the
/// cohesion case for re-homing these weakens.)
/// Scalable graphlet counting beyond naive per-subset canonicalization.
///
/// Implemented (ADR-0290, phases 6 + 8): an ORCA-style (Hočevar & Demšar 2014) fast
/// per-node orbit counter over **all 73 orbits** (graphlets of order `2..=5`),
/// clean-room from the published mathematics. Orders `2..=4` (orbits `0..=14`) come
/// from directly counting degree, per-edge triangle, and per-vertex K4 quantities and
/// solving a small per-vertex linear system; the 58 order-5 orbits (`15..=72`) come
/// from enumerating connected *4*-subset seeds and tallying each outside vertex's
/// induced attachment, decoded by a table built from the crate's own canonical/registry
/// machinery and closed by an exact per-orbit multiplicity division — so no connected
/// 5-subset is ever canonically labelled. Verified exact against the census substrate's
/// own `graphlet_degree_vectors` / `count`, node-for-node and count-for-count, across a
/// large battery (paths, cycles, stars, complete graphs, wheels, trees, complete
/// bipartite, Petersen, cube Q3) plus fuzzed random graphs and a proptest; on
/// larger/denser graphs it runs roughly two orders of magnitude faster than the exact
/// k=5 census. See [`scalable::fast_graphlet_degree_vectors`] and
/// [`scalable::fast_count`].
/// Directed motif analysis: triad census (k=3, all 16 types) and directed graphlet
/// census / orbits (weakly-connected, k in `2..=4`).
///
/// Implemented (ADR-0290, phase 7): the standard 16-type Holland–Leinhardt directed
/// triad census, and a directed generalization of the census/orbit substrate — ordered
/// (directed) canonical labelling, weak-connectivity-restricted enumeration, and a
/// directed-automorphism orbit registry — at orders `2..=4`. Verified exact against an
/// independent brute-force directed oracle (triad classification decorrelated from the
/// canonical-mask machinery; k=4 classes/orbits decorrelated from the ESU-driven
/// production path) on adversarial (cycles, DAGs, tournaments, bidirectional-edge
/// graphs) and fuzzed random digraphs, plus a proptest.
///
/// **Still open (not this phase):** directed k = 5 (orbits and classes) is not
/// implemented — see [`directed`]'s module docs for the exact boundary and the
/// undirected fallback.