+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
////////////////////////////////////////////////////////////////////////////////
// vector.h
// Creation : 24/02/2000
*/
//@{
/// 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.
};
/// Size change
- void SetN( uint N );
+ void SetN( uint32_t N );
/** Assignation operators.
*
//@}
/// Reference operator.
- T& operator()( uint i ) {
+ T& operator()( uint32_t i ) {
return( _vector[ i ] );
};
/// ANSI (C/C++ array) reference.
return( _vector );
};
/// Vector's cardinality.
- uint GetN( ) {
+ uint32_t GetN( ) {
return( _N );
};
/// Vector's type (ROW_VECTOR/COL_VECTOR).
/// Memory block.
T* _vector;
/// Cardinality.
- uint _N;
+ uint32_t _N;
/// Type (ROW_VECTOR/COL_VECTOR).
int _type;
/// Have I created _vector?
// -----------------------------------------------------------------------------
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;
// -----------------------------------------------------------------------------
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;
// -----------------------------------------------------------------------------
template< class T >
- void TVector< T >::SetN( uint N )
+ void TVector< T >::SetN( uint32_t N )
{
if( _myMemory ) VectorFreeMemory< T >( _vector );
_N = N;
template< class T >
bool TVector< T >::operator==( const TVector< T >& r )
{
- uint i;
+ uint32_t i;
bool ret;
for(
template< class T >
bool TVector< T >::operator!=( const TVector< T >& r )
{
- uint i;
+ uint32_t i;
bool ret;
for(
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 );