Sendu Bala
and 1 contributors


Bio::Graph::SimpleGraph::Traversal - graph traversal operations for Bio::Graph::SimpleGraph and Bio::Graph::Protein::Graph objects


  use Bio::Graph::SimpleGraph::Traversal;
  use Bio::Graph::SimpleGraph;

  ## get a graph , $g.

  my $traversal = Bio::Graph::SimpleGraph::Traversal->new(-graph=>$g,
                                                          -what =>$what);
 ## cycle through nodes one at a time
 while ($traversal->has_next() ) {
        my $node = $traversal->get_next();
 ## reset traversal to start

 ## get all nodes
  my @all_nodes = $traversal->get_all();


This is a helper class for performing graph traversal operations for Bio::Graph::SimpleGraph objects and Bio::Graph::Protein::Graph objects. The documentation concerning the use of this class is described in the "Graph algorithms" section of the Bio::Graph::SimpleGraph modules. Only the methods are documented here.


Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.                  - General discussion  - About the mailing lists

Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:

AUTHOR - Nat Goodman, Richard Adams



 name      : has_next
 usage     : while (my $traversal->has_next() ) {..
 purpose   : returns true if there are more items in traversal, else undef
 arguments : none
 returns   : true or unde;


 name      : get_next
 usage     : my $node =  $traversal->get_next() ;
 purpose   : returns  next item in traversal or undef if traversal is exhausted. 
 arguments : none
 returns   : a node  or undef;


 name      : get_all
 usage     : my @nodes =  $traversal->get_all() ;
 purpose   : get all remaining items in traversal as ARRAY (in array context)
              or ARRAY ref.
 arguments : none
 returns   : an array, an array reference or undef.


 name      : get_all
 usage     : my @nodes =  $traversal->get_all() ;
 purpose   : gets current node in traversal 
 arguments : none
 returns   : the current node or undef.


 name      : reset
 usage     : $traversal->reset() ;
 purpose   : restarts traversal from first node
 arguments : none
 returns   : void.