public class AdjacencyMatrix
extends java.lang.Object
| Constructor and Description |
|---|
AdjacencyMatrix(double[][] matrix)
Initializes a new instance of the AdjacencyMatrix class.
|
AdjacencyMatrix(int edges)
Initializes a new instance of the AdjacencyMatrix class.
|
| Modifier and Type | Method and Description |
|---|---|
static double[][] |
CreateStochasticMatrix(double[][] matrix)
Create stochastic matrix.
|
double |
getAverageDegree()
Computes the average degree of a node in a graph.
|
double[][] |
getData()
Get data from the adjacency matrix.
|
int |
getEdgeByMaxDegree()
Get edge by maximum degree.
|
double |
getLinkDensity()
Computes the link density of a graph.
|
int |
getMaxDegree()
Get the maximum degree.
|
int |
getNumberOfEdges()
Get number of edges.
|
int |
getNumberOfNodes()
Get number of nodes.
|
int |
getNumberOfSelfLoops()
Get Number of self loops in the graph.
|
boolean |
isSymmetric()
Check if the adjacency matrix is symmetric.
|
void |
setData(double[][] data)
Set data in the adjacency matrix.
|
void |
setStochasticMatrix()
Create stochastic matrix.
|
public AdjacencyMatrix(int edges)
edges - Number of the edges.public AdjacencyMatrix(double[][] matrix)
matrix - Matrix.public double[][] getData()
public int getNumberOfNodes()
public double getAverageDegree()
public double getLinkDensity()
public int getNumberOfEdges()
public int getNumberOfSelfLoops()
public void setData(double[][] data)
data - Data.public int getMaxDegree()
public int getEdgeByMaxDegree()
public static double[][] CreateStochasticMatrix(double[][] matrix)
matrix - Matrix.public void setStochasticMatrix()
public boolean isSymmetric()