Skip to main content
Module

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

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class ValuedGraphBuilder
Re-export
import { ValuedGraphBuilder } from "https://deno.land/x/rimbu@0.14.0/graph/custom/index.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; },
) => 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