annotate docs/modules/txt/PathGraph.txt @ 0:4816e4a8ae95 draft default tip

Uploaded
author deepakjadmin
date Wed, 20 Jan 2016 09:23:18 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
1 NAME
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
2 PathGraph
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
3
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
4 SYNOPSIS
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
5 use Graph::PathGraph;
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
6
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
7 use Graph::PathGraph qw(:all);
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
8
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
9 DESCRIPTION
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
10 PathGraph class provides the following methods:
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
11
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
12 new, CollapseVertexAndCollectCyclicPaths,
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
13 DeleteVerticesWithDegreeLessThan, GetCyclicPaths, GetPaths, IsPathGraph,
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
14 StringifyPathGraph
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
15
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
16 PathGraph class is derived from *Graph* class.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
17
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
18 METHODS
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
19 new
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
20 $NewPathGraph = new Graph::PathGraph($Graph);
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
21
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
22 Using specified *Graph*, new method creates a new PathGraph object
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
23 and returns newly created PathGraph object.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
24
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
25 *Graph* is converted into a PathGraph by copying all its vertices
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
26 and edges without any associated properties data and associating a
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
27 *Path* object to each edge containing edge vertex IDs as intial
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
28 path.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
29
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
30 CollapseVertexAndCollectCyclicPaths
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
31 $PathGraph->CollapseVertexAndCollectCyclicPaths($VertexID);
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
32
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
33 Collapses paths around a *VertexID* by updating paths around the
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
34 vertex [Ref 31] and associating any resulting cyclic paths to graph
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
35 as CyclicPaths property name. And returns *PathGraph*.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
36
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
37 DeleteVerticesWithDegreeLessThan
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
38 $Return = $PathGraph->DeleteVerticesWithDegreeLessThan($Degree);
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
39
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
40 Deletes vertices with degree less than *Degree* from *PathGraph* and
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
41 returns *PathGraph*.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
42
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
43 GetCyclicPaths
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
44 @CyclicPaths = $PathGraph->GetCyclicPaths();
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
45 $NumOfPaths = $PathGraph->GetCyclicPaths();
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
46
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
47 Returns an array of cyclic *Paths* associated with edges in
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
48 *PathGraph*. In scalar context, number of cyclic paths is returned.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
49
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
50 GetPaths
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
51 @Paths = $PathGraph->GetPaths();
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
52 $NumOfPaths = $PathGraph->GetPaths();
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
53
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
54 Returns an array of *Paths* associated with edges in *PathGraph*. In
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
55 scalar context, number of paths is returned.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
56
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
57 IsPathGraph
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
58 $Status = Graph::PathGraph::IsPathGraph($Object);
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
59
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
60 Returns 1 or 0 based on whether *Object* is a PathGraph object.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
61
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
62 StringifyPathGraph
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
63 $String = $PathGraph->StringifyPathGraph();
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
64
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
65 Returns a string containing information about traversed paths in
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
66 *PathGraph* object.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
67
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
68 AUTHOR
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
69 Manish Sud <msud@san.rr.com>
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
70
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
71 SEE ALSO
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
72 Graph.pm, Path.pm
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
73
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
74 COPYRIGHT
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
75 Copyright (C) 2015 Manish Sud. All rights reserved.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
76
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
77 This file is part of MayaChemTools.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
78
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
79 MayaChemTools is free software; you can redistribute it and/or modify it
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
80 under the terms of the GNU Lesser General Public License as published by
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
81 the Free Software Foundation; either version 3 of the License, or (at
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
82 your option) any later version.
4816e4a8ae95 Uploaded
deepakjadmin
parents:
diff changeset
83