import { Option } from "joshkaposh-option"; import { IntoEdges, IntoNodeIdentifiers, NodeCount, Visitable } from "../visit"; export interface Paths { distances: EdgeWeight[]; predecessors: Option[]; } export default function bellman_ford(graph: G, source: NodeId) { const [distances, predecessors] = bellman_ford_initialize_relax(graph, source); } export function find_negative_cycle, NodeId>(graph: G, source: NodeId) { } function bellman_ford_initialize_relax(g: G, source: NodeId) { const predecessor = Array.from({ length: g.node_bound() }, () => null) const distance = Array.from({ length: g.node_bound() }, () => Infinity) return [] as any[] }