Skip to main content
Module

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

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

Interfaces

Utility interface that provides higher-kinded types for this collection.

interface GraphBase
implements VariantGraphBase<N, unknown, Tp>, GraphConnect<N, unknown, Tp>
Re-export
import { type GraphBase } from "https://deno.land/x/rimbu@0.14.0/graph/custom/index.ts";

Properties

readonly
linkMap: WithGraphValues<Tp, N, unknown>["linkMap"]

Returns the nested Map representation of the graph connections.

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

Returns the context associated to this collection instance.

Methods

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

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

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

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

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

Returns a builder object containing the entries of this collection.