| 1 | 1 <html> | 
|  | 2 <head> | 
|  | 3 <title>MayaChemTools:Documentation:Graph::PathGraph.pm</title> | 
|  | 4 <meta http-equiv="content-type" content="text/html;charset=utf-8"> | 
|  | 5 <link rel="stylesheet" type="text/css" href="../../css/MayaChemTools.css"> | 
|  | 6 </head> | 
|  | 7 <body leftmargin="20" rightmargin="20" topmargin="10" bottommargin="10"> | 
|  | 8 <br/> | 
|  | 9 <center> | 
|  | 10 <a href="http://www.mayachemtools.org" title="MayaChemTools Home"><img src="../../images/MayaChemToolsLogo.gif" border="0" alt="MayaChemTools"></a> | 
|  | 11 </center> | 
|  | 12 <br/> | 
|  | 13 <div class="DocNav"> | 
|  | 14 <table width="100%" border=0 cellpadding=0 cellspacing=2> | 
|  | 15 <tr align="left" valign="top"><td width="33%" align="left"><a href="./Path.html" title="Path.html">Previous</a>  <a href="./index.html" title="Table of Contents">TOC</a>  <a href="./PathsTraversal.html" title="PathsTraversal.html">Next</a></td><td width="34%" align="middle"><strong>Graph::PathGraph.pm</strong></td><td width="33%" align="right"><a href="././code/PathGraph.html" title="View source code">Code</a> | <a href="./../pdf/PathGraph.pdf" title="PDF US Letter Size">PDF</a> | <a href="./../pdfgreen/PathGraph.pdf" title="PDF US Letter Size with narrow margins: www.changethemargins.com">PDFGreen</a> | <a href="./../pdfa4/PathGraph.pdf" title="PDF A4 Size">PDFA4</a> | <a href="./../pdfa4green/PathGraph.pdf" title="PDF A4 Size with narrow margins: www.changethemargins.com">PDFA4Green</a></td></tr> | 
|  | 16 </table> | 
|  | 17 </div> | 
|  | 18 <p> | 
|  | 19 </p> | 
|  | 20 <h2>NAME</h2> | 
|  | 21 <p>PathGraph</p> | 
|  | 22 <p> | 
|  | 23 </p> | 
|  | 24 <h2>SYNOPSIS</h2> | 
|  | 25 <p>use Graph::PathGraph;</p> | 
|  | 26 <p>use Graph::PathGraph qw(:all);</p> | 
|  | 27 <p> | 
|  | 28 </p> | 
|  | 29 <h2>DESCRIPTION</h2> | 
|  | 30 <p><strong>PathGraph</strong> class provides the following methods:</p> | 
|  | 31 <p> <a href="#new">new</a>, <a href="#collapsevertexandcollectcyclicpaths">CollapseVertexAndCollectCyclicPaths</a>, <a href="#deleteverticeswithdegreelessthan">DeleteVerticesWithDegreeLessThan</a> | 
|  | 32 , <a href="#getcyclicpaths">GetCyclicPaths</a>, <a href="#getpaths">GetPaths</a>, <a href="#ispathgraph">IsPathGraph</a>, <a href="#stringifypathgraph">StringifyPathGraph</a> | 
|  | 33 </p><p><strong>PathGraph</strong> class is derived from <em>Graph</em> class.</p> | 
|  | 34 <p> | 
|  | 35 </p> | 
|  | 36 <h2>METHODS</h2> | 
|  | 37 <dl> | 
|  | 38 <dt><strong><a name="new" class="item"><strong>new</strong></a></strong></dt> | 
|  | 39 <dd> | 
|  | 40 <div class="OptionsBox"> | 
|  | 41     $NewPathGraph = new Graph::PathGraph($Graph);</div> | 
|  | 42 <p>Using specified <em>Graph</em>, <strong>new</strong> method creates a new <strong>PathGraph</strong> object and returns | 
|  | 43 newly created <strong>PathGraph</strong> object.</p> | 
|  | 44 <p><em>Graph</em> is converted into a <strong>PathGraph</strong> by copying all its vertices and edges without any | 
|  | 45 associated properties data and associating a <em>Path</em> object to each edge containing edge | 
|  | 46 vertex IDs as intial path.</p> | 
|  | 47 </dd> | 
|  | 48 <dt><strong><a name="collapsevertexandcollectcyclicpaths" class="item"><strong>CollapseVertexAndCollectCyclicPaths</strong></a></strong></dt> | 
|  | 49 <dd> | 
|  | 50 <div class="OptionsBox"> | 
|  | 51     $PathGraph->CollapseVertexAndCollectCyclicPaths($VertexID);</div> | 
|  | 52 <p>Collapses paths around a <em>VertexID</em> by updating paths around the vertex [Ref 31] and associating any | 
|  | 53 resulting cyclic paths to graph as <strong>CyclicPaths</strong> property name. And returns <em>PathGraph</em>.</p> | 
|  | 54 </dd> | 
|  | 55 <dt><strong><a name="deleteverticeswithdegreelessthan" class="item"><strong>DeleteVerticesWithDegreeLessThan</strong></a></strong></dt> | 
|  | 56 <dd> | 
|  | 57 <div class="OptionsBox"> | 
|  | 58     $Return = $PathGraph->DeleteVerticesWithDegreeLessThan($Degree);</div> | 
|  | 59 <p>Deletes vertices with degree less than <em>Degree</em> from <em>PathGraph</em> and returns <em>PathGraph</em>.</p> | 
|  | 60 </dd> | 
|  | 61 <dt><strong><a name="getcyclicpaths" class="item"><strong>GetCyclicPaths</strong></a></strong></dt> | 
|  | 62 <dd> | 
|  | 63 <div class="OptionsBox"> | 
|  | 64     @CyclicPaths = $PathGraph->GetCyclicPaths(); | 
|  | 65 <br/>    $NumOfPaths = $PathGraph->GetCyclicPaths();</div> | 
|  | 66 <p>Returns an array of cyclic <em>Paths</em> associated with edges in <em>PathGraph</em>. In scalar context, number | 
|  | 67 of cyclic paths is returned.</p> | 
|  | 68 </dd> | 
|  | 69 <dt><strong><a name="getpaths" class="item"><strong>GetPaths</strong></a></strong></dt> | 
|  | 70 <dd> | 
|  | 71 <div class="OptionsBox"> | 
|  | 72     @Paths = $PathGraph->GetPaths(); | 
|  | 73 <br/>    $NumOfPaths = $PathGraph->GetPaths();</div> | 
|  | 74 <p>Returns an array of <em>Paths</em> associated with edges in <em>PathGraph</em>. In scalar context, number | 
|  | 75 of paths is returned.</p> | 
|  | 76 </dd> | 
|  | 77 <dt><strong><a name="ispathgraph" class="item"><strong>IsPathGraph</strong></a></strong></dt> | 
|  | 78 <dd> | 
|  | 79 <div class="OptionsBox"> | 
|  | 80     $Status = Graph::PathGraph::IsPathGraph($Object);</div> | 
|  | 81 <p>Returns 1 or 0 based on whether <em>Object</em> is a <strong>PathGraph</strong> object.</p> | 
|  | 82 </dd> | 
|  | 83 <dt><strong><a name="stringifypathgraph" class="item"><strong>StringifyPathGraph</strong></a></strong></dt> | 
|  | 84 <dd> | 
|  | 85 <div class="OptionsBox"> | 
|  | 86     $String = $PathGraph->StringifyPathGraph();</div> | 
|  | 87 <p>Returns a string containing information about traversed paths in <em>PathGraph</em> object.</p> | 
|  | 88 </dd> | 
|  | 89 </dl> | 
|  | 90 <p> | 
|  | 91 </p> | 
|  | 92 <h2>AUTHOR</h2> | 
|  | 93 <p><a href="mailto:msud@san.rr.com">Manish Sud</a></p> | 
|  | 94 <p> | 
|  | 95 </p> | 
|  | 96 <h2>SEE ALSO</h2> | 
|  | 97 <p><a href="./Graph.html">Graph.pm</a>, <a href="./Path.html">Path.pm</a> | 
|  | 98 </p> | 
|  | 99 <p> | 
|  | 100 </p> | 
|  | 101 <h2>COPYRIGHT</h2> | 
|  | 102 <p>Copyright (C) 2015 Manish Sud. All rights reserved.</p> | 
|  | 103 <p>This file is part of MayaChemTools.</p> | 
|  | 104 <p>MayaChemTools is free software; you can redistribute it and/or modify it under | 
|  | 105 the terms of the GNU Lesser General Public License as published by the Free | 
|  | 106 Software Foundation; either version 3 of the License, or (at your option) | 
|  | 107 any later version.</p> | 
|  | 108 <p> </p><p> </p><div class="DocNav"> | 
|  | 109 <table width="100%" border=0 cellpadding=0 cellspacing=2> | 
|  | 110 <tr align="left" valign="top"><td width="33%" align="left"><a href="./Path.html" title="Path.html">Previous</a>  <a href="./index.html" title="Table of Contents">TOC</a>  <a href="./PathsTraversal.html" title="PathsTraversal.html">Next</a></td><td width="34%" align="middle"><strong>March 29, 2015</strong></td><td width="33%" align="right"><strong>Graph::PathGraph.pm</strong></td></tr> | 
|  | 111 </table> | 
|  | 112 </div> | 
|  | 113 <br /> | 
|  | 114 <center> | 
|  | 115 <img src="../../images/h2o2.png"> | 
|  | 116 </center> | 
|  | 117 </body> | 
|  | 118 </html> |