public class BitbasedTrianglesAlgorithm extends TrianglesAlgorithm
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE |
int |
currentPass |
static int |
DEFAULT_MAX_PASSES |
DEFAULT_WIDTH, done, graph, maxDistance, numNodes, random, triangles| Constructor and Description |
|---|
BitbasedTrianglesAlgorithm(it.unimi.dsi.webgraph.ImmutableGraph graph,
int seed,
short maxDistance) |
| Modifier and Type | Method and Description |
|---|---|
void |
countTriangles() |
void |
destroyHashFunction() |
int |
getHash(int nodeid) |
void |
init()
Initializes one run of the algorithm
|
void |
initHashFunction(int pass)
Uses a lookup table for the hash function number x
|
void |
setMaxPasses(int mp) |
void |
step()
Does one step of the algorithm; this is called until done()
|
donepublic static final int DEFAULT_MAX_PASSES
public static final int BUFFER_SIZE
public int currentPass
public BitbasedTrianglesAlgorithm(it.unimi.dsi.webgraph.ImmutableGraph graph,
int seed,
short maxDistance)
public void destroyHashFunction()
public void init()
TrianglesAlgorithminit in class TrianglesAlgorithmpublic void step()
throws IOException
TrianglesAlgorithmstep in class TrianglesAlgorithmFileNotFoundExceptionIOExceptionpublic void countTriangles()
throws IOException
countTriangles in class TrianglesAlgorithmIOExceptionpublic int getHash(int nodeid)
public void initHashFunction(int pass)
public void setMaxPasses(int mp)