Documentation of 'Catalano.Graph.AdjacencyMatrix' Java class
AdjacencyMatrix
Catalano.Graph

Class AdjacencyMatrix



  • public class AdjacencyMatrix
    extends java.lang.Object
    Adjacency Matrix.
    • Constructor Detail

      • AdjacencyMatrix

        public AdjacencyMatrix(int edges)
        Initializes a new instance of the AdjacencyMatrix class.
        Parameters:
        edges - Number of the edges.
      • AdjacencyMatrix

        public AdjacencyMatrix(double[][] matrix)
        Initializes a new instance of the AdjacencyMatrix class.
        Parameters:
        matrix - Matrix.
    • Method Detail

      • getData

        public double[][] getData()
        Get data from the adjacency matrix.
        Returns:
        Data.
      • getNumberOfNodes

        public int getNumberOfNodes()
        Get number of nodes.
        Returns:
        Number of nodes.
      • getAverageDegree

        public double getAverageDegree()
        Computes the average degree of a node in a graph.
        Returns:
        Average degree.
      • getLinkDensity

        public double getLinkDensity()
        Computes the link density of a graph.
        Returns:
        Link density.
      • getNumberOfEdges

        public int getNumberOfEdges()
        Get number of edges.
        Returns:
        Number of edges.
      • getNumberOfSelfLoops

        public int getNumberOfSelfLoops()
        Get Number of self loops in the graph.
        Returns:
        Number of self loops.
      • setData

        public void setData(double[][] data)
        Set data in the adjacency matrix.
        Parameters:
        data - Data.
      • getMaxDegree

        public int getMaxDegree()
        Get the maximum degree.
        Returns:
        Maximum degree.
      • getEdgeByMaxDegree

        public int getEdgeByMaxDegree()
        Get edge by maximum degree.
        Returns:
        Edge.
      • CreateStochasticMatrix

        public static double[][] CreateStochasticMatrix(double[][] matrix)
        Create stochastic matrix.
        Parameters:
        matrix - Matrix.
        Returns:
        Stochastic matrix.
      • setStochasticMatrix

        public void setStochasticMatrix()
        Create stochastic matrix.
      • isSymmetric

        public boolean isSymmetric()
        Check if the adjacency matrix is symmetric.
        Returns:
        True if is symmetric, otherwise false.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.