import Graph, {Attributes} from 'graphology-types'; import {MinimalEdgeMapper} from 'graphology-utils/getters'; type PointerArray = Uint8Array | Uint16Array | Uint32Array | Float64Array; type NeighborhoodMethod = | 'in' | 'out' | 'directed' | 'undirected' | 'inbound' | 'outbound'; export class NeighborhoodIndex { constructor(graph: Graph, method?: NeighborhoodMethod); graph: Graph; neighborhood: PointerArray; starts: PointerArray; nodes: Array; bounds(index: number): [number, number]; project(): {[key: string]: Array}; collect(results: Array): {[key: string]: T}; assign(name: string, results: Array): void; } export class WeightedNeighborhoodIndex< NodeAttributes extends Attributes = Attributes, EdgeAttributes extends Attributes = Attributes > extends NeighborhoodIndex { constructor( graph: Graph, weightAttribute?: | keyof EdgeAttributes | MinimalEdgeMapper, method?: NeighborhoodMethod ); weights: Float64Array; outDegrees: Float64Array; }