VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPBGLRMATGraphSource Class Reference

a distributed graph with random edges built accorting to the recursive matrix (R-MAT) model. More...

#include <vtkPBGLRMATGraphSource.h>

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

List of all members.

Public Types

typedef vtkGraphAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkPBGLRMATGraphSourceNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetNumberOfVertices (vtkIdType value)
void SetProbabilities (double A, double B, double C, double D)
void GetProbabilities (double *A, double *B, double *C, double *D)
virtual vtkIdType GetNumberOfVertices ()
virtual vtkIdType GetNumberOfEdges ()
virtual void SetNumberOfEdges (vtkIdType)
virtual void SetIncludeEdgeWeights (bool)
virtual bool GetIncludeEdgeWeights ()
virtual void IncludeEdgeWeightsOn ()
virtual void IncludeEdgeWeightsOff ()
virtual void SetEdgeWeightArrayName (const char *)
virtual char * GetEdgeWeightArrayName ()
virtual void SetAllowSelfLoops (bool)
virtual bool GetAllowSelfLoops ()
virtual void AllowSelfLoopsOn ()
virtual void AllowSelfLoopsOff ()
virtual void SetGeneratePedigreeIds (bool)
virtual bool GetGeneratePedigreeIds ()
virtual void GeneratePedigreeIdsOn ()
virtual void GeneratePedigreeIdsOff ()
virtual void SetVertexPedigreeIdArrayName (const char *)
virtual char * GetVertexPedigreeIdArrayName ()
virtual void SetEdgePedigreeIdArrayName (const char *)
virtual char * GetEdgePedigreeIdArrayName ()
virtual void SetSeed (int)
virtual int GetSeed ()

Static Public Member Functions

static vtkPBGLRMATGraphSourceNew ()
static int IsTypeOf (const char *type)
static vtkPBGLRMATGraphSourceSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkPBGLRMATGraphSource ()
 ~vtkPBGLRMATGraphSource ()
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestDataObject (vtkInformation *, vtkInformationVector **inputVector, vtkInformationVector *outputVector)

Protected Attributes

vtkIdType NumberOfVertices
vtkIdType NumberOfEdges
double A
double B
double C
double D
bool IncludeEdgeWeights
bool AllowSelfLoops
bool GeneratePedigreeIds
int Seed
char * EdgeWeightArrayName
char * VertexPedigreeIdArrayName
char * EdgePedigreeIdArrayName

Detailed Description

a distributed graph with random edges built accorting to the recursive matrix (R-MAT) model.

Generates a directed distributed graph with a specified number of vertices (N=2^X) and a set of probabilities A, B, C, and D, using the recursive matrix (R-MAT) method of Chakrabarti, Zhan, and Faloutsos. Edges are generated by randomly selecting an element within the adjacency matrix, then adding the corresponding edge. The element in the adjacency matrix is selected by placing set of grids over the adjacency list. The topmost grid has four quadrants, and the probability of creating an edge within that quadrant is specified by A, B, C, or D, corresponding to the top-left, top-right, bottom-left, and bottom-right quadrants in the grid, respectively:

+-+-+ |A|B| +-+-+ |C|D| +-+-+

Naturally, A+B+C+D must equal 1. Once a quadrant has been selected, the quadrant itself is subdivided into another A-B-C-D grid and the same process is applied repeatedly until the grid itself matches the adjacency matrix and a specific edge is selected.

Typically, A >= B, A >= C, and A >= D. A and D are viewed as two separate communities, while B and C provide interconnections between those two communities. The more skewed the probabilities between the communities (A >= D), the more unbalanced the resulting degree distributions will be. With no skew (A=B=C=D=0.25), this generator produces graphs similar to the random graphs provided by vtkPRandomGraphSource. Greater skew values tend to produce graphs with a power-law degree distribution, which mimics the behavior of many real-world graphs based on social networks.

Tests:
vtkPBGLRMATGraphSource (Tests)

Definition at line 76 of file vtkPBGLRMATGraphSource.h.


Member Typedef Documentation

Reimplemented from vtkGraphAlgorithm.

Definition at line 80 of file vtkPBGLRMATGraphSource.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 vtkPBGLRMATGraphSource::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 vtkPBGLRMATGraphSource::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* vtkPBGLRMATGraphSource::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkGraphAlgorithm.

Reimplemented from vtkGraphAlgorithm.

void vtkPBGLRMATGraphSource::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.

The number of vertices in the graph. This value will always be a power of two.

virtual void vtkPBGLRMATGraphSource::SetNumberOfVertices ( vtkIdType  value) [virtual]

