Mercurial > repos > deepakjadmin > mayatool3_test3
comparison mayachemtools/docs/modules/txt/GraphMatrix.txt @ 0:73ae111cf86f draft
Uploaded
author | deepakjadmin |
---|---|
date | Wed, 20 Jan 2016 11:55:01 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:73ae111cf86f |
---|---|
1 NAME | |
2 GraphMatrix | |
3 | |
4 SYNOPSIS | |
5 use Graph::GraphMatrix; | |
6 | |
7 use Graph::GraphMatrix qw(:all); | |
8 | |
9 DESCRIPTION | |
10 GraphMatrix class provides the following methods: | |
11 | |
12 new, GenerateAdjacencyMatrix, GenerateAdmittanceMatrix, | |
13 GenerateDegreeMatrix, GenerateDistanceMatrix, GenerateIncidenceMatrix, | |
14 GenerateKirchhoffMatrix, GenerateLaplacianMatrix, | |
15 GenerateNormalizedLaplacianMatrix, GenerateSiedelAdjacencyMatrix, | |
16 GetColumnIDs, GetMatrix, GetMatrixType, GetRowIDs, StringifyGraphMatrix | |
17 | |
18 METHODS | |
19 new | |
20 $NewGraphMatrix = new Graph::GraphMatrix($Graph); | |
21 | |
22 Using specified *Graph*, new method creates a new GraphMatrix and | |
23 returns newly created GraphMatrix. | |
24 | |
25 GenerateAdjacencyMatrix | |
26 $AdjacencyGraphMatrix = $GraphMatrix->GenerateAdjacencyMatrix(); | |
27 | |
28 Generates a new *AdjacencyGraphMatrix* for specified Graph and | |
29 returns *AdjacencyGraphMatrix*. | |
30 | |
31 For a simple graph G with n vertices, the adjacency matrix for G is | |
32 a n x n square matrix and its elements Mij are: | |
33 | |
34 . 0 if i == j | |
35 . 1 if i != j and vertex Vi is adjacent to vertex Vj | |
36 . 0 if i != j and vertex Vi is not adjacent to vertex Vj | |
37 | |
38 GenerateAdmittanceMatrix | |
39 $AdmittanceGraphMatrix = $GraphMatrix->GenerateAdmittanceMatrix(); | |
40 | |
41 Generates a new *AdmittanceGraphMatrix* for specified Graph and | |
42 returns *AdmittanceGraphMatrix*. | |
43 | |
44 AdmittanceMatrix is another name for LaplacianMatrix. | |
45 | |
46 GenerateDegreeMatrix | |
47 $DegreeGraphMatrix = $GraphMatrix->GenerateDegreeMatrix(); | |
48 | |
49 Generates a new *DegreeGraphMatrix* for specified Graph and returns | |
50 *DegreeGraphMatrix*. | |
51 | |
52 For a simple graph G with n vertices, the degree matrix for G is a n | |
53 x n square matrix and its elements Mij are: | |
54 | |
55 . deg(Vi) if i == j and deg(Vi) is the degree of vertex Vi | |
56 . 0 otherwise | |
57 | |
58 GenerateDistanceMatrix | |
59 $DistanceGraphMatrix = $GraphMatrix->GenerateDistanceMatrix(); | |
60 | |
61 Generates a new *DistanceGraphMatrix* for specified Graph using | |
62 Floyd-Marshall algorithm [Ref 67] and returns *DistanceGraphMatrix*. | |
63 | |
64 For a simple graph G with n vertices, the distance matrix for G is a | |
65 n x n square matrix and its elements Mij are: | |
66 | |
67 . 0 if i == j | |
68 . d if i != j and d is the shortest distance between vertex Vi and vertex Vj | |
69 | |
70 In the final matrix, value of constant BigNumber defined in | |
71 Constants.pm module corresponds to vertices with no edges. | |
72 | |
73 GenerateIncidenceMatrix | |
74 $IncidenceGraphMatrix = $GraphMatrix->GenerateIncidenceMatrix(); | |
75 | |
76 Generates a new *IncidenceGraphMatrix* for specified Graph and | |
77 returns *IncidenceGraphMatrix*. | |
78 | |
79 For a simple graph G with n vertices and e edges, the incidence | |
80 matrix for G is a n x e matrix its elements Mij are: | |
81 | |
82 . 1 if vertex Vi and the edge Ej are incident; in other words, Vi and Ej are related | |
83 . 0 otherwise | |
84 | |
85 GenerateKirchhoffMatrix | |
86 $KirchhoffGraphMatrix = $GraphMatrix->GenerateKirchhoffMatrix(); | |
87 | |
88 Generates a new *KirchhoffGraphMatrix* for specified Graph and | |
89 returns *KirchhoffGraphMatrix*. | |
90 | |
91 KirchhoffMatrix is another name for LaplacianMatrix. | |
92 | |
93 GenerateLaplacianMatrix | |
94 $LaplacianGraphMatrix = $GraphMatrix->GenerateLaplacianMatrix(); | |
95 | |
96 Generates a new *LaplacianGraphMatrix* for specified Graph and | |
97 returns *LaplacianGraphMatrix*. | |
98 | |
99 For a simple graph G with n vertices, the Laplacian matrix for G is | |
100 a n x n square matrix and its elements Mij are: | |
101 | |
102 . deg(Vi) if i == j and deg(Vi) is the degree of vertex Vi | |
103 . -1 if i != j and vertex Vi is adjacent to vertex Vj | |
104 . 0 otherwise | |
105 | |
106 The Laplacian matrix is the difference between the degree matrix and | |
107 adjacency matrix. | |
108 | |
109 GenerateNormalizedLaplacianMatrix | |
110 $NormalizedLaplacianGraphMatrix = $GraphMatrix->GenerateNormalizedLaplacianMatrix(); | |
111 | |
112 Generates a new *NormalizedLaplacianGraphMatrix* for specified Graph | |
113 and returns *NormalizedLaplacianGraphMatrix*. | |
114 | |
115 For a simple graph G with n vertices, the normalized Laplacian | |
116 matrix L for G is a n x n square matrix and its elements Lij are: | |
117 | |
118 . 1 if i == j and deg(Vi) != 0 | |
119 . -1/SQRT(deg(Vi) * deg(Vj)) if i != j and vertex Vi is adjacent to vertex Vj | |
120 . 0 otherwise | |
121 | |
122 GenerateSiedelAdjacencyMatrix | |
123 $SiedelAdjacencyGraphMatrix = $GraphMatrix->GenerateSiedelAdjacencyMatrix(); | |
124 | |
125 Generates a new *SiedelAdjacencyGraphMatrix* for specified Graph and | |
126 returns *SiedelAdjacencyGraphMatrix*. | |
127 | |
128 For a simple graph G with n vertices, the Siedal adjacency matrix | |
129 for G is a n x n square matrix and its elements Mij are: | |
130 | |
131 . 0 if i == j | |
132 . -1 if i != j and vertex Vi is adjacent to vertex Vj | |
133 . 1 if i != j and vertex Vi is not adjacent to vertex Vj | |
134 | |
135 GetColumnIDs | |
136 @ColumnIDs = $GraphMatrix->GetColumnIDs(); | |
137 | |
138 Returns an array containing any specified column IDs for | |
139 *GraphMatrix*. | |
140 | |
141 GetMatrix | |
142 $Matrix = $GraphMatrix->GetMatrix(); | |
143 | |
144 Returns *Matrix* object corresponding to *GraphMatrix* object. | |
145 | |
146 GetMatrixType | |
147 $MatrixType = $GraphMatrix->GetMatrixType(); | |
148 | |
149 Returns MatrixType of *GraphMatrix*. | |
150 | |
151 GetRowIDs | |
152 @RowIDs = $GraphMatrix->GetRowIDs(); | |
153 | |
154 Returns an array containing any specified rowIDs IDs for | |
155 *GraphMatrix*. | |
156 | |
157 StringifyGraphMatrix | |
158 $String = $GraphMatrix->StringifyGraphMatrix(); | |
159 | |
160 Returns a string containing information about *GraphMatrix* object. | |
161 | |
162 AUTHOR | |
163 Manish Sud <msud@san.rr.com> | |
164 | |
165 SEE ALSO | |
166 Constants.pm, Graph.pm, Matrix.pm | |
167 | |
168 COPYRIGHT | |
169 Copyright (C) 2015 Manish Sud. All rights reserved. | |
170 | |
171 This file is part of MayaChemTools. | |
172 | |
173 MayaChemTools is free software; you can redistribute it and/or modify it | |
174 under the terms of the GNU Lesser General Public License as published by | |
175 the Free Software Foundation; either version 3 of the License, or (at | |
176 your option) any later version. | |
177 |