From ab0e0e7982e7eeb7e8d4bc41bde038935be761be Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 21 Jun 2009 14:02:46 -0500 Subject: document constructor --- lib/Graph/Implicit.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 { -- cgit v1.2.3-54-g00ecf