Sets the number of vertices in the graph, which will be rounded to the nearest power of two.

Creates a graph with the specified number of edges. Duplicate (parallel) edges are allowed.

Creates a graph with the specified number of edges. Duplicate (parallel) edges are allowed.

Set the quadrant probabilities A, B, C, D. Requires that A+B+C+D=1.

void vtkPBGLRMATGraphSource::GetProbabilities ( double A,
double B,
double C,
double D 
)

Retrieves the quadrant probabilities.

virtual void vtkPBGLRMATGraphSource::SetIncludeEdgeWeights ( bool  ) [virtual]

When set, includes edge weights in an array named "edge_weights". Defaults to off. Weights are random between 0 and 1.

When set, includes edge weights in an array named "edge_weights". Defaults to off. Weights are random between 0 and 1.

When set, includes edge weights in an array named "edge_weights". Defaults to off. Weights are random between 0 and 1.

When set, includes edge weights in an array named "edge_weights". Defaults to off. Weights are random between 0 and 1.

virtual void vtkPBGLRMATGraphSource::SetEdgeWeightArrayName ( const char *  ) [virtual]

The name of the edge weight array. Default "edge weight".

The name of the edge weight array. Default "edge weight".

virtual void vtkPBGLRMATGraphSource::SetAllowSelfLoops ( bool  ) [virtual]

If this flag is set to true, edges where the source and target vertex are the same can be generated. The default is to forbid such loops.

virtual bool vtkPBGLRMATGraphSource::GetAllowSelfLoops ( ) [virtual]

If this flag is set to true, edges where the source and target vertex are the same can be generated. The default is to forbid such loops.

virtual void vtkPBGLRMATGraphSource::AllowSelfLoopsOn ( ) [virtual]

If this flag is set to true, edges where the source and target vertex are the same can be generated. The default is to forbid such loops.

virtual void vtkPBGLRMATGraphSource::AllowSelfLoopsOff ( ) [virtual]

If this flag is set to true, edges where the source and target vertex are the same can be generated. The default is to forbid such loops.

virtual void vtkPBGLRMATGraphSource::SetGeneratePedigreeIds ( bool  ) [virtual]

Add pedigree ids to vertex and edge data.

Add pedigree ids to vertex and edge data.

Add pedigree ids to vertex and edge data.

Add pedigree ids to vertex and edge data.

virtual void vtkPBGLRMATGraphSource::SetVertexPedigreeIdArrayName ( const char *  ) [virtual]

The name of the vertex pedigree id array. Default "vertex id".

The name of the vertex pedigree id array. Default "vertex id".

virtual void vtkPBGLRMATGraphSource::SetEdgePedigreeIdArrayName ( const char *  ) [virtual]

The name of the edge pedigree id array. Default "edge id".

The name of the edge pedigree id array. Default "edge id".

virtual void vtkPBGLRMATGraphSource::SetSeed ( int  ) [virtual]

Control the seed used for pseudo-random-number generation. This ensures that vtkPBGLRMATGraphSource can produce repeatable results. The seed values provided for each process should be different,

virtual int vtkPBGLRMATGraphSource::GetSeed ( ) [virtual]

Control the seed used for pseudo-random-number generation. This ensures that vtkPBGLRMATGraphSource can produce repeatable results. The seed values provided for each process should be different,

virtual int vtkPBGLRMATGraphSource::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.

virtual int vtkPBGLRMATGraphSource::RequestDataObject ( vtkInformation ,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

Creates directed or undirected output based on Directed flag.

Reimplemented from vtkGraphAlgorithm.


Member Data Documentation

Definition at line 158 of file vtkPBGLRMATGraphSource.h.

Definition at line 159 of file vtkPBGLRMATGraphSource.h.

Definition at line 160 of file vtkPBGLRMATGraphSource.h.

Definition at line 161 of file vtkPBGLRMATGraphSource.h.

Definition at line 162 of file vtkPBGLRMATGraphSource.h.

Definition at line 163 of file vtkPBGLRMATGraphSource.h.

Definition at line 164 of file vtkPBGLRMATGraphSource.h.

Definition at line 165 of file vtkPBGLRMATGraphSource.h.

Definition at line 166 of file vtkPBGLRMATGraphSource.h.

Definition at line 167 of file vtkPBGLRMATGraphSource.h.

Definition at line 168 of file vtkPBGLRMATGraphSource.h.

Definition at line 169 of file vtkPBGLRMATGraphSource.h.

Definition at line 170 of file vtkPBGLRMATGraphSource.h.


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