CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes
GraphPath< N, E > Class Template Reference

#include <graph_path.h>

Public Types

typedef std::vector< pair< N, N > > chain_type
 
typedef set< std::vector< N > > paths_set
 
typedef std::map< segment_type,
set< segment_type > > 
paths_type
 
typedef std::vector
< std::vector< segment_type > > 
result_type
 
typedef pair< N, Nsegment_type
 

Public Member Functions

void calcPaths (const graph< N, E > &g, const N &root)
 
void findSegments (const N &n, set< segment_type > &result)
 
bool fromTo (const N &from, const N &to, std::vector< std::vector< N > > &result) const
 
 GraphPath (const graph< N, E > &g, const N &root)
 
bool paths2 (const segment_type &ft, result_type &result) const
 
void stream (std::ostream &)
 
void update (segment_type &s, result_type &r, int pos) const
 
 ~GraphPath ()
 

Public Attributes

paths_type paths_
 

Detailed Description

template<class N, class E>
class GraphPath< N, E >

Definition at line 13 of file graph_path.h.

Member Typedef Documentation

template<class N , class E >
typedef std::vector< pair<N,N> > GraphPath< N, E >::chain_type

Definition at line 20 of file graph_path.h.

template<class N , class E >
typedef set< std::vector<N> > GraphPath< N, E >::paths_set

Definition at line 19 of file graph_path.h.

template<class N , class E >
typedef std::map< segment_type, set< segment_type > > GraphPath< N, E >::paths_type

Definition at line 18 of file graph_path.h.

template<class N , class E >
typedef std::vector<std::vector<segment_type> > GraphPath< N, E >::result_type

Definition at line 21 of file graph_path.h.

template<class N , class E >
typedef pair<N,N> GraphPath< N, E >::segment_type

Definition at line 16 of file graph_path.h.

Constructor & Destructor Documentation

template<class N , class E >
GraphPath< N, E >::GraphPath ( const graph< N, E > &  g,
const N root 
)

Definition at line 204 of file graph_path.h.

template<class N , class E >
GraphPath< N, E >::~GraphPath ( )
inline

Definition at line 23 of file graph_path.h.

Member Function Documentation

template<class N , class E >
void GraphPath< N, E >::calcPaths ( const graph< N, E > &  g,
const N n 
)

creates a lookup-table of starting-points of pathes between nodes n A and B A->B: A->X, A->Y, B->B (B->B denotes a direct connectino between A and B, A->X means that B can be reached from X directly while X can be reached from A) the lookup-table is stored in a std::map< pair<n,n>, set< pair<n,n> > (could be a multistd::map..)

Definition at line 216 of file graph_path.h.

template<class N , class E >
void GraphPath< N, E >::findSegments ( const N n,
set< segment_type > &  result 
)

Definition at line 257 of file graph_path.h.

template<class N , class E >
bool GraphPath< N, E >::fromTo ( const N from,
const N to,
std::vector< std::vector< N > > &  result 
) const

Definition at line 94 of file graph_path.h.

template<class N , class E >
bool GraphPath< N, E >::paths2 ( const segment_type ft,
result_type result 
) const
  • false, if no (directed!) path between fromTo.first and fromTo.second, p = empty set
  • true, if (directed!) paths exist between fromTo.first an fromTo.second, p = set of pathnodes

Definition at line 125 of file graph_path.h.

template<class N , class E >
void GraphPath< N, E >::stream ( std::ostream &  os)

Definition at line 267 of file graph_path.h.

template<class N , class E >
void GraphPath< N, E >::update ( segment_type s,
result_type r,
int  pos 
) const

Definition at line 175 of file graph_path.h.

Referenced by Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom().

Member Data Documentation

template<class N , class E >
paths_type GraphPath< N, E >::paths_

Definition at line 38 of file graph_path.h.