Skip to content

Commit e1abcee

Browse files
committed
docs:Added usage message for .distance-matrix.
1 parent 70485f9 commit e1abcee

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/Graph.rakumod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,13 @@ class Graph
738738
}
739739
}
740740

741+
#======================================================
742+
# Graph distance matrix
743+
#======================================================
744+
#| Give the matrix of distances between vertices for the graph object.
745+
#| C<:$max-distance> -- Give the distances less or equal to $max-distance; others are put to Inf.
746+
#| C<:$method> -- Method to use; one of "a-star", "dijkstra", "floyd-warshall", "unit-weight", or Whatever.
747+
#| C<:$pairs> -- Whether to return vertex-vertex-to-distance pairs or not.
741748
method distance-matrix($max-distance = Whatever, :$method is copy = Whatever, Bool:D :p(:$pairs) = False) {
742749

743750
die 'The first argument is expected to be an integer or Whatever.'

0 commit comments

Comments
 (0)