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
Param | Type | Description |
---|---|---|
graph | Graph.<T> | |
node_array | Array.<T> | graph nodes as an array |
targets | Array.<number> | node indices, distances to which need to be calculated |
node_index_map | Map.<T, number> |
- graph_compute_distance_matrix(graph, node_array, targets, node_index_map) ⇒
SquareMatrix
- ~node_edge :
WeightedEdge.<N>
- ~score(other_node) ⇒
number
- ~node_edge :
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
Param | Type |
---|---|
other_node | number |