- hasConnection(graph, a, b): boolean
Parameters
- graph: Readonly<{
edges: readonly Readonly<{
a: string;
b: string;
weight?: number;
}>[];
vertices: IMapImmutable<string, Readonly<{
id: string;
}>>;
}> - a: string | Readonly<{
id: string;
}> - b: string | Readonly<{
id: string;
}>
Returns boolean
true if edge exists
Returns true/false if there is a connection between
a
andb
ingraph
. Use getConnection if you want to the edge.