pddl-workspace
Version:
26 lines (25 loc) • 863 B
TypeScript
/**
* Simple directional graph.
*/
export declare class DirectionalGraph {
private verticesAndEdges;
/**
* Constructor, optionally copy-constructor.
* @param verticesAndEdges optional list of vertex-edges tuples - use as a copy constructor to re-hydrate from de-serialized object
*/
constructor(verticesAndEdges?: [string, string[]][]);
static fromGraph(graph: DirectionalGraph): DirectionalGraph;
/**
* Get all vertices.
*/
getVertices(): string[];
/**
* Get all edges.
*/
getEdges(): [string, string][];
addEdge(from: string, to?: string): DirectionalGraph;
getVerticesWithEdgesFrom(vertex: string): string[] | undefined;
getVerticesWithEdgesTo(vertex: string): string[];
getSubtreePointingTo(vertex: string): string[];
getSubtreePointingFrom(vertex: string): string[];
}