Skip to main content
Module

x/rimbu/graph/custom/index.ts>GraphBuilder

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class GraphBuilder
Re-export
import { GraphBuilder } from "https://deno.land/x/rimbu@0.14.0/graph/custom/index.ts";

Constructors

new
GraphBuilder(
isDirected: boolean,
context: TpG["context"],
source?: TpG["nonEmpty"],
)

Type Parameters

N
optional
TpG extends WithGraphValues<Tp, N, any> = WithGraphValues<Tp, N, any>

Properties

optional
_linkMap: TpG["linkMapBuilder"]
_lock: number
addGraphElement: (element: GraphElement<N>) => boolean
addGraphElements: (elements: StreamSource<GraphElement<N>>) => boolean
addNode: (node: N) => boolean
addNodeInternal: (node: N) => boolean
addNodes: (nodes: StreamSource<N>) => boolean
build: () => TpG["normal"]
connect: (node1: N, node2: N) => boolean
connectAll: (connections: StreamSource<TpG["link"]>) => boolean
connectIfNodesExist: (node1: N, node2: N) => boolean
connectInternal: (node1: N, node2: N) => boolean
connectionSize: number
disconnect: <UN>(node1: RelatedTo<N, UN>, node2: RelatedTo<N, UN>) => boolean
disconnectAll: <UN>(connections: StreamSource<Link<RelatedTo<N, UN>>>) => boolean
disconnectInternal: <UN>(node1: RelatedTo<N, UN>, node2: RelatedTo<N, UN>) => boolean
hasConnection: <UN>(node1: RelatedTo<N, UN>, node2: RelatedTo<N, UN>) => boolean
hasNode: <UN>(node: RelatedTo<N, UN>) => boolean
readonly
isEmpty: boolean
readonly
linkMap: TpG["linkMapBuilder"]
readonly
nodeSize: number
removeNode: <UN>(node: RelatedTo<N, UN>) => boolean
removeNodeInternal: <UN>(node: RelatedTo<N, UN>) => boolean
removeNodes: <UN>(nodes: StreamSource<RelatedTo<N, UN>>) => boolean