Skip to main content

graph_compute_distance_matrix

graph_compute_distance_matrix(graph, node_array, targets, node_index_map) ⇒ SquareMatrix

Produce a distance matrix from an input graph, tracing distances from each node to every node specified in target vector

Kind: global function
See: "A Fast Algorithm to Find All-Pairs Shortest Paths in Complex Networks" by Wei Peng et Al. 2012

ParamTypeDescription
graphGraph.<T>
node_arrayArray.<T>graph nodes as an array
targetsArray.<number>node indices, distances to which need to be calculated
node_index_mapMap.<T, number>

graph_compute_distance_matrix~node_edge : WeightedEdge.<N>

Kind: inner constant of graph_compute_distance_matrix

graph_compute_distance_matrix~score(other_node) ⇒ number

Kind: inner method of graph_compute_distance_matrix

ParamType
other_nodenumber