Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface VariantValuedGraphBase.NonEmpty
implements [VariantGraphBase.NonEmpty]<N, V, Tp>, Omit<VariantValuedGraphBase<N, V, Tp>, keyof VariantGraphBase.NonEmpty<any, any, any>>, [Streamable.NonEmpty]<ValuedGraphElement<N, V>>
import { type VariantValuedGraphBase } from "https://deno.land/x/rimbu@1.1.0/graph/custom/index.ts";
const { NonEmpty } = VariantValuedGraphBase;

Properties

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

Returns the nested non-empty Map representation of the graph connections.

Methods

stream(): Stream.NonEmpty<ValuedGraphElement<N, V>>

Returns a non-empty Stream containing all entries of this collection as tuples of key and value.

mapValues<V2>(mapFun: (
value: V,
node1: N,
node2: N,
) => V2
): WithGraphValues<Tp, N, V2>["nonEmpty"]

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