VTK
|
a distributed graph with random edges built accorting to the recursive matrix (R-MAT) model. More...
#include <vtkPBGLRMATGraphSource.h>
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.
@par Tests: @ref c2_vtk_t_vtkPBGLRMATGraphSource "vtkPBGLRMATGraphSource (Tests)"
Definition at line 79 of file vtkPBGLRMATGraphSource.h.
Reimplemented from vtkGraphAlgorithm.
Definition at line 83 of file vtkPBGLRMATGraphSource.h.
vtkPBGLRMATGraphSource::vtkPBGLRMATGraphSource | ( | ) | [protected] |
vtkPBGLRMATGraphSource::~vtkPBGLRMATGraphSource | ( | ) | [protected] |
static vtkPBGLRMATGraphSource* vtkPBGLRMATGraphSource::New | ( | ) | [static] |
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.
static vtkPBGLRMATGraphSource* vtkPBGLRMATGraphSource::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
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.
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.
vtkIdType vtkPBGLRMATGraphSource::NumberOfVertices [protected] |
Definition at line 161 of file vtkPBGLRMATGraphSource.h.
vtkIdType vtkPBGLRMATGraphSource::NumberOfEdges [protected] |
Definition at line 162 of file vtkPBGLRMATGraphSource.h.
double vtkPBGLRMATGraphSource::A [protected] |
Definition at line 163 of file vtkPBGLRMATGraphSource.h.
double vtkPBGLRMATGraphSource::B [protected] |
Definition at line 164 of file vtkPBGLRMATGraphSource.h.
double vtkPBGLRMATGraphSource::C [protected] |
Definition at line 165 of file vtkPBGLRMATGraphSource.h.
double vtkPBGLRMATGraphSource::D [protected] |
Definition at line 166 of file vtkPBGLRMATGraphSource.h.
bool vtkPBGLRMATGraphSource::IncludeEdgeWeights [protected] |
Definition at line 167 of file vtkPBGLRMATGraphSource.h.
bool vtkPBGLRMATGraphSource::AllowSelfLoops [protected] |
Definition at line 168 of file vtkPBGLRMATGraphSource.h.
bool vtkPBGLRMATGraphSource::GeneratePedigreeIds [protected] |
Definition at line 169 of file vtkPBGLRMATGraphSource.h.
int vtkPBGLRMATGraphSource::Seed [protected] |
Definition at line 170 of file vtkPBGLRMATGraphSource.h.
char* vtkPBGLRMATGraphSource::EdgeWeightArrayName [protected] |
Definition at line 171 of file vtkPBGLRMATGraphSource.h.
char* vtkPBGLRMATGraphSource::VertexPedigreeIdArrayName [protected] |
Definition at line 172 of file vtkPBGLRMATGraphSource.h.
char* vtkPBGLRMATGraphSource::EdgePedigreeIdArrayName [protected] |
Definition at line 173 of file vtkPBGLRMATGraphSource.h.