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

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

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class ValuedGraphEmpty
implements ValuedGraphBase<N, V, Tp>
extends GraphEmptyBase
Re-export
import { ValuedGraphEmpty } from "https://deno.land/x/rimbu@1.0.0/graph/custom/index.ts";

Constructors

new
ValuedGraphEmpty(isDirected: boolean, context: TpG["context"])

Type Parameters

N
V
Tp extends ValuedGraphTypesContextImpl
optional
TpG extends WithGraphValues<Tp, N, V> = WithGraphValues<Tp, N, V>

Properties

readonly
linkMap: TpG["linkMap"]

Methods

addNode(node: N): TpG["nonEmpty"]
addNodes(nodes: StreamSource<N>): WithGraphValues<Tp, N, V>["nonEmpty"]
connect(
node1: N,
node2: N,
value: V,
): TpG["nonEmpty"]
connectAll(links: StreamSource<WithGraphValues<Tp, N, V>["link"]>): WithGraphValues<Tp, N, V>["nonEmpty"]
getConnectionsFrom(): TpG["linkConnections"]
getValue<UN, O>(
node1: RelatedTo<N, UN>,
node2: RelatedTo<N, UN>,
otherwise?: OptLazy<O>,
): O
mapValues<V2>(): WithGraphValues<Tp, N, V2>["normal"]
modifyAt(
node1: N,
node2: N,
options: { ifNew?: OptLazyOr<V, Token>; ifExists?: (value: V, remove: Token) => V | Token; },
): WithGraphValues<Tp, N, V>["normal"]
toBuilder(): TpG["builder"]
toJSON(): ToJSON<any[]>
toString(): string