graph-builder
Version:
A graph builder library for modeling abstract graph structures.
21 lines (20 loc) • 836 B
TypeScript
import { BaseGraph } from "./BaseGraph";
import { EndpointPair } from "./EndpointPair";
/**
* A class to facilitate the set returned by {@link Graph.edges}.
*/
export declare abstract class EndpointPairIterator<N> implements Iterator<EndpointPair<N>> {
private graph;
abstract next(value?: any): IteratorResult<EndpointPair<N>>;
private nodeIterator;
protected nextNode?: IteratorResult<N>;
protected successorIterator: Iterator<N>;
static of<N>(graph: BaseGraph<N>): EndpointPairIterator<N>;
constructor(graph: BaseGraph<N>);
protected readonly node: N;
/**
* Called after {@link successorIterator} is exhausted. Advances {@link node} to the next node
* and updates {@link successorIterator} to iterate through the successors of {@link node}.
*/
protected advance(): boolean;
}