Package | Description |
---|---|
it.uniupo.drawLib | |
it.uniupo.graphLib | |
it.uniupo.quizLib |
Modifier and Type | Method and Description |
---|---|
void |
DrawGraph.setGraph(GraphInterface g,
boolean nodeIdMustBeWritten) |
Constructor and Description |
---|
DrawGraph(GraphInterface g,
boolean directed,
boolean weighted,
boolean nodeIdMustBeWritten) |
DrawGraph(GraphInterface g,
boolean directed,
boolean weighted,
boolean nodeIdMustBeWritten,
boolean toBeSkewed) |
Modifier and Type | Class and Description |
---|---|
class |
DirectedGraph |
class |
Graph |
class |
UndirectedGraph |
Modifier and Type | Method and Description |
---|---|
static GraphInterface |
GraphUtils.copy(GraphInterface inGraph)
Makes a copy of a graph
|
GraphInterface |
UndirectedGraph.create() |
GraphInterface |
GraphInterface.create()
Creates a new object of the same class as this, with the same number of nodes and no edges
|
abstract GraphInterface |
Graph.create() |
GraphInterface |
DirectedGraph.create() |
GraphInterface |
UndirectedGraph.create(int order) |
GraphInterface |
GraphInterface.create(int order)
Creates a new object of the same class as this, with order nodes and no edges
|
abstract GraphInterface |
Graph.create(int order) |
GraphInterface |
DirectedGraph.create(int order) |
static GraphInterface |
GraphUtils.toggleDirected(GraphInterface inGraph)
If the input is a directed graph it returns an undirected one,
if the input graph is undirected, it returns a directed graph
|
Modifier and Type | Method and Description |
---|---|
static GraphInterface |
GraphUtils.copy(GraphInterface inGraph)
Makes a copy of a graph
|
static GraphInterface |
GraphUtils.toggleDirected(GraphInterface inGraph)
If the input is a directed graph it returns an undirected one,
if the input graph is undirected, it returns a directed graph
|
Modifier and Type | Class and Description |
---|---|
class |
OrderedDigraph |
class |
OrderedGraph |
class |
OrderedUndigraph |
class |
ReverseOrderedDigraph |
class |
ReverseOrderedUndigraph |
Modifier and Type | Method and Description |
---|---|
static GraphInterface |
GraphGen.almostDagGen(int numberOfNodes,
double minDensity,
double maxDensity,
int extraEdges)
Returns a random simple DAG containing numberOfNodes vertices and a random number of edges,
(number of nodes \leq number of edges \lt 3/2 number of nodes)
Note: it is not uniformly selected at random among all such DAGs.
|
GraphInterface |
ReverseOrderedUndigraph.create() |
GraphInterface |
ReverseOrderedDigraph.create() |
GraphInterface |
OrderedUndigraph.create() |
GraphInterface |
OrderedDigraph.create() |
GraphInterface |
ReverseOrderedUndigraph.create(int size) |
GraphInterface |
ReverseOrderedDigraph.create(int size) |
GraphInterface |
OrderedUndigraph.create(int size) |
GraphInterface |
OrderedDigraph.create(int size) |
static GraphInterface |
GraphGen.dagify(int numNodes,
int numEdges)
Returns a random simple DAG containing numNodes vertices and numEdges edges.
|
static GraphInterface |
QuizUtils.removeBackEdgesDirected(GraphInterface dirG) |
static GraphInterface |
QuizUtils.reverseSort(GraphInterface inGraph)
If the input graph is an UndirectedGraph, it returns a ReverseOrderedUndigraph;
if it is a DirectedGraph, it returns an ReverseOrderedDigraph
|
static GraphInterface |
GraphGen.rootedOutDAG(int numNodes,
int numEdges,
int fixed,
int minWeight,
int maxWeight,
boolean uniqueWeights)
Returns a random rooted-out DAG on numNodes vertices and numEdges edges.
|
static GraphInterface |
GraphGen.rootedOutDagGen(int numberOfNodes,
int root)
Returns a random rooted-out DAG on numberOfNodes vertices and a random number of edges
(number of nodes \leq number of edges \lt 3/2 number of nodes), with non negative weights
A rooted out-tree is a DAG in which every vertex is reachable from a
single vertex.
|
static GraphInterface |
GraphGen.rootedOutDagGen(int numberOfNodes,
int root,
boolean negWeights,
boolean uniqueWeights)
Returns a random rooted-out DAG on numberOfNodes vertices and a random number of edges
(number of nodes \leq number of edges \lt 3/2 number of nodes), with weights as specified by the
parameters
A rooted out-tree is a DAG in which every vertex is reachable from a
single vertex.
|
static GraphInterface |
GraphGen.rootedOutDagGen(int numberOfNodes,
int numEdges,
int root,
int minWeight,
int maxWeight,
boolean uniqueWeights)
Returns a random rooted-out DAG on numberOfNodes vertices and a specified number of edges
(if the specified number is not positive, 1 is substituted; if it is \gt numberOfNodes*(numberOfNodes-1) / 2,
the maximum is substituted), with weights as specified by the
parameters
A rooted out-tree is a DAG in which every vertex is reachable from a
single vertex.
|
static GraphInterface |
GraphGen.simpleDagGen(int numberOfNodes,
double minDensity,
double maxDensity) |
static GraphInterface |
QuizUtils.sort(GraphInterface inGraph)
If the input graph is an UndirectedGraph, it returns an OrderedUndigraph;
if it is a DirectedGraph, it returns an OrderedDigraph
|
static GraphInterface |
QuizUtils.toggleDirected(GraphInterface inGraph)
If the input is a(n ordered) directed graph it returns an (ordered) undirected one,
if the input graph is (ordered) undirected, it returns a (ordered) directed graph
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
QuizUtils.descrizGrafo(GraphInterface g,
boolean directed,
boolean weighted) |
static java.lang.String |
QuizUtils.descrizGrafo(GraphInterface g,
boolean directed,
boolean weighted,
boolean numerato) |
static java.lang.String |
QuizUtils.descrizGrafoPerCluster(GraphInterface g) |
static GraphInterface |
QuizUtils.removeBackEdgesDirected(GraphInterface dirG) |
static GraphInterface |
QuizUtils.reverseSort(GraphInterface inGraph)
If the input graph is an UndirectedGraph, it returns a ReverseOrderedUndigraph;
if it is a DirectedGraph, it returns an ReverseOrderedDigraph
|
static GraphInterface |
QuizUtils.sort(GraphInterface inGraph)
If the input graph is an UndirectedGraph, it returns an OrderedUndigraph;
if it is a DirectedGraph, it returns an OrderedDigraph
|
static GraphInterface |
QuizUtils.toggleDirected(GraphInterface inGraph)
If the input is a(n ordered) directed graph it returns an (ordered) undirected one,
if the input graph is (ordered) undirected, it returns a (ordered) directed graph
|
Constructor and Description |
---|
OrderedDigraph(GraphInterface g) |
OrderedUndigraph(GraphInterface g) |
ReverseOrderedDigraph(GraphInterface g) |
ReverseOrderedUndigraph(GraphInterface g) |