Skip to main content
Module

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

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

Properties

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

Returns the nested Map representation of the graph connections.

Methods

getValue<UN = N>(node1: RelatedTo<N, UN>, node2: RelatedTo<N, UN>): V | undefined

Returns the value of the connection between given node1 and node2

getValue<UN, O>(
node1: RelatedTo<N, UN>,
node2: RelatedTo<N, UN>,
otherwise: OptLazy<O>,
): V | O
mapValues<V2>(mapFun: (
value: V,
node1: N,
node2: N,
) => V2
): WithGraphValues<Tp, N, V2>["normal"]

Returns a graph with the same connections, but where the given mapFun function is applied to each connection value.