1 #ifndef __cpExtensions__DataStructures__Skeleton__hxx__
2 #define __cpExtensions__DataStructures__Skeleton__hxx__
4 // -------------------------------------------------------------------------
5 template< unsigned int _VDim >
6 void cpExtensions::DataStructures::Skeleton< _VDim >::
7 AddBranch( TPath* path )
12 unsigned long size = path->GetSize( );
15 TIndex a = path->GetVertex( 0 );
16 TIndex b = path->GetVertex( size - 1 );
17 if( this->HasEdge( a, b ) )
21 this->AddEdge( a, b, path );
22 this->AddEdge( b, a, path );
23 // TODO: this->Modified( );
26 // -------------------------------------------------------------------------
27 template< unsigned int _VDim >
28 const typename cpExtensions::DataStructures::Skeleton< _VDim >::
29 TPath* cpExtensions::DataStructures::Skeleton< _VDim >::
30 GetBranch( const TIndex& a, const TIndex& b ) const
32 static const TPath* null_path = NULL;
33 if( this->HasEdge( a, b ) )
34 return( this->GetEdges( a, b ).front( ) );
39 // -------------------------------------------------------------------------
40 template< unsigned int _VDim >
41 cpExtensions::DataStructures::Skeleton< _VDim >::
47 // -------------------------------------------------------------------------
48 template< unsigned int _VDim >
49 cpExtensions::DataStructures::Skeleton< _VDim >::
54 #endif // __cpExtensions__DataStructures__Skeleton__hxx__