summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-06-21 14:02:46 -0500
committerJesse Luehrs <doy@tozt.net>2009-06-21 14:18:06 -0500
commitab0e0e7982e7eeb7e8d4bc41bde038935be761be (patch)
tree12863a1202e485f07390d06f3e0c5cc484c72984
parentdaba44bc0993ecc2653eeb876183bde1a00597e7 (diff)
downloadgraph-implicit-ab0e0e7982e7eeb7e8d4bc41bde038935be761be.tar.gz
graph-implicit-ab0e0e7982e7eeb7e8d4bc41bde038935be761be.zip
document constructor
-rw-r--r--lib/Graph/Implicit.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Graph/Implicit.pm b/lib/Graph/Implicit.pm
index 9d8c43c..e824e4e 100644
--- a/lib/Graph/Implicit.pm
+++ b/lib/Graph/Implicit.pm
@@ -30,6 +30,16 @@ Graph::Implicit - graph algorithms for implicitly specified graphs
=head1 CONSTRUCTOR
+=head2 new(CODEREF)
+
+The constructor takes a single argument, a coderef. This coderef should take
+something representing a vertex, and return a list of arrayrefs, one for each
+adjacent vertex, which have the vertex as the first element and the weight of
+the edge to that vertex as the second element. For example, if the graph has
+three elements A, B, and C, and there is an edge of weight 1 from B to A and an
+edge of weight 2 from B to C, then the coderef should return C<["A", 1], ["C",
+2]> when called with C<"B"> as its argument.
+
=cut
sub new {