0
|
1 NAME
|
|
2 Graph
|
|
3
|
|
4 SYNOPSIS
|
|
5 use Graph;
|
|
6
|
|
7 use Graph qw(:all);
|
|
8
|
|
9 DESCRIPTION
|
|
10 Graph class provides the following methods:
|
|
11
|
|
12 new, AddCycle, AddEdge, AddEdges, AddPath, AddVertex, AddVertices,
|
|
13 ClearCycles, Copy, CopyEdgesProperties, CopyVerticesAndEdges,
|
|
14 CopyVerticesProperties, DeleteCycle, DeleteEdge, DeleteEdgeProperties,
|
|
15 DeleteEdgeProperty, DeleteEdges, DeleteEdgesProperties,
|
|
16 DeleteEdgesProperty, DeleteGraphProperties, DeleteGraphProperty,
|
|
17 DeletePath, DeleteVertex, DeleteVertexProperties, DeleteVertexProperty,
|
|
18 DeleteVertices, DeleteVerticesProperty, DetectCycles,
|
|
19 GetAdjacencyMatrix, GetAdmittanceMatrix, GetAllPaths,
|
|
20 GetAllPathsStartingAt, GetAllPathsStartingAtWithLength,
|
|
21 GetAllPathsStartingAtWithLengthUpto, GetAllPathsWithLength,
|
|
22 GetAllPathsWithLengthUpto, GetCircumference,
|
|
23 GetConnectedComponentsVertices, GetCycles, GetCyclesWithEvenSize,
|
|
24 GetCyclesWithOddSize, GetCyclesWithSize, GetCyclesWithSizeGreaterThan,
|
|
25 GetCyclesWithSizeLessThan, GetDegree, GetDegreeMatrix,
|
|
26 GetDistanceMatrix, GetEdgeCycles, GetEdgeCyclesWithEvenSize,
|
|
27 GetEdgeCyclesWithOddSize, GetEdgeCyclesWithSize,
|
|
28 GetEdgeCyclesWithSizeGreaterThan, GetEdgeCyclesWithSizeLessThan,
|
|
29 GetEdgeProperties, GetEdgeProperty, GetEdges, GetEdgesProperty,
|
|
30 GetFusedAndNonFusedCycles, GetGirth, GetGraphProperties,
|
|
31 GetGraphProperty, GetIncidenceMatrix, GetIsolatedVertices,
|
|
32 GetKirchhoffMatrix, GetLaplacianMatrix, GetLargestCycle,
|
|
33 GetLargestEdgeCycle, GetLargestVertexCycle, GetLeafVertices,
|
|
34 GetMaximumDegree, GetMininumDegree, GetNeighborhoodVertices,
|
|
35 GetNeighborhoodVerticesWithRadiusUpto,
|
|
36 GetNeighborhoodVerticesWithSuccessors,
|
|
37 GetNeighborhoodVerticesWithSuccessorsAndRadiusUpto, GetNeighbors,
|
|
38 GetNormalizedLaplacianMatrix, GetNumOfCycles,
|
|
39 GetNumOfCyclesWithEvenSize, GetNumOfCyclesWithOddSize,
|
|
40 GetNumOfCyclesWithSize, GetNumOfCyclesWithSizeGreaterThan,
|
|
41 GetNumOfCyclesWithSizeLessThan, GetNumOfEdgeCycles,
|
|
42 GetNumOfEdgeCyclesWithEvenSize, GetNumOfEdgeCyclesWithOddSize,
|
|
43 GetNumOfEdgeCyclesWithSize, GetNumOfEdgeCyclesWithSizeGreaterThan,
|
|
44 GetNumOfEdgeCyclesWithSizeLessThan, GetNumOfVertexCycles,
|
|
45 GetNumOfVertexCyclesWithEvenSize, GetNumOfVertexCyclesWithOddSize,
|
|
46 GetNumOfVertexCyclesWithSize, GetNumOfVertexCyclesWithSizeGreaterThan,
|
|
47 GetNumOfVertexCyclesWithSizeLessThan, GetPaths, GetPathsBetween,
|
|
48 GetPathsStartingAt, GetPathsStartingAtWithLength,
|
|
49 GetPathsStartingAtWithLengthUpto, GetPathsWithLength,
|
|
50 GetPathsWithLengthUpto, GetSiedelAdjacencyMatrix, GetSizeOfLargestCycle,
|
|
51 GetSizeOfLargestEdgeCycle, GetSizeOfLargestVertexCycle,
|
|
52 GetSizeOfSmallestCycle, GetSizeOfSmallestEdgeCycle,
|
|
53 GetSizeOfSmallestVertexCycle, GetSmallestCycle, GetSmallestEdgeCycle,
|
|
54 GetSmallestVertexCycle, GetTopologicallySortedVertices, GetVertex,
|
|
55 GetVertexCycles, GetVertexCyclesWithEvenSize,
|
|
56 GetVertexCyclesWithOddSize, GetVertexCyclesWithSize,
|
|
57 GetVertexCyclesWithSizeGreaterThan, GetVertexCyclesWithSizeLessThan,
|
|
58 GetVertexProperties, GetVertexProperty, GetVertexWithLargestDegree,
|
|
59 GetVertexWithSmallestDegree, GetVertices, GetVerticesProperty,
|
|
60 GetVerticesWithDegreeLessThan, HasCycle, HasEdge, HasEdgeProperty,
|
|
61 HasEdges, HasFusedCycles, HasGraphProperty, HasPath, HasVertex,
|
|
62 HasVertexProperty, HasVertices, IsAcyclic, IsAcyclicEdge,
|
|
63 IsAcyclicVertex, IsCyclic, IsCyclicEdge, IsCyclicVertex, IsGraph,
|
|
64 IsIsolatedVertex, IsLeafVertex, IsUnicyclic, IsUnicyclicEdge,
|
|
65 IsUnicyclicVertex, SetActiveCyclicPaths, SetEdgeProperties,
|
|
66 SetEdgeProperty, SetEdgesProperty, SetGraphProperties, SetGraphProperty,
|
|
67 SetVertexProperties, SetVertexProperty, SetVerticesProperty,
|
|
68 StringifyEdgesProperties, StringifyGraph, StringifyGraphProperties,
|
|
69 StringifyProperties, StringifyVerticesAndEdges,
|
|
70 StringifyVerticesProperties, UpdateEdgeProperty, UpdateVertexProperty
|
|
71
|
|
72 METHODS
|
|
73 new
|
|
74 $NewGraph = new Graph([@VertexIDs]);
|
|
75
|
|
76 Using specified *Graph* *VertexIDs*, new method creates a new Graph
|
|
77 object and returns newly created Graph object.
|
|
78
|
|
79 Examples:
|
|
80
|
|
81 $Graph = new Graph();
|
|
82 $Graph = new Graph(@VertexIDs);
|
|
83
|
|
84 AddCycle
|
|
85 $Graph->AddCycle(@VertexIDs);
|
|
86
|
|
87 Adds edges between successive pair of *VertexIDs* including an
|
|
88 additional edge from the last to first vertex ID to complete the
|
|
89 cycle to *Graph* and returns *Graph*.
|
|
90
|
|
91 AddEdge
|
|
92 $Graph->AddEdge($VertexID1, $VertexID2);
|
|
93
|
|
94 Adds an edge between *VertexID1* and *VertexID2* in a *Graph* and
|
|
95 returns *Graph*.
|
|
96
|
|
97 AddEdges
|
|
98 $Graph->AddEdges(@VertexIDs);
|
|
99
|
|
100 Adds edges between successive pair of *VertexIDs* in a *Graph* and
|
|
101 returns *Graph*.
|
|
102
|
|
103 AddPath
|
|
104 $Graph->AddPath(@VertexIDs);
|
|
105
|
|
106 Adds edges between successive pair of *VertexIDs* in a *Graph* and
|
|
107 returns *Graph*.
|
|
108
|
|
109 AddVertex
|
|
110 $Graph->AddVertex($VertexID);
|
|
111
|
|
112 Adds *VertexID* to *Graph* and returns *Graph*.
|
|
113
|
|
114 AddVertices
|
|
115 $Graph->AddVertices(@VertexIDs);
|
|
116
|
|
117 Adds vertices using *VertexIDs* to *Graph* and returns *Graph*.
|
|
118
|
|
119 ClearCycles
|
|
120 $Graph->ClearCycles();
|
|
121
|
|
122 Delete all cycle properties assigned to graph, vertices, and edges
|
|
123 by *DetectCycles* method.
|
|
124
|
|
125 Copy
|
|
126 $NewGraph = $Graph->Copy();
|
|
127
|
|
128 Copies *Graph* and its associated data using Storable::dclone and
|
|
129 returns a new Graph object.
|
|
130
|
|
131 CopyEdgesProperties
|
|
132 $OtherGraph = $Graph->CopyEdgesProperties($OtherGraph);
|
|
133
|
|
134 Copies all properties associated with edges from *Graph* to
|
|
135 *$OtherGraph* and returns *OtherGraph*.
|
|
136
|
|
137 CopyVerticesAndEdges
|
|
138 $OtherGraph = $Graph->CopyVerticesAndEdges($OtherGraph);
|
|
139
|
|
140 Copies all vertices and edges from *Graph* to *$OtherGraph* and
|
|
141 returns *OtherGraph*.
|
|
142
|
|
143 CopyVerticesProperties
|
|
144 $OtherGraph = $Graph->CopyVerticesProperties($OtherGraph);
|
|
145
|
|
146 Copies all properties associated with vertices from *Graph* to
|
|
147 *$OtherGraph* and returns *OtherGraph*.
|
|
148
|
|
149 DeleteCycle
|
|
150 $Graph->DeleteCycle(@VertexIDs);
|
|
151
|
|
152 Deletes edges between successive pair of *VertexIDs* including an
|
|
153 additional edge from the last to first vertex ID to complete the
|
|
154 cycle to *Graph* and returns *Graph*.
|
|
155
|
|
156 DeleteEdge
|
|
157 $Graph->DeleteEdge($VertexID1, $VertexID2);
|
|
158
|
|
159 Deletes an edge between *VertexID1* and *VertexID2* in a *Graph* and
|
|
160 returns *Graph*.
|
|
161
|
|
162 DeleteEdgeProperties
|
|
163 $Graph->DeleteEdgeProperties($VertexID1, $VertexID2);
|
|
164
|
|
165 Deletes all properties associated with edge between *VertexID1* and
|
|
166 *VertexID2* in a *Graph* and returns *Graph*.
|
|
167
|
|
168 DeleteEdgeProperty
|
|
169 $Graph->DeleteEdgeProperty($PropertyName, $VertexID1, $VertexID2);
|
|
170
|
|
171 Deletes *PropertyName* associated with edge between *VertexID1* and
|
|
172 *VertexID2* in a *Graph* and returns *Graph*.
|
|
173
|
|
174 DeleteEdges
|
|
175 $Graph->DeleteEdges(@VertexIDs);
|
|
176
|
|
177 Deletes edges between successive pair of *VertexIDs* and returns
|
|
178 *Graph*.
|
|
179
|
|
180 DeleteEdgesProperties
|
|
181 $Graph->DeleteEdgesProperties(@VertexIDs);
|
|
182
|
|
183 Deletes all properties associated with edges between successive pair
|
|
184 of *VertexIDs* and returns *Graph*.
|
|
185
|
|
186 DeleteEdgesProperty
|
|
187 $Graph->DeleteEdgesProperty($PropertyName, @VertexIDs);
|
|
188
|
|
189 Deletes *PropertyName* associated with edges between successive pair
|
|
190 of *VertexIDs* and returns *Graph*.
|
|
191
|
|
192 DeleteGraphProperties
|
|
193 $Graph->DeleteGraphProperties();
|
|
194
|
|
195 Deletes all properties associated as graph not including properties
|
|
196 associated to vertices or edges and returns *Graph*.
|
|
197
|
|
198 DeleteGraphProperty
|
|
199 $Graph->DeleteGraphProperty($PropertyName);
|
|
200
|
|
201 Deletes a *PropertyName* associated as graph property and returns
|
|
202 *Graph*.
|
|
203
|
|
204 DeletePath
|
|
205 $Graph->DeletePath(@VertexIDs);
|
|
206
|
|
207 Deletes edges between successive pair of *VertexIDs* in a *Graph*
|
|
208 and returns *Graph*.
|
|
209
|
|
210 DeleteVertex
|
|
211 $Graph->DeleteVertex($VertexID);
|
|
212
|
|
213 Deletes *VertexID* to *Graph* and returns *Graph*.
|
|
214
|
|
215 DeleteVertexProperties
|
|
216 $Graph->DeleteVertexProperties($VertexID);
|
|
217
|
|
218 Deletes all properties associated with *VertexID* and returns
|
|
219 *Graph*.
|
|
220
|
|
221 DeleteVertexProperty
|
|
222 $Graph->DeleteVertexProperty($PropertyName, $VertexID);
|
|
223
|
|
224 Deletes a *PropertyName* associated with *VertexID* and returns
|
|
225 *Graph*.
|
|
226
|
|
227 DeleteVertices
|
|
228 $Graph->DeleteVertices(@VertexIDs);
|
|
229
|
|
230 Deletes vertices specified in *VertexIDs* and returns *Graph*.
|
|
231
|
|
232 DeleteVerticesProperty
|
|
233 $Graph->DeleteVerticesProperty($PropertyName, @VertexIDs);
|
|
234
|
|
235 Deletes a *PropertyName* associated with *VertexIDs* and returns
|
|
236 *Graph*.
|
|
237
|
|
238 DetectCycles
|
|
239 $Graph->DetectCycles();
|
|
240
|
|
241 Detect cycles using CyclesDetection class and associate found cycles
|
|
242 to *Graph* object as graph properties: *ActiveCyclicPaths,
|
|
243 AllCyclicPaths, IndependentCyclicPaths*.
|
|
244
|
|
245 Notes:
|
|
246
|
|
247 . CyclesDetection class detects all cycles in the graph and filters
|
|
248 them to find independent cycles.
|
|
249 . All cycles related methods in the graph operate on
|
|
250 ActiveCyclicPaths. By default, active cyclic paths correspond
|
|
251 to IndependentCyclicPaths. This behavior can be changed
|
|
252 using SetActiveCyclicPaths method.
|
|
253
|
|
254 GetAdjacencyMatrix
|
|
255 $GraphMatrix = $Graph->GetAdjacencyMatrix();
|
|
256
|
|
257 Returns adjacency matrix for *Graph* as a *GraphMatrix* object with
|
|
258 row and column indices corresponding to graph vertices returned by
|
|
259 GetVertices method.
|
|
260
|
|
261 For a simple graph G with n vertices, the adjacency matrix for G is
|
|
262 a n x n square matrix and its elements Mij are:
|
|
263
|
|
264 . 0 if i == j
|
|
265 . 1 if i != j and vertex Vi is adjacent to vertex Vj
|
|
266 . 0 if i != j and vertex Vi is not adjacent to vertex Vj
|
|
267
|
|
268 GetAdmittanceMatrix
|
|
269 $GraphMatrix = $Graph->GetAdmittanceMatrix();
|
|
270
|
|
271 Returns admittance matrix for *Graph* as a *GraphMatrix* object with
|
|
272 row and column indices corresponding to graph vertices returned by
|
|
273 GetVertices method.
|
|
274
|
|
275 For a simple graph G with n vertices, the adjacency matrix for G is
|
|
276 a n x n square matrix and its elements Mij are:
|
|
277
|
|
278 . 0 if i == j
|
|
279 . 1 if i != j and vertex Vi is adjacent to vertex Vj
|
|
280 . 0 if i != j and vertex Vi is not adjacent to vertex Vj
|
|
281
|
|
282 GetAllPaths
|
|
283 $PathsRef = $Graph->GetAllPaths([$AllowCycles]);
|
|
284
|
|
285 Returns a reference to an array containing Path objects
|
|
286 corresponding to all possible lengths starting from each vertex in
|
|
287 graph with sharing of edges in paths traversed. By default, cycles
|
|
288 are included in paths. A path containing a cycle is terminated at a
|
|
289 vertex completing the cycle. Duplicate paths are not removed.
|
|
290
|
|
291 GetAllPathsStartingAt
|
|
292 @Paths = $Graph->GetAllPathsStartingAt($StartVertexID,
|
|
293 [$AllowCycles]);
|
|
294
|
|
295 Returns an array of *Path* objects starting from a *StartVertexID*
|
|
296 of any length with sharing of edges in paths traversed. By default,
|
|
297 cycles are included in paths. A path containing a cycle is
|
|
298 terminated at a vertex completing the cycle.
|
|
299
|
|
300 GetAllPathsStartingAtWithLength
|
|
301 @Paths = $Graph->GetAllPathsStartingAtWithLength($StartVertexID,
|
|
302 $Length, [$AllowCycles]);
|
|
303
|
|
304 Returns an array of *Path* objects starting from a *StartVertexID*
|
|
305 of specified *Length* with sharing of edges in paths traversed. By
|
|
306 default, cycles are included in paths. A path containing a cycle is
|
|
307 terminated at a vertex completing the cycle.
|
|
308
|
|
309 GetAllPathsStartingAtWithLengthUpto
|
|
310 @Paths = $Graph->GetAllPathsStartingAtWithLengthUpto($StartVertexID,
|
|
311 $Length, [$AllowCycles]);
|
|
312
|
|
313 Returns an array of *Path* objects starting from a *StartVertexID*
|
|
314 with length upto a *Length* with sharing of edges in paths
|
|
315 traversed. By default, cycles are included in paths. A path
|
|
316 containing a cycle is terminated at a vertex completing the cycle.
|
|
317
|
|
318 GetAllPathsWithLength
|
|
319 $PathsRef = $Graph->GetAllPathsWithLength($Length,
|
|
320 [$AllowCycles]);
|
|
321
|
|
322 Returns a reference to an array containing Path objects
|
|
323 corresponding to paths with *Length* starting from each vertex in
|
|
324 graph with sharing of edges in paths traversed. By default, cycles
|
|
325 are included in paths. A path containing a cycle is terminated at a
|
|
326 vertex completing the cycle. Duplicate paths are not removed.
|
|
327
|
|
328 GetAllPathsWithLengthUpto
|
|
329 $PathsRef = $Graph->GetAllPathsWithLengthUpto($Length,
|
|
330 [$AllowCycles]);
|
|
331
|
|
332 Returns a reference to an array containing Path objects
|
|
333 corresponding to paths up to specified *Length* starting from each
|
|
334 vertex in graph with sharing of edges in paths traversed. By
|
|
335 default, cycles are included in paths. A path containing a cycle is
|
|
336 terminated at a vertex completing the cycle. Duplicate paths are not
|
|
337 removed.
|
|
338
|
|
339 GetCircumference
|
|
340 $Circumference = $Graph->GetCircumference();
|
|
341
|
|
342 Returns size of largest cycle in a *Graph*
|
|
343
|
|
344 GetConnectedComponentsVertices
|
|
345 @ConnectedComponents = $Graph->GetConnectedComponentsVertices();
|
|
346
|
|
347 Returns an array *ConnectedComponents* containing referecens to
|
|
348 arrays with vertex IDs for each component sorted in order of their
|
|
349 decreasing size.
|
|
350
|
|
351 GetCycles
|
|
352 @CyclicPaths = $Graphs->GetCycles();
|
|
353
|
|
354 Returns an array *CyclicPaths* containing *Path* objects
|
|
355 corresponding to cycles in a *Graph*.
|
|
356
|
|
357 GetCyclesWithEvenSize
|
|
358 @CyclicPaths = $Graph->GetCyclesWithEvenSize();
|
|
359
|
|
360 Returns an array *CyclicPaths* containing *Path* objects
|
|
361 corresponding to cycles with even size in a *Graph*.
|
|
362
|
|
363 GetCyclesWithOddSize
|
|
364 @CyclicPaths = $Graph->GetCyclesWithOddSize();
|
|
365
|
|
366 Returns an array *CyclicPaths* containing *Path* objects
|
|
367 corresponding to cycles with odd size in a *Graph*.
|
|
368
|
|
369 GetCyclesWithSize
|
|
370 @CyclicPaths = $Graph->GetCyclesWithSize($CycleSize);
|
|
371
|
|
372 Returns an array *CyclicPaths* containing *Path* objects
|
|
373 corresponding to cycles with *CycleSize* in a *Graph*.
|
|
374
|
|
375 GetCyclesWithSizeGreaterThan
|
|
376 @CyclicPaths = $Graph->GetCyclesWithSizeGreaterThan($CycleSize);
|
|
377
|
|
378 Returns an array *CyclicPaths* containing *Path* objects
|
|
379 corresponding to cycles with size greater than *CycleSize* in a
|
|
380 *Graph*.
|
|
381
|
|
382 GetCyclesWithSizeLessThan
|
|
383 @CyclicPaths = $Graph->GetCyclesWithSizeGreaterThan($CycleSize);
|
|
384
|
|
385 Returns an array *CyclicPaths* containing *Path* objects
|
|
386 corresponding to cycles with size less than *CycleSize* in a
|
|
387 *Graph*.
|
|
388
|
|
389 GetDegree
|
|
390 $Degree = $Graph->GetDegree($VertexID);
|
|
391
|
|
392 Returns Degree for *VertexID* in a *Graph* corresponding to sum of
|
|
393 in and out vertex degree values.
|
|
394
|
|
395 GetDegreeMatrix
|
|
396 $GraphMatrix = $Graph->GetDegreeMatrix();
|
|
397
|
|
398 Returns degree matrix for *Graph* as a *GraphMatrix* object with row
|
|
399 and column indices corresponding to graph vertices returned by
|
|
400 GetVertices method.
|
|
401
|
|
402 For a simple graph G with n vertices, the degree matrix for G is a n
|
|
403 x n square matrix and its elements Mij are:
|
|
404
|
|
405 . deg(Vi) if i == j and deg(Vi) is the degree of vertex Vi
|
|
406 . 0 otherwise
|
|
407
|
|
408 GetDistanceMatrix
|
|
409 $GraphMatrix = $Graph->GetDistanceMatrix();
|
|
410
|
|
411 Returns distance matrix for *Graph* as a *GraphMatrix* object with
|
|
412 row and column indices corresponding to graph vertices returned by
|
|
413 GetVertices method.
|
|
414
|
|
415 For a simple graph G with n vertices, the distance matrix for G is a
|
|
416 n x n square matrix and its elements Mij are:
|
|
417
|
|
418 . 0 if i == j
|
|
419 . d if i != j and d is the shortest distance between vertex Vi and vertex Vj
|
|
420
|
|
421 In the final matrix, value of constant BigNumber defined in
|
|
422 Constants.pm module corresponds to vertices with no edges.
|
|
423
|
|
424 GetEdgeCycles
|
|
425 @CyclicPaths = $Graph->GetEdgeCycles($VertexID1, $VertexID2);
|
|
426
|
|
427 Returns an array *CyclicPaths* containing *Path* objects
|
|
428 corresponding to all cycles containing edge between *VertexID1* and
|
|
429 *VertexID2* in a *Graph*.
|
|
430
|
|
431 GetEdgeCyclesWithEvenSize
|
|
432 @CyclicPaths = $Graph->GetEdgeCyclesWithEvenSize($VertexID1,
|
|
433 $VertexID2);
|
|
434
|
|
435 Returns an array *CyclicPaths* containing *Path* objects
|
|
436 corresponding to cycles with even size containing edge between
|
|
437 *VertexID1* and *VertexID2* in a *Graph*.
|
|
438
|
|
439 GetEdgeCyclesWithOddSize
|
|
440 @CyclicPaths = $Graph->GetEdgeCyclesWithOddSize($VertexID1,
|
|
441 $VertexID2);
|
|
442
|
|
443 Returns an array *CyclicPaths* containing *Path* objects
|
|
444 corresponding to cycles with odd size containing edge between
|
|
445 *VertexID1* and *VertexID2* in a *Graph*.
|
|
446
|
|
447 GetEdgeCyclesWithSize
|
|
448 @CyclicPaths = $Graph->GetEdgeCyclesWithSize($VertexID1, $VertexID2,
|
|
449 $CycleSize);
|
|
450
|
|
451 Returns an array *CyclicPaths* containing *Path* objects
|
|
452 corresponding to cycles with size *CycleSize* containing edge
|
|
453 between *VertexID1* and *VertexID2* in a *Graph*.
|
|
454
|
|
455 GetEdgeCyclesWithSizeGreaterThan
|
|
456 @CyclicPaths = $Graph->GetEdgeCyclesWithSizeGreaterThan($VertexID1,
|
|
457 $VertexID2, $CycleSize);
|
|
458
|
|
459 Returns an array *CyclicPaths* containing *Path* objects
|
|
460 corresponding to cycles with size greater than *CycleSize*
|
|
461 containing edge between *VertexID1* and *VertexID2* in a *Graph*.
|
|
462
|
|
463 GetEdgeCyclesWithSizeLessThan
|
|
464 @CyclicPaths = $Graph->GetEdgeCyclesWithSizeLessThan($VertexID1,
|
|
465 $VertexID2, $CycleSize);
|
|
466
|
|
467 Returns an array *CyclicPaths* containing *Path* objects
|
|
468 corresponding to cycles with size less than *CycleSize* containing
|
|
469 edge between *VertexID1* and *VertexID2*.
|
|
470
|
|
471 GetEdgeProperties
|
|
472 %EdgeProperties = $Graph->GetEdgeProperties($VertexID1, $VertexID2);
|
|
473
|
|
474 Returns a hash EdgeProperties containing all PropertyName and
|
|
475 PropertyValue pairs associated with an edge between *VertexID1* and
|
|
476 *VertexID2* in a *Graph*.
|
|
477
|
|
478 GetEdgeProperty
|
|
479 $Value = $Graph->GetEdgeProperty($PropertyName, $VertexID1, $VertexID2);
|
|
480
|
|
481 Returns value of *PropertyName* associated with an edge between
|
|
482 *VertexID1* and *VertexID2* in a *Graph*.
|
|
483
|
|
484 GetEdges
|
|
485 @EdgeVertexIDs = $Graph->GetEdges($VertexID);
|
|
486 $NumOfEdges = $Graph->GetEdges($VertexID);
|
|
487
|
|
488 Returns an array *EdgeVertexIDs* with successive pair of IDs
|
|
489 corresponding to edges involving *VertexID* or number of edges for
|
|
490 *VertexID* in a *Graph*.
|
|
491
|
|
492 GetEdgesProperty
|
|
493 @PropertyValues = $Graph->GetEdgesProperty($PropertyName, @VertexIDs);
|
|
494
|
|
495 Returns an array *PropertyValues* containing property values
|
|
496 corresponding to *PropertyName* associated with edges between
|
|
497 successive pair of *VertexIDs*.
|
|
498
|
|
499 GetFusedAndNonFusedCycles
|
|
500 ($FusedCycleSetsRef, $NonFusedCyclesRef) =
|
|
501 $Graph->GetFusedAndNonFusedCycles();
|
|
502
|
|
503 Returns references to arrays *FusedCycleSetsRef* and
|
|
504 *NonFusedCyclesRef* containing references to arrays of cyclic *Path*
|
|
505 objects corresponding to fuses and non-fused cyclic paths.
|
|
506
|
|
507 GetGirth
|
|
508 $Girth = $Graph->GetGirth();
|
|
509
|
|
510 Returns size of smallest cycle in a *Graph*.
|
|
511
|
|
512 GetGraphProperties
|
|
513 %GraphProperties = $Graph->GetGraphProperties();
|
|
514
|
|
515 Returns a hash EdgeProperties containing all PropertyName and
|
|
516 PropertyValue pairs associated with graph in a *Graph*.
|
|
517
|
|
518 GetGraphProperty
|
|
519 $PropertyValue = $Graph->GetGraphProperty($PropertyName);
|
|
520
|
|
521 Returns value of *PropertyName* associated with graph in a *Graph*.
|
|
522
|
|
523 GetIncidenceMatrix
|
|
524 $GraphMatrix = $Graph->GetIncidenceMatrix();
|
|
525
|
|
526 Returns incidence matrix for *Graph* as a *GraphMatrix* object with
|
|
527 row and column indices corresponding to graph vertices returned by
|
|
528 GetVertices method.
|
|
529
|
|
530 For a simple graph G with n vertices and e edges, the incidence
|
|
531 matrix for G is a n x e matrix its elements Mij are:
|
|
532
|
|
533 . 1 if vertex Vi and the edge Ej are incident; in other words, Vi and Ej are related
|
|
534 . 0 otherwise
|
|
535
|
|
536 GetIsolatedVertices
|
|
537 @VertexIDs = $Graph->GetIsolatedVertices();
|
|
538
|
|
539 Returns an array *VertexIDs* containing vertices without any edges
|
|
540 in *Graph*.
|
|
541
|
|
542 GetKirchhoffMatrix
|
|
543 $GraphMatrix = $Graph->GetGetKirchhoffMatrix();
|
|
544
|
|
545 Returns Kirchhoff matrix for *Graph* as a *GraphMatrix* object with
|
|
546 row and column indices corresponding to graph vertices returned by
|
|
547 GetVertices method.
|
|
548
|
|
549 KirchhoffMatrix is another name for LaplacianMatrix.
|
|
550
|
|
551 GetLaplacianMatrix
|
|
552 $GraphMatrix = $Graph->GetLaplacianMatrix();
|
|
553
|
|
554 Returns Laplacian matrix for *Graph* as a *GraphMatrix* object with
|
|
555 row and column indices corresponding to graph vertices returned by
|
|
556 GetVertices method.
|
|
557
|
|
558 For a simple graph G with n vertices, the Laplacian matrix for G is
|
|
559 a n x n square matrix and its elements Mij are:
|
|
560
|
|
561 . deg(Vi) if i == j and deg(Vi) is the degree of vertex Vi
|
|
562 . -1 if i != j and vertex Vi is adjacent to vertex Vj
|
|
563 . 0 otherwise
|
|
564
|
|
565 GetLargestCycle
|
|
566 $CyclicPath = $Graph->GetLargestCycle();
|
|
567
|
|
568 Returns a cyclic *Path* object corresponding to largest cycle in a
|
|
569 *Graph*.
|
|
570
|
|
571 GetLargestEdgeCycle
|
|
572 $CyclicPath = $Graph->GetLargestEdgeCycle($VertexID1, $VertexID2);
|
|
573
|
|
574 Returns a cyclic *Path* object corresponding to largest cycle
|
|
575 containing edge between *VertexID1* and *VertexID2* in a *Graph*.
|
|
576
|
|
577 GetLargestVertexCycle
|
|
578 $CyclicPath = $Graph->GetLargestVertexCycle($VertexID);
|
|
579
|
|
580 Returns a cyclic *Path* object corresponding to largest cycle
|
|
581 containing *VertexID* in a *Graph*.
|
|
582
|
|
583 GetLeafVertices
|
|
584 @VertexIDs = $Graph->GetLeafVertices();
|
|
585
|
|
586 Returns an array *VertexIDs* containing vertices with degree of 1 in
|
|
587 a *Graph*.
|
|
588
|
|
589 GetMaximumDegree
|
|
590 $Degree = $Graph->GetMaximumDegree();
|
|
591
|
|
592 Returns value of maximum vertex degree in a *Graph*.
|
|
593
|
|
594 GetMininumDegree
|
|
595 $Degree = $Graph->GetMininumDegree();
|
|
596
|
|
597 Returns value of minimum vertex degree in a *Graph*.
|
|
598
|
|
599 GetNeighborhoodVertices
|
|
600 @VertexNeighborhoods = GetNeighborhoodVertices($StartVertexID);
|
|
601
|
|
602 Returns an array *VertexNeighborhoods* containing references to
|
|
603 arrays corresponding to neighborhood vertices around a specified
|
|
604 *StartVertexID* at all possible radii levels.
|
|
605
|
|
606 GetNeighborhoodVerticesWithRadiusUpto
|
|
607 @VertexNeighborhoods = GetNeighborhoodVerticesWithRadiusUpto(
|
|
608 $StartVertexID, $Radius);
|
|
609
|
|
610 Returns an array *VertexNeighborhoods* containing references to
|
|
611 arrays corresponding to neighborhood vertices around a specified
|
|
612 *StartVertexID* upto specified *Radius* levels.
|
|
613
|
|
614 GetNeighborhoodVerticesWithSuccessors
|
|
615 @VertexNeighborhoods = GetNeighborhoodVerticesWithSuccessors(
|
|
616 $StartVertexID);
|
|
617
|
|
618 Returns vertex neighborhoods around a specified *StartVertexID*,
|
|
619 along with their successor connected vertices, collected at all
|
|
620 neighborhood radii as an array *VertexNeighborhoods* containing
|
|
621 references to arrays with first value corresponding to vertex ID and
|
|
622 second value as reference to an array containing its successor
|
|
623 connected vertices.
|
|
624
|
|
625 For a neighborhood vertex at each radius level, the successor
|
|
626 connected vertices correspond to the neighborhood vertices at the
|
|
627 next radius level. Consequently, the neighborhood vertices at the
|
|
628 last radius level don't contain any successor vertices which fall
|
|
629 outside the range of specified radius.
|
|
630
|
|
631 GetNeighborhoodVerticesWithSuccessorsAndRadiusUpto
|
|
632 @VertexNeighborhoods = GetNeighborhoodVerticesWithSuccessors(
|
|
633 $StartVertexID, $Radius);
|
|
634
|
|
635 Returns vertex neighborhoods around a specified *StartVertexID*,
|
|
636 along with their successor connected vertices, collected with in a
|
|
637 specified *Radius* as an array *VertexNeighborhoods* containing
|
|
638 references to arrays with first value corresponding to vertex ID and
|
|
639 second value as reference to a list containing its successor
|
|
640 connected vertices.
|
|
641
|
|
642 For a neighborhood vertex at each radius level, the successor
|
|
643 connected vertices correspond to the neighborhood vertices at the
|
|
644 next radius level. Consequently, the neighborhood vertices at the
|
|
645 last radius level don't contain any successor vertices which fall
|
|
646 outside the range of specified radius.
|
|
647
|
|
648 GetNeighbors
|
|
649 @VertexIDs = $Graph->GetNeighbors($VertexID);
|
|
650 $NumOfNeighbors = $Graph->GetNeighbors($VertexID);
|
|
651
|
|
652 Returns an array *VertexIDs* containing vertices connected to
|
|
653 *VertexID* of number of neighbors of a *VertextID* in a *Graph*.
|
|
654
|
|
655 GetNormalizedLaplacianMatrix
|
|
656 $GraphMatrix = $Graph->GetNormalizedLaplacianMatrix();
|
|
657
|
|
658 Returns normalized Laplacian matrix for *Graph* as a *GraphMatrix*
|
|
659 object with row and column indices corresponding to graph vertices
|
|
660 returned by GetVertices method.
|
|
661
|
|
662 For a simple graph G with n vertices, the normalized Laplacian
|
|
663 matrix L for G is a n x n square matrix and its elements Lij are:
|
|
664
|
|
665 . 1 if i == j and deg(Vi) != 0
|
|
666 . -1/SQRT(deg(Vi) * deg(Vj)) if i != j and vertex Vi is adjacent to vertex Vj
|
|
667 . 0 otherwise
|
|
668
|
|
669 GetNumOfCycles
|
|
670 $NumOfCycles = $Graph->GetNumOfCycles();
|
|
671
|
|
672 Returns number of cycles in a *Graph*.
|
|
673
|
|
674 GetNumOfCyclesWithEvenSize
|
|
675 $NumOfCycles = $Graph->GetNumOfCyclesWithEvenSize();
|
|
676
|
|
677 Returns number of cycles with even size in a *Graph*.
|
|
678
|
|
679 GetNumOfCyclesWithOddSize
|
|
680 $NumOfCycles = $Graph->GetNumOfCyclesWithOddSize();
|
|
681
|
|
682 Returns number of cycles with odd size in a *Graph*.
|
|
683
|
|
684 GetNumOfCyclesWithSize
|
|
685 $NumOfCycles = $Graph->GetNumOfCyclesWithSize($CycleSize);
|
|
686
|
|
687 Returns number of cycles with *CyclesSize* in a *Graph*.
|
|
688
|
|
689 GetNumOfCyclesWithSizeGreaterThan
|
|
690 $NumOfCycles = $Graph->GetNumOfCyclesWithSizeGreaterThan(
|
|
691 $CycleSize);
|
|
692
|
|
693 Returns number of cycles with size greater than *CyclesSize* in a
|
|
694 *Graph*.
|
|
695
|
|
696 GetNumOfCyclesWithSizeLessThan
|
|
697 $NumOfCycles = $Graph->GetNumOfCyclesWithSizeLessThan($CycleSize);
|
|
698
|
|
699 Returns number of cycles with size less than *CyclesSize* in a
|
|
700 *Graph*.
|
|
701
|
|
702 GetNumOfEdgeCycles
|
|
703 $NumOfCycles = $Graph->GetNumOfEdgeCycles($VertexID1, $VertexID2);
|
|
704
|
|
705 Returns number of cycles containing edge between *VertexID1* and
|
|
706 *VertexID2* in a *Graph*.
|
|
707
|
|
708 GetNumOfEdgeCyclesWithEvenSize
|
|
709 $NumOfCycles = $Graph->GetNumOfEdgeCyclesWithEvenSize($VertexID1,
|
|
710 $VertexID2);
|
|
711
|
|
712 Returns number of cycles containing edge between *VertexID1* and
|
|
713 *VertexID2* with even size in a *Graph*.
|
|
714
|
|
715 GetNumOfEdgeCyclesWithOddSize
|
|
716 $NumOfCycles = $Graph->GetNumOfEdgeCyclesWithOddSize($VertexID1,
|
|
717 $VertexID2);
|
|
718
|
|
719 Returns number of cycles containing edge between *VertexID1* and
|
|
720 *VertexID2* with odd size in a *Graph*.
|
|
721
|
|
722 GetNumOfEdgeCyclesWithSize
|
|
723 $NumOfCycles = $Graph->GetNumOfEdgeCyclesWithSize($VertexID1,
|
|
724 $VertexID2, $CycleSize);
|
|
725
|
|
726 Returns number of cycles containing edge between *VertexID1* and
|
|
727 *VertexID2* with *CycleSize* size in a *Graph*.
|
|
728
|
|
729 GetNumOfEdgeCyclesWithSizeGreaterThan
|
|
730 $NumOfCycles = $Graph->GetNumOfEdgeCyclesWithSizeGreaterThan(
|
|
731 $VertexID1, $VertexID2, $CycleSize);
|
|
732
|
|
733 Returns number of cycles containing edge between *VertexID1* and
|
|
734 *VertexID2* with size greater than *CycleSize* size in a *Graph*.
|
|
735
|
|
736 GetNumOfEdgeCyclesWithSizeLessThan
|
|
737 $NumOfCycles = $Graph->GetNumOfEdgeCyclesWithSizeLessThan(
|
|
738 $VertexID1, $VertexID2, $CycleSize);
|
|
739
|
|
740 Returns number of cycles containing edge between *VertexID1* and
|
|
741 *VertexID2* with size less than *CycleSize* size in a *Graph*.
|
|
742
|
|
743 GetNumOfVertexCycles
|
|
744 $NumOfCycles = $Graph->GetNumOfVertexCycles($VertexID);
|
|
745
|
|
746 Returns number of cycles containing *VertexID* in a *Graph*.
|
|
747
|
|
748 GetNumOfVertexCyclesWithEvenSize
|
|
749 $NumOfCycles = $Graph->GetNumOfVertexCyclesWithEvenSize($VertexID);
|
|
750
|
|
751 Returns number of cycles containing *VertexID* with even size in a
|
|
752 *Graph*.
|
|
753
|
|
754 GetNumOfVertexCyclesWithOddSize
|
|
755 $NumOfCycles = $Graph->GetNumOfVertexCyclesWithOddSize($VertexID);
|
|
756
|
|
757 Returns number of cycles containing *VertexID* with odd size in a
|
|
758 *Graph*.
|
|
759
|
|
760 GetNumOfVertexCyclesWithSize
|
|
761 $NumOfCycles = $Graph->GetNumOfVertexCyclesWithSize($VertexID);
|
|
762
|
|
763 Returns number of cycles containing *VertexID* with even size in a
|
|
764 *Graph*.
|
|
765
|
|
766 GetNumOfVertexCyclesWithSizeGreaterThan
|
|
767 $NumOfCycles = $Graph->GetNumOfVertexCyclesWithSizeGreaterThan(
|
|
768 $VertexID, $CycleSize);
|
|
769
|
|
770 Returns number of cycles containing *VertexID* with size greater
|
|
771 than *CycleSize* in a *Graph*.
|
|
772
|
|
773 GetNumOfVertexCyclesWithSizeLessThan
|
|
774 $NumOfCycles = $Graph->GetNumOfVertexCyclesWithSizeLessThan(
|
|
775 $VertexID, $CycleSize);
|
|
776
|
|
777 Returns number of cycles containing *VertexID* with size less than
|
|
778 *CycleSize* in a *Graph*.
|
|
779
|
|
780 GetPaths
|
|
781 $PathsRefs = $Graph->GetPaths([$AllowCycles]);
|
|
782
|
|
783 Returns a reference to an array of *Path* objects corresponding to
|
|
784 paths of all possible lengths starting from each vertex with no
|
|
785 sharing of edges in paths traversed. By default, cycles are included
|
|
786 in paths. A path containing a cycle is terminated at a vertex
|
|
787 completing the cycle.
|
|
788
|
|
789 GetPathsBetween
|
|
790 @Paths = $Graph->GetPathsBetween($StartVertexID, $EndVertexID);
|
|
791
|
|
792 Returns an arrays of *Path* objects list of paths between
|
|
793 *StartVertexID* and *EndVertexID*. For cyclic graphs, the list
|
|
794 contains may contain more than one *Path* object.
|
|
795
|
|
796 GetPathsStartingAt
|
|
797 @Paths = $Graph->GetPathsStartingAt($StartVertexID, [$AllowCycles]);
|
|
798
|
|
799 Returns an array of *Path* objects corresponding to all possible
|
|
800 lengths starting from a specified *StartVertexID* with no sharing of
|
|
801 edges in paths traversed. By default, cycles are included in paths.
|
|
802 A path containing a cycle is terminated at a vertex completing the
|
|
803 cycle.
|
|
804
|
|
805 GetPathsStartingAtWithLength
|
|
806 @Paths = $Graph->StartingAtWithLength($StartVertexID, $Length,
|
|
807 $AllowCycles);
|
|
808
|
|
809 Returns an array of *Path* objects corresponding to all paths
|
|
810 starting from a specified *StartVertexID* with length *Length* and
|
|
811 no sharing of edges in paths traversed. By default, cycles are
|
|
812 included in paths. A path containing a cycle is terminated at a
|
|
813 vertex completing the cycle.
|
|
814
|
|
815 GetPathsStartingAtWithLengthUpto
|
|
816 @Paths = $Graph->StartingAtWithLengthUpto($StartVertexID, $Length,
|
|
817 $AllowCycles);
|
|
818
|
|
819 Returns an array of *Path* objects corresponding to all paths
|
|
820 starting from a specified *StartVertexID* with length upto *Length*
|
|
821 and no sharing of edges in paths traversed. By default, cycles are
|
|
822 included in paths. A path containing a cycle is terminated at a
|
|
823 vertex completing the cycle.
|
|
824
|
|
825 GetPathsWithLength
|
|
826 @Paths = $Graph->GetPathsWithLength($Length, $AllowCycles);
|
|
827
|
|
828 Returns an array of *Path* objects corresponding to to paths
|
|
829 starting from each vertex in graph with specified <Length> and no
|
|
830 sharing of edges in paths traversed. By default, cycles are included
|
|
831 in paths. A path containing a cycle is terminated at a vertex
|
|
832 completing the cycle.
|
|
833
|
|
834 GetPathsWithLengthUpto
|
|
835 @Paths = $Graph->GetPathsWithLengthUpto($Length, $AllowCycles);
|
|
836
|
|
837 Returns an array of *Path* objects corresponding to to paths
|
|
838 starting from each vertex in graph with length upto specified
|
|
839 *Length* and no sharing of edges in paths traversed. By default,
|
|
840 cycles are included in paths. A path containing a cycle is
|
|
841 terminated at a vertex completing the cycle.
|
|
842
|
|
843 GetSiedelAdjacencyMatrix
|
|
844 $GraphMatrix = $Graph->GetSiedelAdjacencyMatrix();
|
|
845
|
|
846 Returns Siedel admittance matrix for *Graph* as a *GraphMatrix*
|
|
847 object with row and column indices corresponding to graph vertices
|
|
848 returned by GetVertices method.
|
|
849
|
|
850 For a simple graph G with n vertices, the Siedal adjacency matrix
|
|
851 for G is a n x n square matrix and its elements Mij are:
|
|
852
|
|
853 . 0 if i == j
|
|
854 . -1 if i != j and vertex Vi is adjacent to vertex Vj
|
|
855 . 1 if i != j and vertex Vi is not adjacent to vertex Vj
|
|
856
|
|
857 GetSizeOfLargestCycle
|
|
858 $Size = $Graph->GetSizeOfLargestCycle();
|
|
859
|
|
860 Returns size of the largest cycle in a *Graph*.
|
|
861
|
|
862 GetSizeOfLargestEdgeCycle
|
|
863 $Size = $Graph->GetSizeOfLargestEdgeCycle($VertexID1, $VertexID2);
|
|
864
|
|
865 Returns size of the largest cycle containing egde between
|
|
866 *VertextID1* and *VertexID2* in a *Graph*.
|
|
867
|
|
868 GetSizeOfLargestVertexCycle
|
|
869 $Size = $Graph->GetSizeOfLargestVertexCycle($VertexID);
|
|
870
|
|
871 Returns size of the largest cycle containing *VertextID* in a
|
|
872 *Graph*.
|
|
873
|
|
874 GetSizeOfSmallestCycle
|
|
875 $Size = $Graph->GetSizeOfSmallestCycle();
|
|
876
|
|
877 Returns size of the smallest cycle in a *Graph*.
|
|
878
|
|
879 GetSizeOfSmallestEdgeCycle
|
|
880 $Size = $Graph->GetSizeOfSmallestEdgeCycle($VertexID1, $VertexID2);
|
|
881
|
|
882 Returns size of the smallest cycle containing egde between
|
|
883 *VertextID1* and *VertexID2* in a *Graph*.
|
|
884
|
|
885 GetSizeOfSmallestVertexCycle
|
|
886 $Size = $Graph->GetSizeOfSmallestVertexCycle($VertexID);
|
|
887
|
|
888 Returns size of the smallest cycle containing *VertextID* in a
|
|
889 *Graph*.
|
|
890
|
|
891 GetSmallestCycle
|
|
892 $CyclicPath = $Graph->GetSmallestCycle();
|
|
893
|
|
894 Returns a cyclic *Path* object corresponding to smallest cycle in a
|
|
895 *Graph*.
|
|
896
|
|
897 GetSmallestEdgeCycle
|
|
898 $CyclicPath = $Graph->GetSmallestEdgeCycle($VertexID1, $VertexID2);
|
|
899
|
|
900 Returns a cyclic *Path* object corresponding to smallest cycle
|
|
901 containing edge between *VertexID1* and *VertexID2* in a *Graph*.
|
|
902
|
|
903 GetSmallestVertexCycle
|
|
904 $CyclicPath = $Graph->GetSmallestVertexCycle($VertexID);
|
|
905
|
|
906 Returns a cyclic *Path* object corresponding to smallest cycle
|
|
907 containing *VertexID* in a *Graph*.
|
|
908
|
|
909 GetTopologicallySortedVertices
|
|
910 @VertexIDs = $Graph->GetTopologicallySortedVertices(
|
|
911 [$RootVertexID]);
|
|
912
|
|
913 Returns an array of *VertexIDs* sorted topologically starting from a
|
|
914 specified *RootVertexID* or from an arbitrary vertex ID.
|
|
915
|
|
916 GetVertex
|
|
917 $VertexValue = $Graph->GetVertex($VertexID);
|
|
918
|
|
919 Returns vartex value for *VertexID* in a *Graph*. Vartex IDs and
|
|
920 values are equivalent in the current implementation of Graph.
|
|
921
|
|
922 GetVertexCycles
|
|
923 @CyclicPaths = $Graph->GetVertexCycles($VertexID);
|
|
924
|
|
925 Returns an array *CyclicPaths* containing *Path* objects
|
|
926 corresponding to all cycles containing *VertexID* in a *Graph*.
|
|
927
|
|
928 GetVertexCyclesWithEvenSize
|
|
929 @CyclicPaths = $Graph->GetVertexCyclesWithEvenSize($VertexID);
|
|
930
|
|
931 Returns an array *CyclicPaths* containing *Path* objects
|
|
932 corresponding to cycles with even size containing *VertexID* in a
|
|
933 *Graph*.
|
|
934
|
|
935 GetVertexCyclesWithOddSize
|
|
936 @CyclicPaths = $Graph->GetVertexCyclesWithOddSize($VertexID);
|
|
937
|
|
938 Returns an array *CyclicPaths* containing *Path* objects
|
|
939 corresponding to cycles with odd size containing *VertexID* in a
|
|
940 *Graph*.
|
|
941
|
|
942 GetVertexCyclesWithSize
|
|
943 @CyclicPaths = $Graph->GetVertexCyclesWithSize($VertexID,
|
|
944 $CycleSize);
|
|
945
|
|
946 Returns an array *CyclicPaths* containing *Path* objects
|
|
947 corresponding to cycles with size *CycleSize* containing *VertexID*
|
|
948 in a *Graph*.
|
|
949
|
|
950 GetVertexCyclesWithSizeGreaterThan
|
|
951 @CyclicPaths = $Graph->GetVertexCyclesWithSizeGreaterThan($VertexID,
|
|
952 $CycleSize);
|
|
953
|
|
954 Returns an array *CyclicPaths* containing *Path* objects
|
|
955 corresponding to cycles with size greater than *CycleSize*
|
|
956 containing *VertexID* in a *Graph*.
|
|
957
|
|
958 GetVertexCyclesWithSizeLessThan
|
|
959 @CyclicPaths = $Graph->GetVertexCyclesWithSizeLessThan($VertexID,
|
|
960 $CycleSize);
|
|
961
|
|
962 Returns an array *CyclicPaths* containing *Path* objects
|
|
963 corresponding to cycles with size less than *CycleSize* containing
|
|
964 *VertexID* in a *Graph*.
|
|
965
|
|
966 GetVertexProperties
|
|
967 %VertexProperties = $Graph->GetVertexProperties($VertexID);
|
|
968
|
|
969 Returns a hash VertexProperties containing all PropertyName and
|
|
970 PropertyValue pairs associated with a *VertexID* in a *Graph*.
|
|
971
|
|
972 GetVertexProperty
|
|
973 $Value = $Graph->GetVertexProperty($PropertyName, $VertexID);
|
|
974
|
|
975 Returns value of *PropertyName* associated with a *VertexID* in a
|
|
976 *Graph*.
|
|
977
|
|
978 GetVertexWithLargestDegree
|
|
979 $VertexID = $Graph->GetVertexWithLargestDegree();
|
|
980
|
|
981 Returns VertexID with largest degree in a *Graph*.
|
|
982
|
|
983 GetVertexWithSmallestDegree
|
|
984 $VertexID = $Graph->GetVertexWithSmallestDegree();
|
|
985
|
|
986 Returns VertexID with smallest degree in a *Graph*.
|
|
987
|
|
988 GetVertices
|
|
989 @VertexIDs = $Graph->GetVertices();
|
|
990 $VertexCount = $Graph->GetVertices();
|
|
991
|
|
992 Returns an array of *VertexIDs* corresponding to all vertices in a
|
|
993 *Graph*; in a scalar context, number of vertices is returned.
|
|
994
|
|
995 GetVerticesProperty
|
|
996 @PropertyValues = $Graph->GetVerticesProperty($PropertyName, @VertexIDs);
|
|
997
|
|
998 Returns an array *PropertyValues* containing property values
|
|
999 corresponding to *PropertyName* associated with with *VertexIDs* in
|
|
1000 a *Graph*.
|
|
1001
|
|
1002 GetVerticesWithDegreeLessThan
|
|
1003 @VertexIDs = $Graph->GetVerticesWithDegreeLessThan($Degree);
|
|
1004
|
|
1005 Returns an array of *VertexIDs* containing vertices with degree less
|
|
1006 than *Degree* in a *Graph*.
|
|
1007
|
|
1008 HasCycle
|
|
1009 $Status = $Graph->HasCycle(@VertexIDs);
|
|
1010
|
|
1011 Returns 1 or 0 based on whether edges between successive pair of
|
|
1012 *VertexIDs* including an additional edge from the last to first
|
|
1013 vertex ID exists in a *Graph*.
|
|
1014
|
|
1015 HasEdge
|
|
1016 $Status = $Graph->HasEdge($VertexID1, $VertexID2);
|
|
1017
|
|
1018 Returns 1 or 0 based on whether an edge between *VertexID1* and
|
|
1019 *VertexID2* exist in a *Graph*.
|
|
1020
|
|
1021 HasEdgeProperty
|
|
1022 $Status = $Graph->HasEdgeProperty($PropertyName, $VertexID1,
|
|
1023 $VertexID2);
|
|
1024
|
|
1025 Returns 1 or 0 based on whether *PropertyName* has already been
|
|
1026 associated with an edge between *VertexID1* and *VertexID2* in a
|
|
1027 *Graph*.
|
|
1028
|
|
1029 HasEdges
|
|
1030 @EdgesStatus = $Graph->HasEdges(@VertexIDs);
|
|
1031 $FoundEdgesCount = $Graph->HasEdges(@VertexIDs);
|
|
1032
|
|
1033 Returns an array *EdgesStatus* containing 1s and 0s corresponding to
|
|
1034 whether edges between successive pairs of *VertexIDs* exist in a
|
|
1035 *Graph*. In a scalar context, number of edges found is returned.
|
|
1036
|
|
1037 HasFusedCycles
|
|
1038 $Status = $Graph->HasFusedCycles();
|
|
1039
|
|
1040 Returns 1 or 0 based on whether any fused cycles exist in a *Graph*.
|
|
1041
|
|
1042 HasGraphProperty
|
|
1043 $Status = $Graph->HasGraphProperty($PropertyName);
|
|
1044
|
|
1045 Returns 1 or 0 based on whether *PropertyName* has already been
|
|
1046 associated as a graph property as opposed to vertex or edge property
|
|
1047 in a *Graph*.
|
|
1048
|
|
1049 HasPath
|
|
1050 $Status = $Graph->HasPath(@VertexIDs));
|
|
1051
|
|
1052 Returns 1 or 0 based on whether edges between all successive pairs
|
|
1053 of *VertexIDs* exist in a *Graph*.
|
|
1054
|
|
1055 HasVertex
|
|
1056 $Status = $Graph->HasVertex($VertexID);
|
|
1057
|
|
1058 Returns 1 or 0 based on whether *VertexID* exists in a *Graph*.
|
|
1059
|
|
1060 HasVertexProperty
|
|
1061 $Status = $Graph->HasGraphProperty($HasVertexProperty, $VertexID);
|
|
1062
|
|
1063 Returns 1 or 0 based on whether *PropertyName* has already been
|
|
1064 associated with *VertexID* in a *Graph*.
|
|
1065
|
|
1066 HasVertices
|
|
1067 @VerticesStatus = $Graph->HasVertices(@VertexIDs);
|
|
1068 $VerticesFoundCount = $Graph->HasVertices(@VertexIDs);
|
|
1069
|
|
1070 Returns an array ** containing 1s and 0s corresponding to whether
|
|
1071 *VertexIDs* exist in a *Graph*. In a scalar context, number of
|
|
1072 vertices found is returned.
|
|
1073
|
|
1074 IsAcyclic
|
|
1075 $Status = $Graph->IsAcyclic();
|
|
1076
|
|
1077 Returns 0 or 1 based on whether a cycle exist in a *Graph*.
|
|
1078
|
|
1079 IsAcyclicEdge
|
|
1080 $Status = $Graph->IsAcyclicEdge($VertexID1, $VertexID2);
|
|
1081
|
|
1082 Returns 0 or 1 based on whether a cycle containing an edge between
|
|
1083 *VertexID1* and *VertexID2* exists in a *Graph*.
|
|
1084
|
|
1085 IsAcyclicVertex
|
|
1086 $Status = $Graph->IsAcyclicVertex($VertexID1);
|
|
1087
|
|
1088 Returns 0 or 1 based on whether a cycle containing a *VertexID*
|
|
1089 exists in a *Graph*.
|
|
1090
|
|
1091 IsCyclic
|
|
1092 $Status = $Graph->IsCyclic();
|
|
1093
|
|
1094 Returns 1 or 0 based on whether a cycle exist in a *Graph*.
|
|
1095
|
|
1096 IsCyclicEdge
|
|
1097 $Status = $Graph->IsCyclicEdge($VertexID1, $VertexID2);
|
|
1098
|
|
1099 Returns 1 or 0 based on whether a cycle containing an edge between
|
|
1100 *VertexID1* and *VertexID2* exists in a *Graph*.
|
|
1101
|
|
1102 IsCyclicVertex
|
|
1103 $Status = $Graph->IsCyclicVertex($VertexID1);
|
|
1104
|
|
1105 Returns 1 or 0 based on whether a cycle containing a *VertexID*
|
|
1106 exists in a *Graph*.
|
|
1107
|
|
1108 IsGraph
|
|
1109 $Status = Graph::IsGraph($Object);
|
|
1110
|
|
1111 Returns 1 or 0 based on whether *Object* is a Graph object.
|
|
1112
|
|
1113 IsIsolatedVertex
|
|
1114 $Status = $Graph->IsIsolatedVertex($VertexID);
|
|
1115
|
|
1116 Returns 1 or 0 based on whether *VertexID* is an isolated vertex in
|
|
1117 a *Graph*. A vertex with zero as its degree value is considered an
|
|
1118 isolated vertex.
|
|
1119
|
|
1120 IsLeafVertex
|
|
1121 $Status = $Graph->IsLeafVertex($VertexID);
|
|
1122
|
|
1123 Returns 1 or 0 based on whether *VertexID* is an isolated vertex in
|
|
1124 a *Graph*. A vertex with one as its degree value is considered an
|
|
1125 isolated vertex.
|
|
1126
|
|
1127 IsUnicyclic
|
|
1128 $Status = $Graph->IsUnicyclic();
|
|
1129
|
|
1130 Returns 1 or 0 based on whether only one cycle is present in a
|
|
1131 *Graph*.
|
|
1132
|
|
1133 IsUnicyclicEdge
|
|
1134 $Status = $Graph->IsUnicyclicEdge($VertexID1, $VertexID2);
|
|
1135
|
|
1136 Returns 1 or 0 based on whether only one cycle contains the edge
|
|
1137 between *VertexID1* and *VertexID2* in a *Graph*.
|
|
1138
|
|
1139 IsUnicyclicVertex
|
|
1140 $Status = $Graph->IsUnicyclicVertex($VertexID);
|
|
1141
|
|
1142 Returns 1 or 0 based on whether only one cycle contains *VertexID*
|
|
1143 in a *Graph*.
|
|
1144
|
|
1145 SetActiveCyclicPaths
|
|
1146 $Graph->SetActiveCyclicPaths($CyclicPathsType);
|
|
1147
|
|
1148 Sets the type of cyclic paths to use during all methods related to
|
|
1149 cycles and returns *Graph*. Possible values for cyclic paths:
|
|
1150 *Independent or All*.
|
|
1151
|
|
1152 SetEdgeProperties
|
|
1153 $Graph->SetEdgeProperties($VertexID1, $VertexID2, @NamesAndValues);
|
|
1154
|
|
1155 Associates property names and values corresponding to successive
|
|
1156 pairs of values in *NamesAndValues* to an edge between *VertexID1*
|
|
1157 and *VertexID2* in a *Graph* and returns *Graph*.
|
|
1158
|
|
1159 SetEdgeProperty
|
|
1160 $Graph->SetEdgeProperty($Name, $Value, $VertexID1, $VertexID2);
|
|
1161
|
|
1162 Associates property *Name* and *Value* to an edge between
|
|
1163 *VertexID1* and *VertexID2* in a *Graph* and returns *Graph*.
|
|
1164
|
|
1165 SetEdgesProperty
|
|
1166 $Graph->SetEdgesProperty($Name, @ValuesAndVertexIDs);
|
|
1167
|
|
1168 Associates a same property *Name* but different *Values* for
|
|
1169 different edges specified using triplets of *PropertyValue,
|
|
1170 $VertexID1, $VertexID2* via *ValuesAndVertexIDs* in a *graph*.
|
|
1171
|
|
1172 SetGraphProperties
|
|
1173 $Graph->SetGraphProperties(%NamesAndValues);
|
|
1174
|
|
1175 Associates property names and values *NamesAndValues* hash to graph
|
|
1176 as opposed to vertex or edge and returns *Graph*.
|
|
1177
|
|
1178 SetGraphProperty
|
|
1179 $Graph->SetGraphProperty($Name, $Value);
|
|
1180
|
|
1181 Associates property *Name* and *Value* to graph as opposed to vertex
|
|
1182 or edge and returns *Graph*.
|
|
1183
|
|
1184 SetVertexProperties
|
|
1185 $Graph->SetVertexProperties($VertexID, @NamesAndValues);
|
|
1186
|
|
1187 Associates property names and values corresponding to successive
|
|
1188 pairs of values in *NamesAndValues* to *VertexID* in a *Graph* and
|
|
1189 returns *Graph*.
|
|
1190
|
|
1191 SetVertexProperty
|
|
1192 $Graph->SetVertexProperty($Name, $Value, $VertexID);
|
|
1193
|
|
1194 Associates property *Name* and *Value* to *VertexID* in a *Graph*
|
|
1195 and returns *Graph*.
|
|
1196
|
|
1197 SetVerticesProperty
|
|
1198 $Graph->SetVerticesProperty($Name, @ValuesAndVertexIDs));
|
|
1199
|
|
1200 Associates a same property *Name* but different *Values* for
|
|
1201 different vertices specified using doublets of *PropertyValue,
|
|
1202 $VertexID* via *ValuesAndVertexIDs* in a *graph*.
|
|
1203
|
|
1204 StringifyEdgesProperties
|
|
1205 $String = $Graph->StringifyEdgesProperties();
|
|
1206
|
|
1207 Returns a string containing information about properties associated
|
|
1208 with all edges in a *Graph* object.
|
|
1209
|
|
1210 StringifyGraph
|
|
1211 $String = $Graph->StringifyGraph();
|
|
1212
|
|
1213 Returns a string containing information about *Graph* object.
|
|
1214
|
|
1215 StringifyGraphProperties
|
|
1216 $String = $Graph->StringifyGraphProperties();
|
|
1217
|
|
1218 Returns a string containing information about properties associated
|
|
1219 with graph as opposed to vertex. or an edge in a *Graph* object
|
|
1220
|
|
1221 StringifyProperties
|
|
1222 $String = $Graph->StringifyProperties();
|
|
1223
|
|
1224 Returns a string containing information about properties associated
|
|
1225 with graph, vertices, and edges in a *Graph* object.
|
|
1226
|
|
1227 StringifyVerticesAndEdges
|
|
1228 $String = $Graph->StringifyVerticesAndEdges();
|
|
1229
|
|
1230 Returns a string containing information about vertices and edges in
|
|
1231 a *Graph* object.
|
|
1232
|
|
1233 StringifyVerticesProperties
|
|
1234 $String = $Graph->StringifyVerticesProperties();
|
|
1235
|
|
1236 Returns a string containing information about properties associated
|
|
1237 with vertices a *Graph* object.
|
|
1238
|
|
1239 UpdateEdgeProperty
|
|
1240 $Graph->UpdateEdgeProperty($Name, $Value, $VertexID1, $VertexID2);
|
|
1241
|
|
1242 Updates property *Value* for *Name* associated with an edge between
|
|
1243 *VertexID1* and *VertexID1* and returns *Graph*.
|
|
1244
|
|
1245 UpdateVertexProperty
|
|
1246 $Graph->UpdateVertexProperty($Name, $Value, $VertexID);
|
|
1247
|
|
1248 Updates property *Value* for *Name* associated with *VertexID* and
|
|
1249 returns *Graph*.
|
|
1250
|
|
1251 AUTHOR
|
|
1252 Manish Sud <msud@san.rr.com>
|
|
1253
|
|
1254 SEE ALSO
|
|
1255 CyclesDetection.pm, Path.pm, PathGraph.pm, PathsTraversal.pm
|
|
1256
|
|
1257 COPYRIGHT
|
|
1258 Copyright (C) 2015 Manish Sud. All rights reserved.
|
|
1259
|
|
1260 This file is part of MayaChemTools.
|
|
1261
|
|
1262 MayaChemTools is free software; you can redistribute it and/or modify it
|
|
1263 under the terms of the GNU Lesser General Public License as published by
|
|
1264 the Free Software Foundation; either version 3 of the License, or (at
|
|
1265 your option) any later version.
|
|
1266
|