Changeset 1156 in Sophya for trunk/SophyaLib/TArray/tvector.cc


Ignore:
Timestamp:
Aug 29, 2000, 6:10:32 PM (25 years ago)
Author:
ansari
Message:

Introduction du type sa_size_t (taille des tableaux), operateur - (TArray::operator - et NegateElt()) - Reza 29/8/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/TArray/tvector.cc

    r1103 r1156  
    1 // $Id: tvector.cc,v 1.10 2000-07-27 00:00:10 ansari Exp $
     1// $Id: tvector.cc,v 1.11 2000-08-29 16:10:31 ansari Exp $
    22//                         C.Magneville          04/99
    33#include "machdefs.h"
     
    3131 */
    3232template <class T>
    33 TVector<T>::TVector(uint_4 n, short lcv, short mm)
     33TVector<T>::TVector(sa_size_t n, short lcv, short mm)
    3434// Constructeur
    3535  : TMatrix<T>(1,1,mm)
     
    121121 */
    122122template <class T>
    123 void TVector<T>::ReSize(uint_4 n, short lcv)
     123void TVector<T>::ReSize(sa_size_t n, short lcv)
    124124{
    125125  if( n == 0 )
    126126    throw(SzMismatchError("TVector::ReSize() n = 0 "));
    127   uint_4 r,c;
     127  sa_size_t r,c;
    128128  if (lcv == SameVectorType)  lcv = GetVectorType();
    129129  else if ( (lcv != ColumnVector) && (lcv != RowVector) ) lcv = GetDefaultVectorType();
     
    143143 */
    144144template <class T>
    145 void TVector<T>::Realloc(uint_4 n, short lcv, bool force)
     145void TVector<T>::Realloc(sa_size_t n, short lcv, bool force)
    146146{
    147147  if( n == 0 )
    148148    throw(SzMismatchError("TVector::Realloc() n = 0 "));
    149   uint_4 r,c;
     149  sa_size_t r,c;
    150150  if (lcv == SameVectorType)  lcv = GetVectorType();
    151151  else if ( (lcv != ColumnVector) && (lcv != RowVector) ) lcv = GetDefaultVectorType();
     
    175175{
    176176  T ret = 0;
    177   for(uint_8 k=0; k<Size(); k++)   ret += (*this)(k)*(*this)(k);
     177  for(sa_size_t k=0; k<Size(); k++)   ret += (*this)(k)*(*this)(k);
    178178  return ret;
    179179}
Note: See TracChangeset for help on using the changeset viewer.