edu.stanford.math.plex4.graph.random
public class HierarchicalERGraph extends BinaryHierarchicalGraph
GraphInstanceGenerator.ImplementationType| Modifier and Type | Field and Description |
|---|---|
protected double |
erParameter |
protected int |
hgLeafCount |
protected int |
rootedGraphSize |
debugFlag, k, maxProbability, numNodesgraphImplementation, implementationType| Constructor and Description |
|---|
HierarchicalERGraph(int n,
int m,
double maxProbability,
double erParameter)
Note: n and m should each be a power of 2
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
getERHierarchyLevelCount(int totalLevels) |
double |
getErParameter() |
int |
getHgLeafCount() |
protected double[] |
getProbabilities(int k,
double dampingFactor)
We need one probability for each potential common ancestor depth
d=1..k-1.
|
int |
getRootedGraphSize() |
protected static int |
roundUpToPowerOf2(int m) |
java.lang.String |
toString() |
construct, constructEdges, debug, generate, getProbabilities, getTreeDepthinitializeGraph, setImplementationTypeprotected int rootedGraphSize
protected int hgLeafCount
protected double erParameter
public HierarchicalERGraph(int n,
int m,
double maxProbability,
double erParameter)
n - - the number of hierarchical graph leaves (this parameter is
rounded up to the nearest power of 2)m - - the size of the ER graph rooted at each hierarchical graph
leaf (this parameter is rounded up to the nearest power of 2)maxProbability - erParameter - protected static int roundUpToPowerOf2(int m)
protected double[] getProbabilities(int k,
double dampingFactor)
getProbabilities in class BinaryHierarchicalGraphk - a value such that (2^k <= n <= (2^{k+1})-1)dampingFactor - a scaling factor in the open set (0,1)protected int getERHierarchyLevelCount(int totalLevels)
public java.lang.String toString()
toString in class BinaryHierarchicalGraphpublic double getErParameter()
public int getHgLeafCount()
public int getRootedGraphSize()