import type { Stream, Streamable } from '@rimbu/stream'; import type { EdgeGraphCreators, GraphElement } from '@rimbu/graph/custom'; import { type EdgeGraphBase } from '@rimbu/graph/custom'; /** * A type-invariant immutable edge (undirected) graph. * See the [Graph documentation](https://rimbu.org/docs/collections/graph) and the [EdgeGraph API documentation](https://rimbu.org/api/rimbu/graph/EdgeGraph/interface) * @typeparam N - the node type */ export interface EdgeGraph extends EdgeGraphBase { } export declare namespace EdgeGraph { /** * A non-empty type-invariant immutable edge (undirected) graph. * @typeparam N - the node type */ interface NonEmpty extends EdgeGraphBase.NonEmpty, Omit, keyof EdgeGraphBase.NonEmpty>, Streamable.NonEmpty> { /** * Returns a non-empty `Stream` containing all graph elements of this collection as single tuples for isolated nodes * and 2-valued tuples of nodes for connections. * See the [Graph documentation](https://rimbu.org/docs/collections/graph) and the [EdgeGraph API documentation](https://rimbu.org/api/rimbu/graph/EdgeGraph/interface) * @example * ```ts * EdgeGraphHashed.of([1], [2, 3]).stream().toArray() // => [[1], [2, 3]] * ``` */ stream(): Stream.NonEmpty>; } /** * A mutable `EdgeGraph` builder used to efficiently create new immutable instances. * See the [Graph documentation](https://rimbu.org/docs/collections/graph) and the [EdgeGraph.Builder API documentation](https://rimbu.org/api/rimbu/graph/EdgeGraph/Builder/interface) * @typeparam N - the node type */ interface Builder extends EdgeGraphBase.Builder { } /** * The EdgeGraph'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 EdgeGraphBase.Context { } /** * Utility interface that provides higher-kinded types for this collection. */ interface Types extends EdgeGraphBase.Types { readonly normal: EdgeGraph; readonly nonEmpty: EdgeGraph.NonEmpty; readonly context: EdgeGraph.Context; readonly builder: EdgeGraph.Builder; } } export declare const EdgeGraph: EdgeGraphCreators;