/** * Agentic QE v3 - Causal Graph Implementation * ADR-035: STDP-based spike timing correlation for root cause analysis * * Implements graph operations for causal analysis including: * - Reachability analysis * - Transitive closure (Floyd-Warshall) * - Path finding * - Strongly connected components (Tarjan's algorithm) */ import { CausalGraph, CausalEdge, TestEventType } from './types'; /** * Implementation of the CausalGraph interface */ export declare class CausalGraphImpl implements CausalGraph { readonly nodes: TestEventType[]; readonly edges: CausalEdge[]; private readonly edgeMap; private readonly reverseEdgeMap; constructor(nodes: TestEventType[], edges: CausalEdge[]); /** * Get all edges originating from a source node */ edgesFrom(source: TestEventType): CausalEdge[]; /** * Get all edges pointing to a target node */ edgesTo(target: TestEventType): CausalEdge[]; /** * Find all nodes reachable from a source via BFS */ reachableFrom(source: TestEventType): Set; /** * Find all nodes that can reach a target via reverse BFS */ reachableTo(target: TestEventType): Set; /** * Compute transitive closure using Floyd-Warshall algorithm * Returns a new graph with all transitive edges */ transitiveClosure(): CausalGraph; /** * Find all paths between two nodes using DFS with cycle detection * Returns paths sorted by total strength (strongest first) */ findPaths(source: TestEventType, target: TestEventType): TestEventType[][]; /** * Calculate total strength of a path (product of edge strengths) */ getPathStrength(path: TestEventType[]): number; /** * Find strongly connected components using Tarjan's algorithm * Returns groups of mutually reachable nodes (potential feedback loops) */ stronglyConnectedComponents(): TestEventType[][]; /** * Get nodes with highest out-degree (potential root causes) */ getHighOutDegreeNodes(limit?: number): Array<{ node: TestEventType; outDegree: number; }>; /** * Get nodes with highest in-degree (common effects) */ getHighInDegreeNodes(limit?: number): Array<{ node: TestEventType; inDegree: number; }>; /** * Find potential intervention points (nodes that, if addressed, would break many causal chains) * Uses betweenness-like centrality heuristic */ findInterventionPoints(target: TestEventType, limit?: number): TestEventType[]; /** * Get a subgraph containing only nodes that can reach a target */ getSubgraphTo(target: TestEventType): CausalGraph; /** * Get a subgraph containing only nodes reachable from a source */ getSubgraphFrom(source: TestEventType): CausalGraph; /** * Check if the graph contains cycles */ hasCycles(): boolean; /** * Get feedback loops (cycles) in the graph */ getFeedbackLoops(): TestEventType[][]; /** * Get graph statistics */ getStats(): { nodes: number; edges: number; density: number; avgOutDegree: number; avgInDegree: number; hasCycles: boolean; numComponents: number; }; } //# sourceMappingURL=causal-graph.d.ts.map