Commit c7c5e884 authored by Jan Möbius's avatar Jan Möbius

Removed delegate constructors (Sorry) to support VS2008

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free-Staging@16331 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 98afca9e
......@@ -48,12 +48,37 @@ SparseMatrix< T >::SparseMatrix( void )
m_ppElements = NullPointer< Pointer( MatrixEntry< T > ) >( );
}
template< class T > SparseMatrix< T >::SparseMatrix( int rows ) : SparseMatrix< T >() { Resize( rows ); }
template< class T > SparseMatrix< T >::SparseMatrix( int rows , int maxEntriesPerRow ) : SparseMatrix< T >() { Resize( rows , maxEntriesPerRow ); }
template< class T > SparseMatrix< T >::SparseMatrix( int rows ) {
_contiguous = false;
_maxEntriesPerRow = 0;
rows = 0;
rowSizes = NullPointer< int >( );
m_ppElements = NullPointer< Pointer( MatrixEntry< T > ) >( );
Resize( rows );
}
template< class T > SparseMatrix< T >::SparseMatrix( int rows , int maxEntriesPerRow ) {
_contiguous = false;
_maxEntriesPerRow = 0;
rows = 0;
rowSizes = NullPointer< int >( );
m_ppElements = NullPointer< Pointer( MatrixEntry< T > ) >( );
Resize( rows , maxEntriesPerRow );
}
// Had to rewrite the delegating constructor as we need to support VS2008 for now
//template< class T > SparseMatrix< T >::SparseMatrix( int rows ) : SparseMatrix< T >() { Resize( rows ); }
//template< class T > SparseMatrix< T >::SparseMatrix( int rows , int maxEntriesPerRow ) : SparseMatrix< T >() { Resize( rows , maxEntriesPerRow ); }
template< class T >
SparseMatrix< T >::SparseMatrix( const SparseMatrix& M ) : SparseMatrix< T >()
{
SparseMatrix< T >::SparseMatrix( const SparseMatrix& M )
{
_contiguous = false;
_maxEntriesPerRow = 0;
rows = 0;
rowSizes = NullPointer< int >( );
m_ppElements = NullPointer< Pointer( MatrixEntry< T > ) >( );
if( M._contiguous ) Resize( M.rows , M._maxEntriesPerRow );
else Resize( M.rows );
for( int i=0 ; i<rows ; i++ )
......@@ -62,6 +87,7 @@ SparseMatrix< T >::SparseMatrix( const SparseMatrix& M ) : SparseMatrix< T >()
memcpy( (*this)[i] , M[i] , sizeof( MatrixEntry< T > ) * rowSizes[i] );
}
}
template<class T>
int SparseMatrix<T>::Entries( void ) const
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment