VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkCollapseGraph Class Reference

"Collapses" vertices onto their neighbors. More...

#include <vtkCollapseGraph.h>

Inheritance diagram for vtkCollapseGraph:
Inheritance graph
[legend]
Collaboration diagram for vtkCollapseGraph:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkGraphAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkCollapseGraphNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
void SetGraphConnection (vtkAlgorithmOutput *)
 Convenience function provided for setting the graph input.
void SetSelectionConnection (vtkAlgorithmOutput *)
 Convenience function provided for setting the selection input.

Static Public Member Functions

static vtkCollapseGraphNew ()
static int IsTypeOf (const char *type)
static vtkCollapseGraphSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkCollapseGraph ()
 ~vtkCollapseGraph ()
int FillInputPortInformation (int port, vtkInformation *info)
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)

Detailed Description

"Collapses" vertices onto their neighbors.

vtkCollapseGraph "collapses" vertices onto their neighbors, while maintaining connectivity. Two inputs are required - a graph (directed or undirected), and a vertex selection that can be converted to indices.

Conceptually, each of the vertices specified in the input selection expands, "swallowing" adacent vertices. Edges to-or-from the "swallowed" vertices become edges to-or-from the expanding vertices, maintaining the overall graph connectivity.

In the case of directed graphs, expanding vertices only swallow vertices that are connected via out edges. This rule provides intuitive behavior when working with trees, so that "child" vertices collapse into their parents when the parents are part of the input selection.

Input port 0: graph Input port 1: selection

Definition at line 48 of file vtkCollapseGraph.h.


Member Typedef Documentation

Reimplemented from vtkGraphAlgorithm.

Definition at line 52 of file vtkCollapseGraph.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkGraphAlgorithm.

static int vtkCollapseGraph::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkGraphAlgorithm.

virtual int vtkCollapseGraph::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkGraphAlgorithm.

Reimplemented from vtkGraphAlgorithm.

virtual vtkObjectBase* vtkCollapseGraph::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkGraphAlgorithm.

Reimplemented from vtkGraphAlgorithm.

void vtkCollapseGraph::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkGraphAlgorithm.

Convenience function provided for setting the graph input.

Convenience function provided for setting the selection input.

int vtkCollapseGraph::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkGraphAlgorithm.

int vtkCollapseGraph::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkGraphAlgorithm.


The documentation for this class was generated from the following file: