VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkPBGLShortestPaths Class Reference

Compute the shortest paths from the origin vertex to all other vertices in a distributed vtkGraph. More...

#include <vtkPBGLShortestPaths.h>

Inherits vtkGraphAlgorithm.

Public Types

typedef vtkGraphAlgorithm Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkPBGLShortestPathsNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void SetOriginVertex (vtkIdType index)
 
void SetOriginVertex (vtkStdString arrayName, vtkVariant value)
 
void SetOriginVertexString (char *arrayName, char *value)
 
void SetOriginSelection (vtkSelection *s)
 
void SetOriginSelectionConnection (vtkAlgorithmOutput *algOutput)
 
virtual void SetEdgeWeightArrayName (const char *)
 
virtual void SetDelta (double)
 
virtual void SetPredecessorArrayName (const char *)
 
virtual void SetPathLengthArrayName (const char *)
 
virtual void SetOriginFromSelection (bool)
 
virtual bool GetOriginFromSelection ()
 
virtual void OriginFromSelectionOn ()
 
virtual void OriginFromSelectionOff ()
 
virtual bool GetOutputSelection ()
 
virtual void SetOutputSelection (bool)
 
virtual void OutputSelectionOn ()
 
virtual void OutputSelectionOff ()
 
virtual void SetOutputSelectionType (const char *)
 
virtual void SetUseUniformEdgeWeights (bool)
 
virtual bool GetUseUniformEdgeWeights ()
 
virtual void UseUniformEdgeWeightsOn ()
 
virtual void UseUniformEdgeWeightsOff ()
 

Static Public Member Functions

static vtkPBGLShortestPathsNew ()
 
static int IsTypeOf (const char *type)
 
static vtkPBGLShortestPathsSafeDownCast (vtkObjectBase *o)
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 vtkPBGLShortestPaths ()
 
 ~vtkPBGLShortestPaths ()
 
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int FillInputPortInformation (int port, vtkInformation *info)
 
virtual int FillOutputPortInformation (int port, vtkInformation *info)
 

Detailed Description

Compute the shortest paths from the origin vertex to all other vertices in a distributed vtkGraph.

This VTK class uses the Parallel BGL's implementation of the delta-stepping algorithm generic algorithm to compute shortest paths from a given 'source' vertex on the input graph (a distributed vtkGraph). Delta-stepping, discovered by Meyer and Sanders, is a parallel form of Dijkstra's shortest paths algorithm, based on a multi-level bucket structure that permits edges to be relaxed in parallel.

Tests:
vtkPBGLShortestPaths (Tests)

Definition at line 48 of file vtkPBGLShortestPaths.h.

Member Typedef Documentation

typedef vtkGraphAlgorithm vtkPBGLShortestPaths::Superclass

Definition at line 52 of file vtkPBGLShortestPaths.h.

Constructor & Destructor Documentation

vtkPBGLShortestPaths::vtkPBGLShortestPaths ( )
protected
vtkPBGLShortestPaths::~vtkPBGLShortestPaths ( )
protected

Member Function Documentation

static vtkPBGLShortestPaths* vtkPBGLShortestPaths::New ( )
static
static int vtkPBGLShortestPaths::IsTypeOf ( const char *  type)
static
virtual int vtkPBGLShortestPaths::IsA ( const char *  type)
virtual
static vtkPBGLShortestPaths* vtkPBGLShortestPaths::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkPBGLShortestPaths::NewInstanceInternal ( ) const
protectedvirtual
vtkPBGLShortestPaths* vtkPBGLShortestPaths::NewInstance ( ) const
void vtkPBGLShortestPaths::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
void vtkPBGLShortestPaths::SetOriginSelection ( vtkSelection *  s)

Convenience methods for setting the origin selection input.

void vtkPBGLShortestPaths::SetOriginSelectionConnection ( vtkAlgorithmOutput *  algOutput)
inline

Convenience methods for setting the origin selection input.

Definition at line 58 of file vtkPBGLShortestPaths.h.

void vtkPBGLShortestPaths::SetOriginVertex ( vtkIdType  index)

Set the index (into the vertex array) of the breadth first search 'origin' vertex.

void vtkPBGLShortestPaths::SetOriginVertex ( vtkStdString  arrayName,
vtkVariant  value 
)

Set the breadth first search 'origin' vertex. This method is basically the same as above but allows the application to simply specify an array name and value, instead of having to know the specific index of the vertex.

void vtkPBGLShortestPaths::SetOriginVertexString ( char *  arrayName,
char *  value 
)

Convenience method for setting the origin vertex given an array name and string value. This method is primarily for the benefit of the VTK Parallel client/server layer, callers should prefer to use SetOriginVertex() whenever possible.

virtual void vtkPBGLShortestPaths::SetEdgeWeightArrayName ( const char *  )
virtual

Set the name of the edge-weight input array, which must name an array that is part of the edge data of the input graph and contains numeric data. If the edge-weight array is not of type vtkDoubleArray, the array will be copied into a temporary vtkDoubleArray.

virtual void vtkPBGLShortestPaths::SetDelta ( double  )
virtual

