FreeMat
vtkEdgeListIterator

Section: Visualization Toolkit Filtering Classes

Usage

vtkEdgeListIterator iterates through all the edges in a graph, by traversing the adjacency list for each vertex. You may instantiate this class directly and call SetGraph() to traverse a certain graph. You may also call the graph's GetEdges() method to set up the iterator for a certain graph.

Note that this class does NOT guarantee that the edges will be processed in order of their ids (i.e. it will not necessarily return edge 0, then edge 1, etc.).

To create an instance of class vtkEdgeListIterator, simply invoke its constructor as follows

  obj = vtkEdgeListIterator

Methods

The class vtkEdgeListIterator has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkEdgeListIterator class.

  • string = obj.GetClassName ()
  • int = obj.IsA (string name)
  • vtkEdgeListIterator = obj.NewInstance ()
  • vtkEdgeListIterator = obj.SafeDownCast (vtkObject o)
  • vtkGraph = obj.GetGraph ()
  • obj.SetGraph (vtkGraph graph)
  • vtkGraphEdge = obj.NextGraphEdge () - Just like Next(), but returns heavy-weight vtkGraphEdge object instead of the vtkEdgeType struct, for use with wrappers. The graph edge is owned by this iterator, and changes after each call to NextGraphEdge().
  • bool = obj.HasNext () - Whether this iterator has more edges.