Package es.uam.eps.ir.relison.metrics
Class GraphMetricsTest
java.lang.Object
es.uam.eps.ir.relison.metrics.GraphMetricsTest
public class GraphMetricsTest
extends java.lang.Object
Automated unit tests for metrics that affect the whole network.
-
Field Summary
Fields Modifier and Type Field Description private DirectedGraph<java.lang.Integer>
directedComplete
Directed complete graph.private DirectedGraph<java.lang.Integer>
directedEmpty
Directed empty graph (only nodes).private DirectedGraph<java.lang.Integer>
directedNonConnected
Directed disconnected graph (not even weakly).private DirectedGraph<java.lang.Integer>
directedStronglyConnected
Directed strongly connected graph.private DirectedGraph<java.lang.Integer>
directedWeaklyConnected
Directed weakly connected graph.private UndirectedGraph<java.lang.Integer>
undirectedComplete
Undirected complete graph.private UndirectedGraph<java.lang.Integer>
undirectedConnected
Undirected connected graph.private UndirectedGraph<java.lang.Integer>
undirectedEmpty
Undirected empty graph.private UndirectedGraph<java.lang.Integer>
undirectedNonConnected
Undirected disconnected graph. -
Constructor Summary
Constructors Constructor Description GraphMetricsTest()
-
Method Summary
Modifier and Type Method Description void
clusteringCoefficient()
Tests the values of clustering coefficientvoid
degreeGini()
Tests the values of the Gini index for the degree.void
density()
Tests the density values of the graphsvoid
numEdges()
Tests the number of edges of the graphvoid
pairGini()
Tests the pair Gini of the degrees of the graph.void
setUp()
static void
setUpClass()
void
tearDown()
static void
tearDownClass()
-
Field Details
-
directedStronglyConnected
Directed strongly connected graph. -
directedWeaklyConnected
Directed weakly connected graph. -
directedNonConnected
Directed disconnected graph (not even weakly). -
undirectedConnected
Undirected connected graph. -
undirectedNonConnected
Undirected disconnected graph. -
directedComplete
Directed complete graph. -
directedEmpty
Directed empty graph (only nodes). -
undirectedComplete
Undirected complete graph. -
undirectedEmpty
Undirected empty graph.
-
-
Constructor Details
-
GraphMetricsTest
public GraphMetricsTest()
-
-
Method Details
-
setUpClass
public static void setUpClass() -
tearDownClass
public static void tearDownClass() -
setUp
public void setUp() -
tearDown
public void tearDown() -
clusteringCoefficient
public void clusteringCoefficient()Tests the values of clustering coefficient -
degreeGini
public void degreeGini()Tests the values of the Gini index for the degree. -
density
public void density()Tests the density values of the graphs -
pairGini
public void pairGini()Tests the pair Gini of the degrees of the graph. Since none of the test graphs are multigraphs, then, the value for all of them is NaN. -
numEdges
public void numEdges()Tests the number of edges of the graph
-