Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/graph/custom/valued/implementation/builder.ts>ValuedGraphBuilder

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class ValuedGraphBuilder
import { ValuedGraphBuilder } from "https://deno.land/x/rimbu@1.2.0/graph/custom/valued/implementation/builder.ts";

Constructors

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

Properties

optional
_linkMap: TpG["linkMapBuilder"]
_lock: number
addGraphElement: (element: ValuedGraphElement<N, V>) => boolean
addGraphElements: (elements: StreamSource<ValuedGraphElement<N, V>>) => boolean
addNode: (node: N) => boolean
addNodeInternal: (node: N) => boolean
addNodes: (nodes: StreamSource<N>) => boolean
build: () => TpG["normal"]
buildMapValues: <V2>(mapFun: (
value: V,
node1: N,
node2: N,
) => V2
) => WithGraphValues<Tp, N, V2>["normal"]
connect: (
node1: N,
node2: N,
value: V,
) => boolean
connectAll: (connections: StreamSource<TpG["link"]>) => boolean
connectInternal: (
node1: N,
node2: N,
value: V,
) => 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
getValue: <UN, O>(
node1: RelatedTo<N, UN>,
node2: RelatedTo<N, UN>,
otherwise?: OptLazy<O>,
) => V | O
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"]
modifyAt: (
node1: N,
node2: N,
options: { ifNew?: OptLazyOr<V, Token>; ifExists?: ((value: V, remove: Token) => V | Token) | V; },
) => boolean
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