Skip to main content
Module

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

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

Properties

readonly
context: WithGraphValues<Tp, N, V>["context"]

Returns the context associated to this collection instance.

Methods

getConnectionsFrom<UN = N>(node1: RelatedTo<N, UN>): WithGraphValues<Tp, N, V>["linkConnections"]

Returns a Map containing the nodes and connection values reachable from given node1 node as keys, and their corresponding values.

connect(
node1: N,
node2: N,
value: V,
): WithGraphValues<Tp, N, V>["nonEmpty"]

Returns the graph where given nodes node1 and node2 are connected with the given value.

modifyAt(
node1: N,
node2: N,
options: { ifNew?: OptLazyOr<V, Token>; ifExists?: (value: V, remove: Token) => V | Token; },
): WithGraphValues<Tp, N, V>["normal"]

Returns the graph with the connection between given node1 and node2 modified according to given options.

toBuilder(): WithGraphValues<Tp, N, V>["builder"]

Returns a builder object containing the entries of this collection.