vtkPBGLRMATGraphSource Class Reference

#include <vtkPBGLRMATGraphSource.h>

Inheritance diagram for vtkPBGLRMATGraphSource:

Inheritance graph
[legend]
Collaboration diagram for vtkPBGLRMATGraphSource:

Collaboration graph
[legend]

List of all members.


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 75 of file vtkPBGLRMATGraphSource.h.


Public Types

typedef vtkGraphAlgorithm Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
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 (vtkObject *o)

Protected Member Functions

 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

Member Typedef Documentation

Reimplemented from vtkGraphAlgorithm.

Definition at line 79 of file vtkPBGLRMATGraphSource.h.


Constructor & Destructor Documentation

vtkPBGLRMATGraphSource::vtkPBGLRMATGraphSource (  )  [protected]

vtkPBGLRMATGraphSource::~vtkPBGLRMATGraphSource (  )  [protected]


Member Function Documentation

static vtkPBGLRMATGraphSource* vtkPBGLRMATGraphSource::New (  )  [static]

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

Reimplemented from vtkGraphAlgorithm.

virtual const char* vtkPBGLRMATGraphSource::GetClassName (  )  [virtual]

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.

static vtkPBGLRMATGraphSource* vtkPBGLRMATGraphSource::SafeDownCast ( vtkObject o  )  [static]

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.

virtual vtkIdType vtkPBGLRMATGraphSource::GetNumberOfVertices (  )  [virtual]

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.

virtual vtkIdType vtkPBGLRMATGraphSource::GetNumberOfEdges (  )  [virtual]

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

virtual void vtkPBGLRMATGraphSource::SetNumberOfEdges ( vtkIdType   )  [virtual]

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

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

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.

virtual bool vtkPBGLRMATGraphSource::GetIncludeEdgeWeights (  )  [virtual]

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

virtual void vtkPBGLRMATGraphSource::IncludeEdgeWeightsOn (  )  [virtual]

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

virtual void vtkPBGLRMATGraphSource::IncludeEdgeWeightsOff (  )  [virtual]

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".

virtual char* vtkPBGLRMATGraphSource::GetEdgeWeightArrayName (  )  [virtual]

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.

virtual bool vtkPBGLRMATGraphSource::GetGeneratePedigreeIds (  )  [virtual]

Add pedigree ids to vertex and edge data.

virtual void vtkPBGLRMATGraphSource::GeneratePedigreeIdsOn (  )  [virtual]

Add pedigree ids to vertex and edge data.

virtual void vtkPBGLRMATGraphSource::GeneratePedigreeIdsOff (  )  [virtual]

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".

virtual char* vtkPBGLRMATGraphSource::GetVertexPedigreeIdArrayName (  )  [virtual]

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".

virtual char* vtkPBGLRMATGraphSource::GetEdgePedigreeIdArrayName (  )  [virtual]

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 157 of file vtkPBGLRMATGraphSource.h.

Definition at line 158 of file vtkPBGLRMATGraphSource.h.

double vtkPBGLRMATGraphSource::A [protected]

Definition at line 159 of file vtkPBGLRMATGraphSource.h.

double vtkPBGLRMATGraphSource::B [protected]

Definition at line 160 of file vtkPBGLRMATGraphSource.h.

double vtkPBGLRMATGraphSource::C [protected]

Definition at line 161 of file vtkPBGLRMATGraphSource.h.

double vtkPBGLRMATGraphSource::D [protected]

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.


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

Generated on Mon Sep 27 18:39:43 2010 for VTK by  doxygen 1.5.6