UNPKG

graph-builder

Version:

A graph builder library for modeling abstract graph structures.

23 lines (22 loc) 1.1 kB
import { AbstractBaseGraph } from "./AbstractBaseGraph"; import { ValueGraph } from "./ValueGraph"; import { Graph } from "./Graph"; import { EndpointPair } from "./EndpointPair"; /** * This class provides a skeletal implementation of {@link ValueGraph}. It is recommended to extend * this class rather than implement {@link ValueGraph} directly. * * <p>The methods implemented in this class should not be overridden unless the subclass admits a * more efficient implementation. */ export declare abstract class AbstractValueGraph<N, V> extends AbstractBaseGraph<N> implements ValueGraph<N, V> { asGraph(): Graph<N>; edgeValue(nodeU: N, nodeV: N): V | undefined; edgeValueConnectingEndpoints(endpoints: EndpointPair<N>): V | undefined; abstract edgeValueOrDefault<R>(nodeU: N, nodeV: N, defaultValue: R): V | R; abstract edgeValueConnectingEndpointsOrDefault<R>(endpoints: EndpointPair<N>, defaultValue: R): V | R; equals(obj: ValueGraph<N, V>): boolean; /** Returns a string representation of this graph. */ toString(): string; private static edgeValueMap; }