public final class DAGraphFactory extends Object
DAGraphFactory.
Modifier and Type | Method and Description |
---|---|
DAGraph<Integer,?> |
divisors(int number)
Generates the directed asyclic graph (DAG) of divisors for integers included betwwen 2 and the specified value.
|
static DAGraphFactory |
getInstance()
Return the singleton instance of this class.
|
DAGraph<Integer,?> |
random(int size)
Generates a random directed graph of size nodes.
|
DAGraph<Integer,?> |
random(int size,
double threshold)
Generates a random directed and acyclic graph (DAG) of size nodes.
|
public static DAGraphFactory getInstance()
Return the singleton instance of this class.
public DAGraph<Integer,?> divisors(int number)
Generates the directed asyclic graph (DAG) of divisors for integers included betwwen 2 and the specified value.
In this DAG, nodes corresponds to the integers, and there is an edge between two integers if and only if the second one is divisible by the first one.
number
- the maximal integerpublic DAGraph<Integer,?> random(int size, double threshold)
Generates a random directed and acyclic graph (DAG) of size nodes.
size
- the number of nodes of the generated graphthreshold
- the threshold to generate an edgeCopyright © 2010–2016 The Galactic Organization. All rights reserved.