FreeMat: vtkGraphLayoutStrategy

FreeMat

- Main Page
- Related Pages

vtkGraphLayoutStrategy

Section: Visualization Toolkit Infovis Classes

# Usage

All graph layouts should subclass from this class. vtkGraphLayoutStrategy works as a plug-in to the vtkGraphLayout algorithm. The Layout() function should perform some reasonable "chunk" of the layout. This allows the user to be able to see the progress of the layout. Use IsLayoutComplete() to tell the user when there is no more layout to perform.

.SECTION Thanks Thanks to Brian Wylie from Sandia National Laboratories for adding incremental layout capabilities.

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

      obj = vtkGraphLayoutStrategy

# Methods

The class vtkGraphLayoutStrategy 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 vtkGraphLayoutStrategy class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkGraphLayoutStrategy = obj.NewInstance ()`
- `vtkGraphLayoutStrategy = obj.SafeDownCast (vtkObject o)`
- `obj.SetGraph (vtkGraph graph)` - Setting the graph for the layout strategy
- `obj.Initialize ()` - This method allows the layout strategy to do initialization of data structures or whatever else it might want to do.
- `obj.Layout ()` - This is the layout method where the graph that was set in SetGraph() is laid out. The method can either entirely layout the graph or iteratively lay out the graph. If you have an iterative layout please implement the IsLayoutComplete() method.
- `int = obj.IsLayoutComplete ()` - Whether to use edge weights in the layout or not.
- `obj.SetWeightEdges (bool state)` - Whether to use edge weights in the layout or not.
- `bool = obj.GetWeightEdges ()` - Whether to use edge weights in the layout or not.
- `obj.SetEdgeWeightField (string field)` - Set/Get the field to use for the edge weights.
- `string = obj.GetEdgeWeightField ()` - Set/Get the field to use for the edge weights.