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()
|
done
public 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()
TrianglesAlgorithm
init
in class TrianglesAlgorithm
public void step() throws IOException
TrianglesAlgorithm
step
in class TrianglesAlgorithm
FileNotFoundException
IOException
public void countTriangles() throws IOException
countTriangles
in class TrianglesAlgorithm
IOException
public int getHash(int nodeid)
public void initHashFunction(int pass)
public void setMaxPasses(int mp)