import { Edge, GraphViewOptions, ID, Node, PlainObject } from './types'; export declare class GraphView { private graph; private nodeFilter; private edgeFilter; cacheEnabled: boolean; private inEdgesMap; private outEdgesMap; private bothEdgesMap; private allNodesMap; private allEdgesMap; constructor(options: GraphViewOptions); /** * Clear all cache data. Therefore `getAllNodes()` will return `[]`. * If you want to disable caching, use `graphView.cacheEnabled = false` instead. */ clearCache: () => void; /** * Fully refresh all cache data to the current graph state. */ refreshCache: () => void; /** * Instead of a fully refreshment, this method partially update the cache data by specifying * involved(added, removed, updated) nodes. It's more efficient when handling small changes * on a large graph. */ updateCache: (involvedNodeIds: Set | Array) => void; startAutoCache(): void; stopAutoCache(): void; private handleGraphChanged; private checkNodeExistence; hasNode(id: ID): boolean; areNeighbors(firstNodeId: ID, secondNodeId: ID): boolean; getNode(id: ID): Node; getRelatedEdges(id: ID, direction?: 'in' | 'out' | 'both'): Edge[]; getDegree(id: ID, direction?: 'in' | 'out' | 'both'): number; getSuccessors(id: ID): Node[]; getPredecessors(id: ID): Node[]; getNeighbors(id: ID): Node[]; hasEdge(id: ID): boolean; getEdge(id: ID): Edge; getEdgeDetail(id: ID): { edge: Edge; source: Node; target: Node; }; hasTreeStructure(treeKey: string | undefined): boolean; getRoots(treeKey?: string): Node[]; getChildren(id: ID, treeKey?: string): Node[]; getParent(id: ID, treeKey?: string): Node | null; getAllNodes(): Node[]; getAllEdges(): Edge[]; bfs(id: ID, fn: (node: Node) => void, direction?: 'in' | 'out' | 'both'): void; dfs(id: ID, fn: (node: Node) => void, direction?: 'in' | 'out' | 'both'): void; }