|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.webgraph.algo.SampleDistanceCumulativeDistributionFunction
public class SampleDistanceCumulativeDistributionFunction
Samples a graph via breadth-first visits.
This class uses an instance of ParallelBreadthFirstVisit
to ensure a high degree of parallelism (see its
documentation for memory requirements).
Constructor Summary | |
---|---|
SampleDistanceCumulativeDistributionFunction()
|
Method Summary | |
---|---|
static void |
main(String[] arg)
|
protected static int[][] |
sample(ImmutableGraph graph,
int k,
boolean naive,
int threads)
Samples a graph via breadth-first visits. |
protected static int[][] |
sample(ImmutableGraph graph,
int k,
int threads)
Samples a graph via breadth-first visits. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SampleDistanceCumulativeDistributionFunction()
Method Detail |
---|
protected static int[][] sample(ImmutableGraph graph, int k, int threads)
This method will estimate the cumulative distribution function of distances of
a strongly connected graph. to which a randomly extracted node belongs.
If there is more than one connected component, a warning will be given, specifying the size of the component. An IllegalStateException
will be thrown if the algorithm detects that the graph is not strongly connected, but this is not guaranteed to happen.
graph
- a graph.k
- a number of samples.threads
- the requested number of threads (0 for Runtime.availableProcessors()
).
protected static int[][] sample(ImmutableGraph graph, int k, boolean naive, int threads)
This method will estimate the cumulative distribution function of distances of
a strongly connected graph. If there is more than one connected component, a warning will be given, specifying the size of the component. An IllegalStateException
will be thrown if the algorithm detects that the graph is not strongly connected, but this is not guaranteed to happen.
graph
- a graph.k
- a number of samples.naive
- sample naively: do not stop sampling even when detecting the lack of strong connection.threads
- the requested number of threads (0 for Runtime.availableProcessors()
).
public static void main(String[] arg) throws IOException, JSAPException
IOException
JSAPException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |