bool fpa::Base::Graph< _TVertex, _TCost, _TIndex, _TIndexCompare >::
RenameVertex( const TIndex& old_index, const TIndex& new_index )
{
- auto old_v = this->m_Vertices.find( old_index );
- auto new_v = this->m_Vertices.find( new_index );
+ typename TVertices::iterator old_v = this->m_Vertices.find( old_index );
+ typename TVertices::iterator new_v = this->m_Vertices.find( new_index );
if( old_v != this->m_Vertices.end( ) && new_v == this->m_Vertices.end( ) )
{
// Replace vertex
this->m_Vertices.erase( old_index );
// Duplicate edges
- auto mIt = this->m_Matrix.begin( );
- auto found_row = this->m_Matrix.end( );
+ typename TMatrix::iterator mIt = this->m_Matrix.begin( );
+ typename TMatrix::iterator found_row = this->m_Matrix.end( );
for( ; mIt != this->m_Matrix.end( ); ++mIt )
{
if( mIt->first == old_index )
found_row = mIt;
- auto rIt = mIt->second.begin( );
+ typename TMatrixRow::iterator rIt = mIt->second.begin( );
for( ; rIt != mIt->second.end( ); ++rIt )
{
if( mIt->first == old_index )
mIt = this->m_Matrix.begin( );
for( ; mIt != this->m_Matrix.end( ); ++mIt )
{
- auto rIt = mIt->second.begin( );
+ typename TMatrixRow::iterator rIt = mIt->second.begin( );
while( rIt != mIt->second.end( ) )
{
if( rIt->first == old_index )
void fpa::Base::Graph< _TVertex, _TCost, _TIndex, _TIndexCompare >::
RemoveVertex( const TIndex& index )
{
- auto i = this->m_Vertices.find( index );
+ typename TVertices::iterator i = this->m_Vertices.find( index );
if( i != this->m_Vertices.end( ) )
{
// Delete vertex
this->m_Vertices.erase( i );
// Delete edges starting from given vertex
- auto mIt = this->m_Matrix.find( index );
+ typename TMatrix::iterator mIt = this->m_Matrix.find( index );
if( mIt != this->m_Matrix.end( ) )
this->m_Matrix.erase( mIt );
mIt = this->m_Matrix.begin( );
for( ; mIt != this->m_Matrix.end( ); ++mIt )
{
- auto rIt = mIt->second.begin( );
+ typename TMatrixRow::iterator rIt = mIt->second.begin( );
while( rIt != mIt->second.end( ) )
{
if( rIt->first == index )
GetEdges( const TIndex& orig, const TIndex& dest )
{
static TEdges null_edges;
- auto o = this->m_Matrix.find( orig );
+ typename TMatrix::iterator o = this->m_Matrix.find( orig );
if( o != this->m_Matrix.find( orig ) )
{
- auto d = o->second.find( dest );
+ typename TMatrixRow::iterator d = o->second.find( dest );
if( d == o->second.end( ) )
{
null_edges.clear( );
GetEdges( const TIndex& orig, const TIndex& dest ) const
{
static const TEdges null_edges;
- auto o = this->m_Matrix.find( orig );
+ typename TMatrix::iterator o = this->m_Matrix.find( orig );
if( o != this->m_Matrix.find( orig ) )
{
- auto d = o->second.find( dest );
+ typename TMatrixRow::iterator d = o->second.find( dest );
if( d == o->second.end( ) )
return( null_edges );
else
bool fpa::Base::Graph< _TVertex, _TCost, _TIndex, _TIndexCompare >::
HasEdge( const TIndex& orig, const TIndex& dest ) const
{
- auto mIt = this->m_Matrix.find( orig );
+ typename TMatrix::const_iterator mIt = this->m_Matrix.find( orig );
if( mIt != this->m_Matrix.end( ) )
return( mIt->second.find( dest ) != mIt->second.end( ) );
else
void fpa::Base::Graph< _TVertex, _TCost, _TIndex, _TIndexCompare >::
RemoveEdge( const TIndex& orig, const TIndex& dest, const TCost& cost )
{
- auto m = this->m_Matrix.find( orig );
+ typename TMatrix::iterator m = this->m_Matrix.find( orig );
if( m != this->m_Matrix.end( ) )
{
- auto r = m->second.find( dest );
+ typename TMatrixRow::iterator r = m->second.find( dest );
if( r != m->second.end( ) )
{
- auto e = r->second.end( );
+ typename TEdges::iterator e = r->second.end( );
for(
- auto i = r->second.begin( );
+ typename TEdges::iterator i = r->second.begin( );
i != r->second.end( ) && e == r->second.end( );
++i
)
void fpa::Base::Graph< _TVertex, _TCost, _TIndex, _TIndexCompare >::
RemoveEdges( const TIndex& orig, const TIndex& dest )
{
- auto m = this->m_Matrix.find( orig );
+ typename TMatrix::iterator m = this->m_Matrix.find( orig );
if( m != this->m_Matrix.end( ) )
{
- auto r = m->second.find( dest );
+ typename TMatrixRow::iterator r = m->second.find( dest );
if( r != m->second.end( ) )
{
m->second.erase( r );
{
std::set< _TIndex, _TIndexCompare > sinks;
- auto vIt = this->m_Vertices.begin( );
+ typename TVertices::iterator vIt = this->m_Vertices.begin( );
for( ; vIt != this->m_Vertices.end( ); ++vIt )
sinks.insert( vIt->first );
- auto mIt = this->m_Matrix.begin( );
+ typename TMatrix::iterator mIt = this->m_Matrix.begin( );
for( ; mIt != this->m_Matrix.end( ); ++mIt )
sinks.erase( mIt->first );