/** * Path Diversity Metrics * * Measures how diverse a set of paths are from each other. * Higher diversity indicates the paths explore different regions of the graph. */ /** * Compute Jaccard distance between two sets. * Jaccard distance = 1 - Jaccard similarity = 1 - |A ∩ B| / |A ∪ B| * * @param setA - First set * @param setB - Second set * @returns Distance in [0, 1] where 0 = identical, 1 = completely disjoint */ export declare const jaccardDistance: (setA: Set, setB: Set) => number; /** * Convert a path (array of node IDs) to a set for Jaccard computation. * * @param path - Array of node IDs forming a path * @returns Set of node IDs */ export declare const pathToNodeSet: (path: string[]) => Set; /** * Compute mean pairwise Jaccard distance between paths. * * This measures how different the paths are from each other on average. * Higher values indicate more diverse path exploration. * * @param paths - Array of paths, where each path is an array of node IDs * @returns Mean pairwise Jaccard distance in [0, 1] */ export declare const meanPairwiseJaccardDistance: (paths: string[][]) => number; /** * Compute path diversity using edge overlap. * * Converts paths to edge sets and computes Jaccard distance. * This is more sensitive than node-based diversity because * paths can share nodes but use different edges. * * @param paths - Array of paths, where each path is an array of node IDs * @returns Mean pairwise edge-based Jaccard distance in [0, 1] */ export declare const meanPairwiseEdgeJaccardDistance: (paths: string[][]) => number; /** * Comprehensive path diversity metrics. */ export interface PathDiversityMetrics { /** Number of distinct paths */ pathCount: number; /** Mean pairwise node-based Jaccard distance */ nodeJaccardDistance: number; /** Mean pairwise edge-based Jaccard distance */ edgeJaccardDistance: number; /** Total unique nodes across all paths */ uniqueNodeCount: number; /** Total unique edges across all paths */ uniqueEdgeCount: number; /** Average path length */ meanPathLength: number; /** Standard deviation of path lengths */ stdPathLength: number; } /** * Compute comprehensive path diversity metrics. * * @param paths - Array of paths, where each path is an array of node IDs * @returns Complete diversity metrics */ export declare const computePathDiversityMetrics: (paths: string[][]) => PathDiversityMetrics; /** * Compute hub coverage: fraction of paths traversing high-degree nodes. * * @param paths - Array of paths, where each path is an array of node IDs * @param hubNodes - Set of node IDs considered "hubs" (high-degree nodes) * @returns Fraction of paths that traverse at least one hub */ export declare const computeHubCoverage: (paths: string[][], hubNodes: Set) => number; /** * Identify hub nodes (top percentile by degree). * * @param nodeDegrees - Map from node ID to degree * @param percentile - Top percentile to consider as hubs (e.g., 0.1 for top 10%) * @returns Set of hub node IDs */ export declare const identifyHubNodes: (nodeDegrees: Map, percentile?: number) => Set; //# sourceMappingURL=path-diversity.d.ts.map