comparison mayachemtools/docs/modules/man3/GraphMatrix.3 @ 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 .\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings. \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 . ds -- \(*W-
28 . ds PI pi
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
31 . ds L" ""
32 . ds R" ""
33 . ds C` ""
34 . ds C' ""
35 'br\}
36 .el\{\
37 . ds -- \|\(em\|
38 . ds PI \(*p
39 . ds L" ``
40 . ds R" ''
41 'br\}
42 .\"
43 .\" Escape single quotes in literal strings from groff's Unicode transform.
44 .ie \n(.g .ds Aq \(aq
45 .el .ds Aq '
46 .\"
47 .\" If the F register is turned on, we'll generate index entries on stderr for
48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
49 .\" entries marked with X<> in POD. Of course, you'll have to process the
50 .\" output yourself in some meaningful fashion.
51 .ie \nF \{\
52 . de IX
53 . tm Index:\\$1\t\\n%\t"\\$2"
54 ..
55 . nr % 0
56 . rr F
57 .\}
58 .el \{\
59 . de IX
60 ..
61 .\}
62 .\"
63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64 .\" Fear. Run. Save yourself. No user-serviceable parts.
65 . \" fudge factors for nroff and troff
66 .if n \{\
67 . ds #H 0
68 . ds #V .8m
69 . ds #F .3m
70 . ds #[ \f1
71 . ds #] \fP
72 .\}
73 .if t \{\
74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
75 . ds #V .6m
76 . ds #F 0
77 . ds #[ \&
78 . ds #] \&
79 .\}
80 . \" simple accents for nroff and troff
81 .if n \{\
82 . ds ' \&
83 . ds ` \&
84 . ds ^ \&
85 . ds , \&
86 . ds ~ ~
87 . ds /
88 .\}
89 .if t \{\
90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
96 .\}
97 . \" troff and (daisy-wheel) nroff accents
98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
105 .ds ae a\h'-(\w'a'u*4/10)'e
106 .ds Ae A\h'-(\w'A'u*4/10)'E
107 . \" corrections for vroff
108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
110 . \" for low resolution devices (crt and lpr)
111 .if \n(.H>23 .if \n(.V>19 \
112 \{\
113 . ds : e
114 . ds 8 ss
115 . ds o a
116 . ds d- d\h'-1'\(ga
117 . ds D- D\h'-1'\(hy
118 . ds th \o'bp'
119 . ds Th \o'LP'
120 . ds ae ae
121 . ds Ae AE
122 .\}
123 .rm #[ #] #H #V #F C
124 .\" ========================================================================
125 .\"
126 .IX Title "GRAPHMATRIX 1"
127 .TH GRAPHMATRIX 1 "2015-03-29" "perl v5.14.2" "MayaChemTools"
128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
129 .\" way too many mistakes in technical documents.
130 .if n .ad l
131 .nh
132 .SH "NAME"
133 GraphMatrix
134 .SH "SYNOPSIS"
135 .IX Header "SYNOPSIS"
136 use Graph::GraphMatrix;
137 .PP
138 use Graph::GraphMatrix qw(:all);
139 .SH "DESCRIPTION"
140 .IX Header "DESCRIPTION"
141 \&\fBGraphMatrix\fR class provides the following methods:
142 .PP
143 new, GenerateAdjacencyMatrix, GenerateAdmittanceMatrix, GenerateDegreeMatrix,
144 GenerateDistanceMatrix, GenerateIncidenceMatrix, GenerateKirchhoffMatrix,
145 GenerateLaplacianMatrix, GenerateNormalizedLaplacianMatrix,
146 GenerateSiedelAdjacencyMatrix, GetColumnIDs, GetMatrix, GetMatrixType, GetRowIDs,
147 StringifyGraphMatrix
148 .SS "\s-1METHODS\s0"
149 .IX Subsection "METHODS"
150 .IP "\fBnew\fR" 4
151 .IX Item "new"
152 .Vb 1
153 \& $NewGraphMatrix = new Graph::GraphMatrix($Graph);
154 .Ve
155 .Sp
156 Using specified \fIGraph\fR, \fBnew\fR method creates a new \fBGraphMatrix\fR and returns
157 newly created \fBGraphMatrix\fR.
158 .IP "\fBGenerateAdjacencyMatrix\fR" 4
159 .IX Item "GenerateAdjacencyMatrix"
160 .Vb 1
161 \& $AdjacencyGraphMatrix = $GraphMatrix\->GenerateAdjacencyMatrix();
162 .Ve
163 .Sp
164 Generates a new \fIAdjacencyGraphMatrix\fR for specified \fBGraph\fR and returns
165 \&\fIAdjacencyGraphMatrix\fR.
166 .Sp
167 For a simple graph G with n vertices, the adjacency matrix for G is a n x n square matrix and
168 its elements Mij are:
169 .Sp
170 .Vb 3
171 \& . 0 if i == j
172 \& . 1 if i != j and vertex Vi is adjacent to vertex Vj
173 \& . 0 if i != j and vertex Vi is not adjacent to vertex Vj
174 .Ve
175 .IP "\fBGenerateAdmittanceMatrix\fR" 4
176 .IX Item "GenerateAdmittanceMatrix"
177 .Vb 1
178 \& $AdmittanceGraphMatrix = $GraphMatrix\->GenerateAdmittanceMatrix();
179 .Ve
180 .Sp
181 Generates a new \fIAdmittanceGraphMatrix\fR for specified \fBGraph\fR and returns
182 \&\fIAdmittanceGraphMatrix\fR.
183 .Sp
184 \&\fBAdmittanceMatrix\fR is another name for \fBLaplacianMatrix\fR.
185 .IP "\fBGenerateDegreeMatrix\fR" 4
186 .IX Item "GenerateDegreeMatrix"
187 .Vb 1
188 \& $DegreeGraphMatrix = $GraphMatrix\->GenerateDegreeMatrix();
189 .Ve
190 .Sp
191 Generates a new \fIDegreeGraphMatrix\fR for specified \fBGraph\fR and returns
192 \&\fIDegreeGraphMatrix\fR.
193 .Sp
194 For a simple graph G with n vertices, the degree matrix for G is a n x n square matrix and
195 its elements Mij are:
196 .Sp
197 .Vb 2
198 \& . deg(Vi) if i == j and deg(Vi) is the degree of vertex Vi
199 \& . 0 otherwise
200 .Ve
201 .IP "\fBGenerateDistanceMatrix\fR" 4
202 .IX Item "GenerateDistanceMatrix"
203 .Vb 1
204 \& $DistanceGraphMatrix = $GraphMatrix\->GenerateDistanceMatrix();
205 .Ve
206 .Sp
207 Generates a new \fIDistanceGraphMatrix\fR for specified \fBGraph\fR using Floyd-Marshall
208 algorithm [Ref 67] and returns \fIDistanceGraphMatrix\fR.
209 .Sp
210 For a simple graph G with n vertices, the distance matrix for G is a n x n square matrix and
211 its elements Mij are:
212 .Sp
213 .Vb 2
214 \& . 0 if i == j
215 \& . d if i != j and d is the shortest distance between vertex Vi and vertex Vj
216 .Ve
217 .Sp
218 In the final matrix, value of constant \fBBigNumber\fR defined in \fBConstants.pm\fR module
219 corresponds to vertices with no edges.
220 .IP "\fBGenerateIncidenceMatrix\fR" 4
221 .IX Item "GenerateIncidenceMatrix"
222 .Vb 1
223 \& $IncidenceGraphMatrix = $GraphMatrix\->GenerateIncidenceMatrix();
224 .Ve
225 .Sp
226 Generates a new \fIIncidenceGraphMatrix\fR for specified \fBGraph\fR and returns
227 \&\fIIncidenceGraphMatrix\fR.
228 .Sp
229 For a simple graph G with n vertices and e edges, the incidence matrix for G is a n x e matrix
230 its elements Mij are:
231 .Sp
232 .Vb 2
233 \& . 1 if vertex Vi and the edge Ej are incident; in other words, Vi and Ej are related
234 \& . 0 otherwise
235 .Ve
236 .IP "\fBGenerateKirchhoffMatrix\fR" 4
237 .IX Item "GenerateKirchhoffMatrix"
238 .Vb 1
239 \& $KirchhoffGraphMatrix = $GraphMatrix\->GenerateKirchhoffMatrix();
240 .Ve
241 .Sp
242 Generates a new \fIKirchhoffGraphMatrix\fR for specified \fBGraph\fR and returns
243 \&\fIKirchhoffGraphMatrix\fR.
244 .Sp
245 \&\fBKirchhoffMatrix\fR is another name for \fBLaplacianMatrix\fR.
246 .IP "\fBGenerateLaplacianMatrix\fR" 4
247 .IX Item "GenerateLaplacianMatrix"
248 .Vb 1
249 \& $LaplacianGraphMatrix = $GraphMatrix\->GenerateLaplacianMatrix();
250 .Ve
251 .Sp
252 Generates a new \fILaplacianGraphMatrix\fR for specified \fBGraph\fR and returns
253 \&\fILaplacianGraphMatrix\fR.
254 .Sp
255 For a simple graph G with n vertices, the Laplacian matrix for G is a n x n square matrix and
256 its elements Mij are:
257 .Sp
258 .Vb 3
259 \& . deg(Vi) if i == j and deg(Vi) is the degree of vertex Vi
260 \& . \-1 if i != j and vertex Vi is adjacent to vertex Vj
261 \& . 0 otherwise
262 .Ve
263 .Sp
264 The Laplacian matrix is the difference between the degree matrix and adjacency matrix.
265 .IP "\fBGenerateNormalizedLaplacianMatrix\fR" 4
266 .IX Item "GenerateNormalizedLaplacianMatrix"
267 .Vb 1
268 \& $NormalizedLaplacianGraphMatrix = $GraphMatrix\->GenerateNormalizedLaplacianMatrix();
269 .Ve
270 .Sp
271 Generates a new \fINormalizedLaplacianGraphMatrix\fR for specified \fBGraph\fR and returns
272 \&\fINormalizedLaplacianGraphMatrix\fR.
273 .Sp
274 For a simple graph G with n vertices, the normalized Laplacian matrix L for G is a n x n square
275 matrix and its elements Lij are:
276 .Sp
277 .Vb 3
278 \& . 1 if i == j and deg(Vi) != 0
279 \& . \-1/SQRT(deg(Vi) * deg(Vj)) if i != j and vertex Vi is adjacent to vertex Vj
280 \& . 0 otherwise
281 .Ve
282 .IP "\fBGenerateSiedelAdjacencyMatrix\fR" 4
283 .IX Item "GenerateSiedelAdjacencyMatrix"
284 .Vb 1
285 \& $SiedelAdjacencyGraphMatrix = $GraphMatrix\->GenerateSiedelAdjacencyMatrix();
286 .Ve
287 .Sp
288 Generates a new \fISiedelAdjacencyGraphMatrix\fR for specified \fBGraph\fR and returns
289 \&\fISiedelAdjacencyGraphMatrix\fR.
290 .Sp
291 For a simple graph G with n vertices, the Siedal adjacency matrix for G is a n x n square matrix and
292 its elements Mij are:
293 .Sp
294 .Vb 3
295 \& . 0 if i == j
296 \& . \-1 if i != j and vertex Vi is adjacent to vertex Vj
297 \& . 1 if i != j and vertex Vi is not adjacent to vertex Vj
298 .Ve
299 .IP "\fBGetColumnIDs\fR" 4
300 .IX Item "GetColumnIDs"
301 .Vb 1
302 \& @ColumnIDs = $GraphMatrix\->GetColumnIDs();
303 .Ve
304 .Sp
305 Returns an array containing any specified column IDs for \fIGraphMatrix\fR.
306 .IP "\fBGetMatrix\fR" 4
307 .IX Item "GetMatrix"
308 .Vb 1
309 \& $Matrix = $GraphMatrix\->GetMatrix();
310 .Ve
311 .Sp
312 Returns \fIMatrix\fR object corresponding to \fIGraphMatrix\fR object.
313 .IP "\fBGetMatrixType\fR" 4
314 .IX Item "GetMatrixType"
315 .Vb 1
316 \& $MatrixType = $GraphMatrix\->GetMatrixType();
317 .Ve
318 .Sp
319 Returns \fBMatrixType\fR of \fIGraphMatrix\fR.
320 .IP "\fBGetRowIDs\fR" 4
321 .IX Item "GetRowIDs"
322 .Vb 1
323 \& @RowIDs = $GraphMatrix\->GetRowIDs();
324 .Ve
325 .Sp
326 Returns an array containing any specified rowIDs IDs for \fIGraphMatrix\fR.
327 .IP "\fBStringifyGraphMatrix\fR" 4
328 .IX Item "StringifyGraphMatrix"
329 .Vb 1
330 \& $String = $GraphMatrix\->StringifyGraphMatrix();
331 .Ve
332 .Sp
333 Returns a string containing information about \fIGraphMatrix\fR object.
334 .SH "AUTHOR"
335 .IX Header "AUTHOR"
336 Manish Sud <msud@san.rr.com>
337 .SH "SEE ALSO"
338 .IX Header "SEE ALSO"
339 Constants.pm, Graph.pm, Matrix.pm
340 .SH "COPYRIGHT"
341 .IX Header "COPYRIGHT"
342 Copyright (C) 2015 Manish Sud. All rights reserved.
343 .PP
344 This file is part of MayaChemTools.
345 .PP
346 MayaChemTools is free software; you can redistribute it and/or modify it under
347 the terms of the \s-1GNU\s0 Lesser General Public License as published by the Free
348 Software Foundation; either version 3 of the License, or (at your option)
349 any later version.