MechSys  1.0
Computing library for simulations in continuum and discrete mechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Util::Tree Class Reference

#include <tree.h>

List of all members.

Public Member Functions

 Tree (Array< int > const &NodesPairs, bool Directed=false)
 Size(NodesPairs)/2 == number of edges.
 ~Tree ()
void Reset (Array< int > const &NodesPairs, bool Directed=false)
 Re-initialize the tree with a new set of edges.
void DelEdge (int LeftNodeID, int RightNodeID)
 Remove an edge from current tree.
size_t nEdges () const
 Return the number of edges (size) of this tree (graph)
size_t GetEdge (int LeftNodeID, int RightNodeID) const
 Return the edge id corresponding to nodes LeftNodeID and RightNodeID.
void GetNodes (size_t i, int &LeftNodeID, int &RightNodeID) const
 Return the left and right nodes of an edge (i)
void ShortPath (size_t FromNodeID, size_t ToNodeID, Array< int > &Path)
 Find the shortest path from FromNodeID to ToNodeID.
void GetClusters (Array< Array< int > > &Clusters, bool Strong=true) const
void WriteDOT (char const *FileKey) const
void operator= (Tree const &Other)
 Assignment operator.

Constructor & Destructor Documentation

Util::Tree::Tree ( Array< int > const &  NodesPairs,
bool  Directed = false 
) [inline]

Size(NodesPairs)/2 == number of edges.

Util::Tree::~Tree ( ) [inline]

Member Function Documentation

void Util::Tree::DelEdge ( int  LeftNodeID,
int  RightNodeID 
) [inline]

Remove an edge from current tree.

void Util::Tree::GetClusters ( Array< Array< int > > &  Clusters,
bool  Strong = true 
) const [inline]
size_t Util::Tree::GetEdge ( int  LeftNodeID,
int  RightNodeID 
) const [inline]

Return the edge id corresponding to nodes LeftNodeID and RightNodeID.

void Util::Tree::GetNodes ( size_t  i,
int &  LeftNodeID,
int &  RightNodeID 
) const [inline]

Return the left and right nodes of an edge (i)

size_t Util::Tree::nEdges ( ) const [inline]

Return the number of edges (size) of this tree (graph)

void Util::Tree::operator= ( Tree const &  Other) [inline]

Assignment operator.

void Util::Tree::Reset ( Array< int > const &  NodesPairs,
bool  Directed = false 
) [inline]

Re-initialize the tree with a new set of edges.

void Util::Tree::ShortPath ( size_t  FromNodeID,
size_t  ToNodeID,
Array< int > &  Path 
) [inline]

Find the shortest path from FromNodeID to ToNodeID.

void Util::Tree::WriteDOT ( char const *  FileKey) const [inline]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines