/** * Corpus graph construction + analytics algorithms (#1501). * * NetworkX-equivalent ports (no graph library): co-author + citation graphs from * the #1497 parser, plus h-index, CD-index (disruption), PageRank, betweenness, * eigenvector, and clustering. Used by profile-metrics / profile-communities. * * @source historical: profiles/build_graphs.py, profiles/compute_metrics.py * References: Hirsch 2005 (h-index); Wu-Wang-Evans 2019 (CD-index); * Brandes 2001 (betweenness); Newman 2003 (centrality). */ import type { RefRecord } from '../corpus-views/ref-parser.js'; /** Directed citation graph: node → {out: refs it cites (in corpus), in: refs that cite it}. */ export interface CitationGraph { nodes: string[]; out: Map>; in: Map>; } /** Build the citation graph from corpus outgoing edges (in-corpus targets only). */ export declare function buildCitationGraph(records: RefRecord[]): CitationGraph; /** Undirected co-author graph: person → (person → shared-paper weight). */ export declare function buildCoauthorGraph(records: RefRecord[]): Map>; /** h-index: max k such that ≥k papers have ≥k in-corpus citations (Hirsch 2005). */ export declare function hIndex(citationCounts: number[]): number; /** * CD-index (disruption): (F − B) / (F + B + N). +1 fully disruptive, −1 consolidating. * Null when < 3 citers (low confidence). Wu-Wang-Evans 2019. */ export declare function cdIndex(ref: string, g: CitationGraph): number | null; /** PageRank over the directed citation graph (α=0.85), with dangling redistribution. */ export declare function pageRank(g: CitationGraph, alpha?: number, maxIter?: number, tol?: number): Map; /** Brandes betweenness centrality on an undirected unweighted graph, normalized. */ export declare function betweenness(g: Map>): Map; /** Eigenvector centrality via power iteration on the undirected (weighted) graph. */ export declare function eigenvector(g: Map>, maxIter?: number, tol?: number): Map; /** Local clustering coefficient per node on the undirected graph. */ export declare function clustering(g: Map>): Map; //# sourceMappingURL=corpus-graph.d.ts.map