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 | Protected Attributes | List of all members
vtkPBGLRMATGraphSource Class Reference

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

#include <vtkPBGLRMATGraphSource.h>

Inherits vtkGraphAlgorithm.

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 vtkObjectBase * NewInstanceInternal () 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

typedef vtkGraphAlgorithm vtkPBGLRMATGraphSource::Superclass

Definition at line 80 of file vtkPBGLRMATGraphSource.h.

Constructor & Destructor Documentation

vtkPBGLRMATGraphSource::vtkPBGLRMATGraphSource ( )
protected
vtkPBGLRMATGraphSource::~vtkPBGLRMATGraphSource ( )
protected

Member Function Documentation

static vtkPBGLRMATGraphSource* vtkPBGLRMATGraphSource::New ( )
static
static int vtkPBGLRMATGraphSource::IsTypeOf ( const char *  type)
static
virtual int vtkPBGLRMATGraphSource::IsA ( const char *  type)
virtual
static vtkPBGLRMATGraphSource* vtkPBGLRMATGraphSource::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkPBGLRMATGraphSource::NewInstanceInternal ( ) const
protectedvirtual
vtkPBGLRMATGraphSource* vtkPBGLRMATGraphSource::NewInstance ( ) const
void vtkPBGLRMATGraphSource::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
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 *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protectedvirtual
virtual int vtkPBGLRMATGraphSource::RequestDataObject ( vtkInformation *  ,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedvirtual

Creates directed or undirected output based on Directed flag.

Member Data Documentation

vtkIdType vtkPBGLRMATGraphSource::NumberOfVertices
protected

Definition at line 158 of file vtkPBGLRMATGraphSource.h.

vtkIdType vtkPBGLRMATGraphSource::NumberOfEdges
protected

Definition at line 159 of file vtkPBGLRMATGraphSource.h.

double vtkPBGLRMATGraphSource::A
protected

Definition at line 160 of file vtkPBGLRMATGraphSource.h.

double vtkPBGLRMATGraphSource::B
protected

Definition at line 161 of file vtkPBGLRMATGraphSource.h.

double vtkPBGLRMATGraphSource::C
protected

Definition at line 162 of file vtkPBGLRMATGraphSource.h.

double vtkPBGLRMATGraphSource::D
protected

Definition at line 163 of file vtkPBGLRMATGraphSource.h.

bool vtkPBGLRMATGraphSource::IncludeEdgeWeights
protected

Definition at line 164 of file vtkPBGLRMATGraphSource.h.

bool vtkPBGLRMATGraphSource::AllowSelfLoops
protected

Definition at line 165 of file vtkPBGLRMATGraphSource.h.

bool vtkPBGLRMATGraphSource::GeneratePedigreeIds
protected

Definition at line 166 of file vtkPBGLRMATGraphSource.h.

int vtkPBGLRMATGraphSource::Seed
protected

Definition at line 167 of file vtkPBGLRMATGraphSource.h.

char* vtkPBGLRMATGraphSource::EdgeWeightArrayName
protected

Definition at line 168 of file vtkPBGLRMATGraphSource.h.

char* vtkPBGLRMATGraphSource::VertexPedigreeIdArrayName
protected

Definition at line 169 of file vtkPBGLRMATGraphSource.h.

char* vtkPBGLRMATGraphSource::EdgePedigreeIdArrayName
protected

Definition at line 170 of file vtkPBGLRMATGraphSource.h.


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