pygel::RandomGraphs::DirectedPowerLawRandomGraph::DirectedPowerLawRandomGraph Class Reference
[Random Graphs]

Inheritance diagram for pygel::RandomGraphs::DirectedPowerLawRandomGraph::DirectedPowerLawRandomGraph:

pygel::Graph::NumberedEdgeDirectedGraph::NumberedEdgeDirectedGraph pygel::Graph::AbstractGraph::AbstractGraph

List of all members.


Detailed Description

Generates a synthetic Web graph or Power Law graph using an RMAT algorithm.

Public Member Functions

def __init__
 Constructs an empty graph.
def setProbs
 Sets the probability with which quadrants in an adjacency matrix are chosen.
def generate
 Generates a the graph.
def populate
 Populate graph with edges generated after a call to DirectedPowerLawRandomGraph::generate.
def writeEdges
 Write edges to file.

Public Attributes

 graphSize
 Number of vertices to be considered for generation.
 noOfEdges
 Number of edges to generate.
 probA
 Parameters of the RMAT algorithm.
 probB
 Probability of choosing quadrant B.
 probC
 Probability of choosing quadrant C.
 probD
 Probability of choosing quadrant D.
 serialEdgeList
 Temporary storage of edges.
 debug
 Debug flag.
 startVertX
 endVertX
 startVertY
 endVertY

Member Function Documentation

def pygel::RandomGraphs::DirectedPowerLawRandomGraph::DirectedPowerLawRandomGraph::__init__ (   self,
  size,
  noOfEdges 
)

Constructs an empty graph.

Parameters:
size Number of vertices to be considered for generation
noOfEdges Number of edges to generate

def pygel::RandomGraphs::DirectedPowerLawRandomGraph::DirectedPowerLawRandomGraph::setProbs (   self,
  probA,
  probB,
  probC,
  probD 
)

Sets the probability with which quadrants in an adjacency matrix are chosen.

Parameters:
probA Probability of choosing quadrant A
probB Probability of choosing quadrant B
probC Probability of choosing quadrant C
probD Probability of choosing quadrant D
Exceptions:
PackageExceptions::DistError 

def pygel::RandomGraphs::DirectedPowerLawRandomGraph::DirectedPowerLawRandomGraph::generate (   self,
  noOfThreads,
  noSelfLoops 
)

Generates a the graph.

Heart of web graph generation algorithm. Each thread gets an equal number of nodes to generate.

Parameters:
noOfThreads Number of threads to spawn for the graph generation. More threads does not correspond to fast generation
noSelfLoops If true (set to 1) self loops are discarded in the resulting graph.

def pygel::RandomGraphs::DirectedPowerLawRandomGraph::DirectedPowerLawRandomGraph::populate (   self  ) 

Populate graph with edges generated after a call to DirectedPowerLawRandomGraph::generate.

You should call this method before you can use any of the non-overridden method in Graph::NumberedEdgeDirectedGraph

def pygel::RandomGraphs::DirectedPowerLawRandomGraph::DirectedPowerLawRandomGraph::writeEdges (   self,
  fileName,
  format 
)

Write edges to file.

Parameters:
fileName File name to store edges
format Format of output file. Can take values:
'simple' = simple format
'dot' = format compatible with 'dot' command 'csv' = comma separated value format

Reimplemented from pygel::Graph::NumberedEdgeDirectedGraph::NumberedEdgeDirectedGraph.


Member Data Documentation

Parameters of the RMAT algorithm.

Decide the probability with which quadrants in an adjacency matrix are chosen

Todo:
Add description about choosing these probabilities
Probability of choosing quadrant A

Temporary storage of edges.

Maintained for achieving performance


Generated on Sat Dec 13 02:15:46 2008 for Python Webgraph Generator by  doxygen 1.5.6