Coverage Report - net.sourceforge.combean.interfaces.graph.alg.traverse.GraphTraversalAlg
 
Classes in this File Line Coverage Branch Coverage Complexity
GraphTraversalAlg
N/A
N/A
1
 
 1  
 /*
 2  
     This file is part of Combean.
 3  
 
 4  
     Combean is free software; you can redistribute it and/or modify
 5  
     it under the terms of the GNU General Public License as published by
 6  
     the Free Software Foundation; either version 2 of the License, or
 7  
     (at your option) any later version.
 8  
 
 9  
     Combean is distributed in the hope that it will be useful,
 10  
     but WITHOUT ANY WARRANTY; without even the implied warranty of
 11  
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 12  
     GNU General Public License for more details.
 13  
 
 14  
     You should have received a copy of the GNU General Public License
 15  
     along with Combean; if not, write to the Free Software
 16  
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 17  
 */
 18  
 /*
 19  
  * Created on 14.01.2005
 20  
  *
 21  
  */
 22  
 package net.sourceforge.combean.interfaces.graph.alg.traverse;
 23  
 
 24  
 import net.sourceforge.combean.interfaces.graph.Node;
 25  
 import net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm;
 26  
 
 27  
 /**
 28  
  * Base class for all algorithms which traverse a graph in a certain order.
 29  
  * Traversal algorithms collaborate with a TraversalVisitor. This object
 30  
  * is called during the traveral and may be used to collect information or
 31  
  * perform actions on the nodes and edges of the graph.
 32  
  * 
 33  
  * @author schickin
 34  
  *
 35  
  */
 36  
 public interface GraphTraversalAlg extends GraphAlgorithm {
 37  
         
 38  
         /**
 39  
          * Set the visitor object which will be called during the traversal.
 40  
          * 
 41  
          * @param visitor
 42  
          */
 43  
         public void setVisitor(TraversalVisitor visitor);
 44  
         
 45  
         /**
 46  
          * @return the visitor
 47  
          */
 48  
         public TraversalVisitor getVisitor();
 49  
         
 50  
         /**
 51  
          * If a start node is set, the traversal will start from there and only
 52  
          * thos nodes which are reachable from the start node will be explored.
 53  
          * If the start node is set to null (the default), all components of the
 54  
          * graph will be explored. 
 55  
          * 
 56  
          * @param startNode
 57  
          */
 58  
         public void setLocalStartNode(Node startNode);
 59  
         
 60  
         /**
 61  
          * If this flag is set to true, the underlying graph must have the
 62  
          * OutgoingEdgeNeighborhood-property and only outgoing edges will
 63  
          * be considered when the neigbors of a node are visited. By default
 64  
          * this flag will be set to false and all incident edges will be
 65  
          * visited for a given node.
 66  
          * 
 67  
          * @param useOnlyOutgoingEdges
 68  
          */
 69  
         public void setUseOnlyOutgoingEdges(boolean useOnlyOutgoingEdges);
 70  
 
 71  
 }