import { Graph } from '../../../algorithms/graph/graph.js'; import { Edge, Node } from '../../../algorithms/types/graph.js'; /** * Structural feature vector extracted from a single graph. * * All features are deterministic given the same graph structure. */ export interface GraphFeatures { /** Total number of nodes */ nodeCount: number; /** Total number of edges */ edgeCount: number; /** Mean node degree */ meanDegree: number; /** Standard deviation of node degrees */ stdDegree: number; /** Maximum node degree */ maxDegree: number; /** Minimum node degree */ minDegree: number; /** Third standardised moment of the degree distribution */ degreeSkewness: number; /** Global clustering coefficient (fraction of closed triangles) */ clusteringCoefficient: number; /** Edge density: 2|E| / (|V|(|V|-1)) for undirected graphs */ density: number; /** Degree assortativity: Pearson correlation of degrees at edge endpoints */ degreeAssortativity: number; } /** Ordered list of feature names matching the feature vector layout. */ export declare const FEATURE_NAMES: ReadonlyArray; /** * Convert a GraphFeatures object to a numeric array in canonical order. * @param features */ export declare const featuresToVector: (features: GraphFeatures) => number[]; /** * Extract structural features from a graph. * * For clustering coefficient: for each node, counts edges between its * neighbours (triangles) divided by the number of possible triangles. * * For degree assortativity: computes Pearson correlation of degrees at * both endpoints of every edge. * * @param graph - The graph to extract features from * @returns A GraphFeatures object with all computed metrics */ export declare const extractFeatures: (graph: Graph) => GraphFeatures; //# sourceMappingURL=feature-extractor.d.ts.map