#ifndef __FPA__BASE__REGIONGROWING__HXX__ #define __FPA__BASE__REGIONGROWING__HXX__ // ------------------------------------------------------------------------- template< class V, class C, class R, class B > fpa::Base::RegionGrow< V, C, R, B >:: RegionGrow( ) : Superclass( ), m_InsideValue( TResult( 1 ) ), m_OutsideValue( TResult( 0 ) ) { } // ------------------------------------------------------------------------- template< class V, class C, class R, class B > fpa::Base::RegionGrow< V, C, R, B >:: ~RegionGrow( ) { } // ------------------------------------------------------------------------- template< class V, class C, class R, class B > bool fpa::Base::RegionGrow< V, C, R, B >:: _ComputeNeighborResult( TResult& result, const TVertex& neighbor, const TVertex& parent ) const { if( this->_CheckMembership( neighbor ) ) { result = this->m_InsideValue; return( true ); } else { result = this->m_OutsideValue; return( false ); } // fi } // ------------------------------------------------------------------------- template< class V, class C, class R, class B > bool fpa::Base::RegionGrow< V, C, R, B >:: _IsQueueEmpty( ) const { return( this->m_Queue.empty( ) ); } // ------------------------------------------------------------------------- template< class V, class C, class R, class B > void fpa::Base::RegionGrow< V, C, R, B >:: _QueuePush( const _TNode& n ) { this->m_Queue.push( n ); } // ------------------------------------------------------------------------- template< class V, class C, class R, class B > typename fpa::Base::RegionGrow< V, C, R, B >:: _TNode fpa::Base::RegionGrow< V, C, R, B >:: _QueuePop( ) { _TNode n = this->m_Queue.front( ); this->m_Queue.pop( ); return( n ); } // ------------------------------------------------------------------------- template< class V, class C, class R, class B > void fpa::Base::RegionGrow< V, C, R, B >:: _QueueClear( ) { while( this->m_Queue.size( ) > 0 ) this->m_Queue.pop( ); } #endif // __FPA__BASE__REGIONGROWING__HXX__ // eof - $RCSfile$