es.yrbcn.graph.triangles
Class SamplingTrianglesAlgorithm
java.lang.Object
es.yrbcn.graph.triangles.TrianglesAlgorithm
es.yrbcn.graph.triangles.SamplingTrianglesAlgorithm
public class SamplingTrianglesAlgorithm
- extends TrianglesAlgorithm
Constructor Summary |
SamplingTrianglesAlgorithm(ImmutableGraph graph,
int seed,
short maxDistance)
Creates a new TrianglesAlgorithm run; the algorithm is a functional
ranking in which the operator used is OR |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_SAMPLE_SIZE
public static final int DEFAULT_SAMPLE_SIZE
- See Also:
- Constant Field Values
sampledNodeid
public int[] sampledNodeid
sampledTriangles
public int[] sampledTriangles
sampledHash
public Hashtable<Integer,Integer> sampledHash
sampleSize
public int sampleSize
sampledDegree
public int[] sampledDegree
sampledNeighbors
public int[] sampledNeighbors
sampledNeighborsListStart
public int[] sampledNeighborsListStart
maxDegreeInGraph
public int maxDegreeInGraph
SamplingTrianglesAlgorithm
public SamplingTrianglesAlgorithm(ImmutableGraph graph,
int seed,
short maxDistance)
- Creates a new TrianglesAlgorithm run; the algorithm is a functional
ranking in which the operator used is OR
- Parameters:
g
- the graph.width
- the number of bits to use (32)seed
- the random seed for the random number generator
setSampleSize
public void setSampleSize(int ss)
setDeterministicSampling
public void setDeterministicSampling(int startingPoint)
setRandomSampling
public void setRandomSampling()
init
public void init()
- Description copied from class:
TrianglesAlgorithm
- Initializes one run of the algorithm
- Specified by:
init
in class TrianglesAlgorithm
step
public void step()
- Calculation step; at each step I should have an estimation of the
clustering coefficient for that particular step
- Specified by:
step
in class TrianglesAlgorithm
countTriangles
public void countTriangles()
- Specified by:
countTriangles
in class TrianglesAlgorithm
dumpSample
public void dumpSample()
- Shows sampled elements