import type { HashMap, HashSet } from '@rimbu/hashed';
import type { SortedMap, SortedSet } from '@rimbu/sorted';
import type { RMap, RSet } from '@rimbu/collection-types';
import type { EdgeGraph, EdgeGraphHashed, EdgeGraphSorted } from '@rimbu/graph';
import type { GraphBase } from '../../common/index.mjs';
export interface EdgeGraphCreators {
/**
* Returns a new EdgeGraph 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 set context to use to maintain link connection maps
*/
createContext(options: {
linkMapContext: RMap.Context;
linkConnectionsContext: RSet.Context;
}): EdgeGraph.Context;
}
export interface EdgeGraphHashedCreators
extends GraphBase.Factory {
/**
* Returns a new EdgeGraphHashed 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 set context to use to maintain link connections
*/
createContext(options?: {
linkMapContext?: HashMap.Context;
linkConnectionsContext?: HashSet.Context;
}): EdgeGraphHashed.Context;
/**
* Returns the default context for this type of graph.
* @typeparam UN - the upper node type that the context should accept
*/
defaultContext(): EdgeGraphHashed.Context;
}
export interface EdgeGraphSortedCreators
extends GraphBase.Factory {
/**
* Returns a new EdgeGraphSorted 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 set context to use to maintain link connections
*/
createContext(options?: {
linkMapContext?: SortedMap.Context;
linkConnectionsContext?: SortedSet.Context;
}): EdgeGraphSorted.Context;
/**
* Returns the default context for this type of graph.
* @typeparam UN - the upper node type that the context should accept
*/
defaultContext(): EdgeGraphSorted.Context;
}