Sets the value of delta, which is the width of each "bucket" within the multi-level bucket structure used internally by this algorithm. Large values of delta correspond with wider buckets, exposing more parallelism than smaller values. However, values that are too large will cause the algorithm to compute (and, later, correct) paths that are longer than the shortest path. While the value of delta will not affect the correctness of the results of this algorithm, delta can have a significant impact on performance. If no value of delta is provided, this algorithm employs the heuristics provided by Meyer and Sanders to automatically determine a delta.

virtual void vtkPBGLShortestPaths::SetPredecessorArrayName ( const char *  )
virtual

Set the name of the predecessor output array, which contains the predecessor of each vertex within the shortest paths tree. To determine the shortest path from the origin to a particular vertex, walk the predecessor array backwards. If no predecessor array name is set then the name 'Predecessor' is used.

virtual void vtkPBGLShortestPaths::SetPathLengthArrayName ( const char *  )
virtual

Set the name of the shortest path length output array, containing the length of the shortest path from the origin vertex to each of the other vertices in the graph. The origin will always have path-length 0, while vertices unreachable from the origin will have infinite path-length. If no path length array name is set then the name 'PathLength' is used.

virtual void vtkPBGLShortestPaths::SetOriginFromSelection ( bool  )
virtual

Use the vtkSelection from input port 1 as the origin vertex. The selection should be a IDS selection with field type POINTS. The first ID in the selection will be used for the origin vertex. Default is off (origin is specified by SetOriginVertex(...)).

virtual bool vtkPBGLShortestPaths::GetOriginFromSelection ( )
virtual

Use the vtkSelection from input port 1 as the origin vertex. The selection should be a IDS selection with field type POINTS. The first ID in the selection will be used for the origin vertex. Default is off (origin is specified by SetOriginVertex(...)).

virtual void vtkPBGLShortestPaths::OriginFromSelectionOn ( )
virtual

Use the vtkSelection from input port 1 as the origin vertex. The selection should be a IDS selection with field type POINTS. The first ID in the selection will be used for the origin vertex. Default is off (origin is specified by SetOriginVertex(...)).

virtual void vtkPBGLShortestPaths::OriginFromSelectionOff ( )
virtual

Use the vtkSelection from input port 1 as the origin vertex. The selection should be a IDS selection with field type POINTS. The first ID in the selection will be used for the origin vertex. Default is off (origin is specified by SetOriginVertex(...)).

virtual bool vtkPBGLShortestPaths::GetOutputSelection ( )
virtual

Create an output selection containing the ID of a vertex based on the output selection type. The default is to use the the maximum distance from the starting vertex. Defaults to off.

virtual void vtkPBGLShortestPaths::SetOutputSelection ( bool  )
virtual

Create an output selection containing the ID of a vertex based on the output selection type. The default is to use the the maximum distance from the starting vertex. Defaults to off.

virtual void vtkPBGLShortestPaths::OutputSelectionOn ( )
virtual

Create an output selection containing the ID of a vertex based on the output selection type. The default is to use the the maximum distance from the starting vertex. Defaults to off.

virtual void vtkPBGLShortestPaths::OutputSelectionOff ( )
virtual

Create an output selection containing the ID of a vertex based on the output selection type. The default is to use the the maximum distance from the starting vertex. Defaults to off.

virtual void vtkPBGLShortestPaths::SetOutputSelectionType ( const char *  )
virtual

Set the output selection type. The default is to use the the maximum distance from the starting vertex "MAX_DIST_FROM_ROOT". But you can also specify other things like "ROOT","2D_MAX", etc

virtual void vtkPBGLShortestPaths::SetUseUniformEdgeWeights ( bool  )
virtual

This option causes a temporary edge-weight array to be created with uniform edge weights of 1.0 at each edge. This option should preempt a given edge weight array via EdgeWeightArrayName. Defaults to off.

virtual bool vtkPBGLShortestPaths::GetUseUniformEdgeWeights ( )
virtual

This option causes a temporary edge-weight array to be created with uniform edge weights of 1.0 at each edge. This option should preempt a given edge weight array via EdgeWeightArrayName. Defaults to off.

virtual void vtkPBGLShortestPaths::UseUniformEdgeWeightsOn ( )
virtual

This option causes a temporary edge-weight array to be created with uniform edge weights of 1.0 at each edge. This option should preempt a given edge weight array via EdgeWeightArrayName. Defaults to off.

virtual void vtkPBGLShortestPaths::UseUniformEdgeWeightsOff ( )
virtual

This option causes a temporary edge-weight array to be created with uniform edge weights of 1.0 at each edge. This option should preempt a given edge weight array via EdgeWeightArrayName. Defaults to off.

virtual int vtkPBGLShortestPaths::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protectedvirtual
virtual int vtkPBGLShortestPaths::FillInputPortInformation ( int  port,
vtkInformation *  info 
)
protectedvirtual
virtual int vtkPBGLShortestPaths::FillOutputPortInformation ( int  port,
vtkInformation *  info 
)
protectedvirtual

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