MayaChemTools

Previous  TOC  NextGraph/PathGraph.pmCode | PDF | PDFA4

NAME

PathGraph

SYNOPSIS

use Graph::PathGraph;

use Graph::PathGraph qw(:all);

DESCRIPTION

PathGraph class provides the following methods:

new, CollapseVertexAndCollectCyclicPaths, DeleteVerticesWithDegreeLessThan, GetCyclicPaths, GetPaths, IsPathGraph, StringifyPathGraph

PathGraph class is derived from Graph class.

METHODS

new
$NewPathGraph = new Graph::PathGraph($Graph);

Using specified Graph, new method creates a new PathGraph object and returns newly created PathGraph object.

Graph is converted into a PathGraph by copying all its vertices and edges without any associated properties data and associating a Path object to each edge containing edge vertex IDs as intial path.

CollapseVertexAndCollectCyclicPaths
$PathGraph->CollapseVertexAndCollectCyclicPaths($VertexID);

Collapses paths around a VertexID by updating paths around the vertex [Ref 31] and associating any resulting cyclic paths to graph as CyclicPaths property name. And returns PathGraph.

DeleteVerticesWithDegreeLessThan
$Return = $PathGraph->DeleteVerticesWithDegreeLessThan($Degree);

Deletes vertices with degree less than Degree from PathGraph and returns PathGraph.

GetCyclicPaths
@CyclicPaths = $PathGraph->GetCyclicPaths();
$NumOfPaths = $PathGraph->GetCyclicPaths();

Returns an array of cyclic Paths associated with edges in PathGraph. In scalar context, number of cyclic paths is returned.

GetPaths
@Paths = $PathGraph->GetPaths();
$NumOfPaths = $PathGraph->GetPaths();

Returns an array of Paths associated with edges in PathGraph. In scalar context, number of paths is returned.

IsPathGraph
$Status = Graph::PathGraph::IsPathGraph($Object);

Returns 1 or 0 based on whether Object is a PathGraph object.

StringifyPathGraph
$String = $PathGraph->StringifyPathGraph();

Returns a string containing information about traversed paths in PathGraph object.

AUTHOR

Manish Sud

SEE ALSO

Graph.pm, Path.pm

COPYRIGHT

Copyright (C) 2024 Manish Sud. All rights reserved.

This file is part of MayaChemTools.

MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

 

 

Previous  TOC  NextAugust 7, 2024Graph/PathGraph.pm