import type { Stream, Streamable } from '../../../../../stream/mod.ts';
import { SortedMap } from '../../../../../sorted/mod.ts';
import type { ArrowValuedGraphSortedCreators, ValuedGraphElement,} from '../../../../../graph/custom/index.ts';
import { ArrowValuedGraphBase, ValuedGraphContext } from '../../../../../graph/custom/index.ts';
export interface ArrowValuedGraphSorted<N, V> extends ArrowValuedGraphBase<N, V, ArrowValuedGraphSorted.Types> {}
export namespace ArrowValuedGraphSorted { export interface NonEmpty<N, V> extends ArrowValuedGraphBase.NonEmpty<N, V, ArrowValuedGraphSorted.Types>, Omit< ArrowValuedGraphSorted<N, V>, keyof ArrowValuedGraphBase.NonEmpty<any, any, any> >, Streamable.NonEmpty<ValuedGraphElement<N, V>> { stream(): Stream.NonEmpty<ValuedGraphElement<N, V>>; }
export interface Builder<N, V> extends ArrowValuedGraphBase.Builder<N, V, ArrowValuedGraphSorted.Types> {}
export interface Context<UN> extends ArrowValuedGraphBase.Context<UN, ArrowValuedGraphSorted.Types> { readonly typeTag: 'ArrowValuedGraphSorted'; }
export interface Types extends ArrowValuedGraphBase.Types { readonly normal: ArrowValuedGraphSorted<this['_N'], this['_V']>; readonly nonEmpty: ArrowValuedGraphSorted.NonEmpty<this['_N'], this['_V']>; readonly context: ArrowValuedGraphSorted.Context<this['_N']>; readonly builder: ArrowValuedGraphSorted.Builder<this['_N'], this['_V']>; readonly linkMap: SortedMap<this['_N'], SortedMap<this['_N'], this['_V']>>; readonly linkMapNonEmpty: SortedMap.NonEmpty< this['_N'], SortedMap<this['_N'], this['_V']> >; readonly linkMapContext: SortedMap.Context<this['_N']>; readonly linkConnectionsContext: SortedMap.Context<this['_N']>; readonly linkMapBuilder: SortedMap.Builder< this['_N'], SortedMap.Builder<this['_N'], this['_V']> >; readonly linkConnectionsBuilder: SortedMap.Builder<this['_N'], this['_V']>; readonly linkConnections: SortedMap<this['_N'], this['_V']>; }}
function createContext<UN>(options?: { linkMapContext?: SortedMap.Context<UN>; linkConnectionsContext?: SortedMap.Context<UN>;}): ArrowValuedGraphSorted.Context<UN> { return Object.freeze( new ValuedGraphContext<UN, 'ArrowValuedGraphSorted', any>( true, 'ArrowValuedGraphSorted', options?.linkMapContext ?? SortedMap.defaultContext(), options?.linkConnectionsContext ?? SortedMap.defaultContext() ) );}
const _defaultContext: ArrowValuedGraphSorted.Context<any> = createContext();
export const ArrowValuedGraphSorted: ArrowValuedGraphSortedCreators = Object.freeze({ ..._defaultContext, createContext, defaultContext<UN>(): ArrowValuedGraphSorted.Context<UN> { return _defaultContext; }, });