import type { Stream, Streamable } from '@rimbu/stream'; import { SortedMap } from '@rimbu/sorted'; import type { EdgeValuedGrapSortedCreators, ValuedGraphElement } from '@rimbu/graph/custom'; import { type EdgeValuedGraphBase } from '@rimbu/graph/custom'; /** * A type-invariant immutable valued edge (undirected) graph. * The nodes are internally maintained using SortedMaps * See the [Graph documentation](https://rimbu.org/docs/collections/graph) and the [EdgeValuedGraphSorted API documentation](https://rimbu.org/api/rimbu/graph/EdgeValuedGraphSorted/interface) * @typeparam N - the node type * @typeparam V - the connection value type * @example * ```ts * const g1 = EdgeValuedGraphSorted.empty() * const g2 = EdgeValuedGraphSorted.of([1], [2, 3, 'a'], [2, 4, 'b']) * ``` */ export interface EdgeValuedGraphSorted extends EdgeValuedGraphBase { } export declare namespace EdgeValuedGraphSorted { /** * A non-empty type-invariant immutable valued edge (undirected) graph. * The nodes are internally maintained using SortedMaps * See the [Graph documentation](https://rimbu.org/docs/collections/graph) and the [EdgeValuedGraphSorted API documentation](https://rimbu.org/api/rimbu/graph/EdgeValuedGraphSorted/interface) * @typeparam N - the node type * @typeparam V - the connection value type */ interface NonEmpty extends EdgeValuedGraphBase.NonEmpty, Omit, keyof EdgeValuedGraphBase.NonEmpty>, Streamable.NonEmpty> { /** * Returns a non-empty `Stream` containing all graph elements of this collection as single tuples for isolated nodes * and 3-valued tuples containing the source node, target node, and connection value for connections. * @example * ```ts * EdgeValuedGraphHashed.of([1, 2, 'a'], [2, 3, 'b']).stream().toArray() * // => [[1, 2, 'a'], [2, 3, 'b']] * ``` */ stream(): Stream.NonEmpty>; } /** * A mutable `EdgeValuedGraphSorted` builder used to efficiently create new immutable instances. * See the [Graph documentation](https://rimbu.org/docs/collections/graph) and the [EdgeValuedGraphSorted.Builder API documentation](https://rimbu.org/api/rimbu/graph/EdgeValuedGraphSorted/Builder/interface) * @typeparam N - the node type * @typeparam V - the connection value type */ interface Builder extends EdgeValuedGraphBase.Builder { } /** * The EdgeValuedGraphSorted's Context instance that serves as a factory for all related immutable instances and builders. * @typeparam UN - the upper type limit for node types for which this context can create instances */ interface Context extends EdgeValuedGraphBase.Context { readonly typeTag: 'EdgeValuedGraphSorted'; } /** * Utility interface that provides higher-kinded types for this collection. */ interface Types extends EdgeValuedGraphBase.Types { readonly normal: EdgeValuedGraphSorted; readonly nonEmpty: EdgeValuedGraphSorted.NonEmpty; readonly context: EdgeValuedGraphSorted.Context; readonly builder: EdgeValuedGraphSorted.Builder; readonly linkMap: SortedMap>; readonly linkMapNonEmpty: SortedMap.NonEmpty>; readonly linkMapContext: SortedMap.Context; readonly linkConnectionsContext: SortedMap.Context; readonly linkMapBuilder: SortedMap.Builder>; readonly linkConnectionsBuilder: SortedMap.Builder; readonly linkConnections: SortedMap; } } export declare const EdgeValuedGraphSorted: EdgeValuedGrapSortedCreators;