X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Finclude%2Fvector.h;h=580deb7b4e67d9b9d06c54c9ef711324a3615d25;hb=f050938d3947f6b785289da6d58f8fec2da57421;hp=edadd114f48639694a4ce6f973bdf117db5bcb64;hpb=c5feadbb145eecf6d73f793535b7e23eb18db2cb;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/include/vector.h b/lib/maracasVisuLib/include/vector.h index edadd11..580deb7 100644 --- a/lib/maracasVisuLib/include/vector.h +++ b/lib/maracasVisuLib/include/vector.h @@ -60,11 +60,11 @@ namespace gtm */ //@{ /// Default constructor. - TVector( uint N = 3, T data = ( T )0, int type = COL_VECTOR ); + TVector( uint32_t N = 3, T data = ( T )0, int type = COL_VECTOR ); /// Copy constructor. TVector( const TVector< T >& r ); /// Use this to treat an ANSI array as a TVector. - TVector( T* block, uint N, bool copy = true, int type = COL_VECTOR ); + TVector( T* block, uint32_t N, bool copy = true, int type = COL_VECTOR ); //@} /// Destructor. @@ -73,7 +73,7 @@ namespace gtm }; /// Size change - void SetN( uint N ); + void SetN( uint32_t N ); /** Assignation operators. * @@ -108,7 +108,7 @@ namespace gtm //@} /// Reference operator. - T& operator()( uint i ) { + T& operator()( uint32_t i ) { return( _vector[ i ] ); }; /// ANSI (C/C++ array) reference. @@ -116,7 +116,7 @@ namespace gtm return( _vector ); }; /// Vector's cardinality. - uint GetN( ) { + uint32_t GetN( ) { return( _N ); }; /// Vector's type (ROW_VECTOR/COL_VECTOR). @@ -197,7 +197,7 @@ namespace gtm /// Memory block. T* _vector; /// Cardinality. - uint _N; + uint32_t _N; /// Type (ROW_VECTOR/COL_VECTOR). int _type; /// Have I created _vector? @@ -208,7 +208,7 @@ namespace gtm // ----------------------------------------------------------------------------- template< class T > - TVector< T >::TVector( uint N, T data, int type ) + TVector< T >::TVector( uint32_t N, T data, int type ) { _N = N; _type = type; @@ -231,7 +231,7 @@ namespace gtm // ----------------------------------------------------------------------------- template< class T > - TVector< T >::TVector( T* block, uint N, bool copy, int type ) + TVector< T >::TVector( T* block, uint32_t N, bool copy, int type ) { _N = N; _type = type; @@ -242,7 +242,7 @@ namespace gtm // ----------------------------------------------------------------------------- template< class T > - void TVector< T >::SetN( uint N ) + void TVector< T >::SetN( uint32_t N ) { if( _myMemory ) VectorFreeMemory< T >( _vector ); _N = N; @@ -269,7 +269,7 @@ namespace gtm template< class T > bool TVector< T >::operator==( const TVector< T >& r ) { - uint i; + uint32_t i; bool ret; for( @@ -285,7 +285,7 @@ namespace gtm template< class T > bool TVector< T >::operator!=( const TVector< T >& r ) { - uint i; + uint32_t i; bool ret; for( @@ -346,7 +346,7 @@ namespace gtm TVector< T > TVector< T >::operator-( ) { TVector< T > ret( _N ); - uint i; + uint32_t i; for( i = 0; i < _N; ret._vector[ i ] = ( T )0 - _vector[ i ], i++ ); return( ret );