GraphMatrix
use Graph::GraphMatrix;
use Graph::GraphMatrix qw(:all);
GraphMatrix class provides the following methods:
new, GenerateAdjacencyMatrix, GenerateAdmittanceMatrix, GenerateDegreeMatrix, GenerateDistanceMatrix, GenerateIncidenceMatrix, GenerateKirchhoffMatrix, GenerateLaplacianMatrix, GenerateNormalizedLaplacianMatrix, GenerateSiedelAdjacencyMatrix, GetColumnIDs, GetMatrix, GetMatrixType, GetRowIDs, StringifyGraphMatrix
Using specified Graph, new method creates a new GraphMatrix and returns newly created GraphMatrix.
Generates a new AdjacencyGraphMatrix for specified Graph and returns AdjacencyGraphMatrix.
For a simple graph G with n vertices, the adjacency matrix for G is a n x n square matrix and its elements Mij are:
Generates a new AdmittanceGraphMatrix for specified Graph and returns AdmittanceGraphMatrix.
AdmittanceMatrix is another name for LaplacianMatrix.
Generates a new DegreeGraphMatrix for specified Graph and returns DegreeGraphMatrix.
For a simple graph G with n vertices, the degree matrix for G is a n x n square matrix and its elements Mij are:
Generates a new DistanceGraphMatrix for specified Graph using Floyd-Marshall algorithm [Ref 67] and returns DistanceGraphMatrix.
For a simple graph G with n vertices, the distance matrix for G is a n x n square matrix and its elements Mij are:
In the final matrix, value of constant BigNumber defined in Constants.pm module corresponds to vertices with no edges.
Generates a new IncidenceGraphMatrix for specified Graph and returns IncidenceGraphMatrix.
For a simple graph G with n vertices and e edges, the incidence matrix for G is a n x e matrix its elements Mij are:
Generates a new KirchhoffGraphMatrix for specified Graph and returns KirchhoffGraphMatrix.
KirchhoffMatrix is another name for LaplacianMatrix.
Generates a new LaplacianGraphMatrix for specified Graph and returns LaplacianGraphMatrix.
For a simple graph G with n vertices, the Laplacian matrix for G is a n x n square matrix and its elements Mij are:
The Laplacian matrix is the difference between the degree matrix and adjacency matrix.
Generates a new NormalizedLaplacianGraphMatrix for specified Graph and returns NormalizedLaplacianGraphMatrix.
For a simple graph G with n vertices, the normalized Laplacian matrix L for G is a n x n square matrix and its elements Lij are:
Generates a new SiedelAdjacencyGraphMatrix for specified Graph and returns SiedelAdjacencyGraphMatrix.
For a simple graph G with n vertices, the Siedal adjacency matrix for G is a n x n square matrix and its elements Mij are:
Returns an array containing any specified column IDs for GraphMatrix.
Returns Matrix object corresponding to GraphMatrix object.
Returns MatrixType of GraphMatrix.
Returns an array containing any specified rowIDs IDs for GraphMatrix.
Returns a string containing information about GraphMatrix object.
Constants.pm, Graph.pm, Matrix.pm
Copyright (C) 2024 Manish Sud. All rights reserved.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.