@graphty/algorithms
Version:
Graph algorithms library for browser environments implemented in TypeScript
14 lines • 621 B
TypeScript
import { Graph } from "../../core/graph.js";
import type { NodeId } from "../../types/index.js";
export interface FloydWarshallResult {
distances: Map<NodeId, Map<NodeId, number>>;
predecessors: Map<NodeId, Map<NodeId, NodeId | null>>;
hasNegativeCycle: boolean;
}
export declare function floydWarshall(graph: Graph): FloydWarshallResult;
export declare function floydWarshallPath(graph: Graph, source: NodeId, target: NodeId): {
path: NodeId[];
distance: number;
} | null;
export declare function transitiveClosure(graph: Graph): Map<NodeId, Set<NodeId>>;
//# sourceMappingURL=floyd-warshall.d.ts.map