import type { HashMap } from '@rimbu/hashed'; import type { SortedMap } from '@rimbu/sorted'; import type { RMap } from '@rimbu/collection-types'; import type { EdgeValuedGraph, EdgeValuedGraphHashed, EdgeValuedGraphSorted, } from '@rimbu/graph'; import type { ValuedGraphBase } from '@rimbu/graph/custom'; export interface EdgeValuedGraphCreators { /** * Returns a new EdgeValuedGraph context instance based on the given `options`. * @typeparam UN - the upper node type for which the context can create instances * @param options - an object containing the following properties:
* - linkMapContext: the map context to use to maintain link maps
* - linkConnectionsContext: the map context to use to maintain link connection maps */ createContext(options: { linkMapContext: RMap.Context; linkConnectionsContext: RMap.Context; }): EdgeValuedGraph.Context; } export interface EdgeValuedGraphHashedCreators extends ValuedGraphBase.Factory { /** * Returns a new EdgeValuedGraphHashed context instance based on the given `options`. * @typeparam UN - the upper node type for which the context can create instances * @param options - (optional) an object containing the following properties:
* - linkMapContext: (optional) the map context to use to maintain link maps
* - linkConnectionsContext: (optional) the map context to use to maintain link connection maps */ createContext(options?: { linkMapContext?: HashMap.Context; linkConnectionsContext?: HashMap.Context; }): EdgeValuedGraphHashed.Context; /** * Returns the default context for this type of graph. * @typeparam UN - the upper node type that the context should accept */ defaultContext(): EdgeValuedGraphHashed.Context; } export interface EdgeValuedGrapSortedCreators extends ValuedGraphBase.Factory { /** * Returns a new EdgeValuedGraph context instance based on the given `options`. * @typeparam UN - the upper node type for which the context can create instances * @param options - (optional) an object containing the following properties:
* - linkMapContext: (optional) the map context to use to maintain link maps
* - linkConnectionsContext: (optional) the map context to use to maintain link connection maps */ createContext(options?: { linkMapContext?: SortedMap.Context; linkConnectionsContext?: SortedMap.Context; }): EdgeValuedGraphSorted.Context; /** * Returns the default context for this type of graph. * @typeparam UN - the upper node type that the context should accept */ defaultContext(): EdgeValuedGraphSorted.Context; }