Changeset 958 in Sophya for trunk/SophyaLib/TArray


Ignore:
Timestamp:
Apr 18, 2000, 3:38:53 PM (25 years ago)
Author:
ansari
Message:

doc + vire warning cmv 18/04/00

Location:
trunk/SophyaLib/TArray
Files:
8 edited

Legend:

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

    r926 r958  
    6161{
    6262  uint_8 rs = step;
    63   for(int k=0; k<ndim; k++) rs *= siz[k];
     63  for(uint_4 k=0; k<ndim; k++) rs *= siz[k];
    6464  return(rs+offset);
    6565}
     
    285285{
    286286  if (ndim_ != a.ndim_)  return(false);
    287   for(int k=0; k<ndim_; k++)
     287  for(uint_4 k=0; k<ndim_; k++)
    288288    if (size_[k] != a.size_[k])  return(false);
    289289  //  $CHECK$   Reza doit-on verifier ca
     
    301301  uint_4 size[BASEARRAY_MAXNDIMS];
    302302  uint_4 step[BASEARRAY_MAXNDIMS];
    303   for(int k=0; k<ndim_; k++) {
     303  for(uint_4 k=0; k<ndim_; k++) {
    304304    if (size_[k] < 2)  continue;
    305305    size[ndim] = size_[k];
     
    324324  uint_4 size[BASEARRAY_MAXNDIMS];
    325325  uint_4 step[BASEARRAY_MAXNDIMS];
    326   for(int k=0; k<ndim_; k++) {
     326  for(uint_4 k=0; k<ndim_; k++) {
    327327    size[ndim] = size_[k];
    328328    step[ndim] = step_[k];
     
    338338uint_4 BaseArray::MinStepKA() const
    339339{
    340   for(int ka=0; ka<ndim_; ka++)
     340  for(uint_4 ka=0; ka<ndim_; ka++)
    341341    if (step_[ka] == minstep_) return(ka);
    342342  return(0);
     
    348348  uint_4 ka = 0;
    349349  uint_4 mx = size_[0];
    350   for(int k=0; k<ndim_; k++) 
     350  for(uint_4 k=0; k<ndim_; k++) 
    351351    if (size_[k] > mx) {  ka = k;  mx = size_[k];  }
    352352  return(ka);
     
    370370  //#endif
    371371  uint_4 idx[BASEARRAY_MAXNDIMS];
    372   int k;
     372  uint_4 k;
    373373  uint_8 rest = i;
    374374  idx[ka] = 0;
     
    392392
    393393  uint_4 idx[BASEARRAY_MAXNDIMS];
    394   int k;
     394  uint_4 k;
    395395  uint_8 rest = ip;
    396396  for(k=0; k<ndim_; k++) {
     
    424424  os << "\n--- " << InfoString() ;
    425425  os << " ND=" << ndim_ << " SizeX*Y*...= " ;
    426   for(int k=0; k<ndim_; k++) {
     426  for(uint_4 k=0; k<ndim_; k++) {
    427427    os << size_[k];
    428428    if (k<ndim_-1)  os << "x";
     
    431431  if (prt_lev_ > 0) {
    432432    os <<  " TotSize= " << totsize_ << " Step(X Y ...)="  ;
    433     for(int k=0; k<ndim_; k++)     os << step_[k] << "  " ;
     433    for(uint_4 k=0; k<ndim_; k++)     os << step_[k] << "  " ;
    434434    os << " Offset= " << offset_  << endl;
    435435  }
     
    483483
    484484  totsize_ = 1;
    485   int k;
     485  uint_4 k;
    486486  for(k=0; k<BASEARRAY_MAXNDIMS; k++) {
    487487    size_[k] = 1;
     
    530530
    531531  totsize_ = 1;
    532   int k;
     532  uint_4 k;
    533533  for(k=0; k<BASEARRAY_MAXNDIMS; k++) {
    534534    size_[k] = 1;
     
    584584
    585585  totsize_ = 1;
    586   int k;
     586  uint_4 k;
    587587  for(k=0; k<BASEARRAY_MAXNDIMS; k++) {
    588588    size_[k] = 1;
     
    629629  if ( (ndim > ndim_) || (ndim < 1) )
    630630    throw(SzMismatchError("BaseArray::UpdateSubArraySizes( ... ) NDim Error") );
    631   int k;
     631  uint_4 k;
    632632  for(k=0; k<ndim; k++)
    633633    if ( (siz[k]*step[k]+pos[k]) > size_[k] ) 
  • trunk/SophyaLib/TArray/fioarr.h

    r926 r958  
    3434};
    3535
    36 //! Write TArray \b obj into POutPersist stream \b os
     36/*! \ingroup TArray \fn operator<<(POutPersist&,TArray<T>&)
     37  \brief Write TArray \b obj into POutPersist stream \b os */
    3738template <class T>
    3839inline POutPersist& operator << (POutPersist& os, TArray<T> & obj)
    3940{ FIO_TArray<T> fio(&obj);  fio.Write(os);  return(os); }
    4041
    41 //! Read TArray \b obj from PInPersist stream \b os
     42/*! \ingroup TArray \fn operator>>(PInPersist&,TArray<T>&)
     43  \brief Read TArray \b obj from PInPersist stream \b os */
    4244template <class T>
    4345inline PInPersist& operator >> (PInPersist& is, TArray<T> & obj)
  • trunk/SophyaLib/TArray/matharr.h

    r942 r958  
    3333#if !defined(__GNUG__)
    3434// see below for g++   
     35/*! \ingroup TArray \fn fabs(const TArray<T>& a)
     36  \brief computation on TArray */
    3537template <class T>
    3638inline TArray<T> fabs(const TArray<T>& a)
    3739  { MathArray<T> ma;   return( ma.ApplyFunction(a, fabs) ); }
    3840
     41/*! \ingroup TArray \fn sqrt(const TArray<T>& a)
     42  \brief computation on TArray */
    3943template <class T>
    4044inline TArray<T> sqrt(const TArray<T>& a)
    4145  { MathArray<T> ma;   return( ma.ApplyFunction(a, sqrt) ); }
    4246
     47/*! \ingroup TArray \fn sin(const TArray<T>& a)
     48  \brief computation on TArray */
    4349template <class T>
    4450inline TArray<T> sin(const TArray<T>& a)
    4551  { MathArray<T> ma;   return( ma.ApplyFunction(a, sin) ); }
    4652
     53/*! \ingroup TArray \fn cos(const TArray<T>& a)
     54  \brief computation on TArray */
    4755template <class T>
    4856inline TArray<T> cos(const TArray<T>& a)
    4957  { MathArray<T> ma;   return( ma.ApplyFunction(a, cos) ); }
    5058
     59/*! \ingroup TArray \fn tan(const TArray<T>& a)
     60  \brief computation on TArray */
    5161template <class T>
    5262inline TArray<T> tan(const TArray<T>& a)
    5363  { MathArray<T> ma;   return( ma.ApplyFunction(a, tan) ); }
    5464
     65/*! \ingroup TArray \fn asin(const TArray<T>& a)
     66  \brief computation on TArray */
    5567template <class T>
    5668inline TArray<T> asin(const TArray<T>& a)
    5769  { MathArray<T> ma;   return( ma.ApplyFunction(a, asin) ); }
    5870
     71/*! \ingroup TArray \fn acos(const TArray<T>& a)
     72  \brief computation on TArray */
    5973template <class T>
    6074inline TArray<T> acos(const TArray<T>& a)
    6175  { MathArray<T> ma;   return( ma.ApplyFunction(a, acos) ); }
    6276
     77/*! \ingroup TArray \fn atan(const TArray<T>& a)
     78  \brief computation on TArray */
    6379template <class T>
    6480inline TArray<T> atan(const TArray<T>& a)
    6581  { MathArray<T> ma;   return( ma.ApplyFunction(a, atan) ); }
    6682
     83/*! \ingroup TArray \fn exp(const TArray<T>& a)
     84  \brief computation on TArray */
    6785template <class T>
    6886inline TArray<T> exp(const TArray<T>& a)
    6987  { MathArray<T> ma;   return( ma.ApplyFunction(a, exp) ); }
    7088
     89/*! \ingroup TArray \fn lof(const TArray<T>& a)
     90  \brief computation on TArray */
    7191template <class T>
    7292inline TArray<T> log(const TArray<T>& a)
    7393  { MathArray<T> ma;   return( ma.ApplyFunction(a, log) ); }
    7494
     95/*! \ingroup TArray \fn log10(const TArray<T>& a)
     96  \brief computation on TArray */
    7597template <class T>
    7698inline TArray<T> log10(const TArray<T>& a)
     
    83105#endif
    84106
    85 //! Return \b mean and \b sigma of elements of array \b a
     107/*! \ingroup TArray \fn MeanSigma(const TArray<T>&,double&,double&)
     108  \brief Return \b mean and \b sigma of elements of array \b a */
    86109template <class T>
    87110inline double MeanSigma(const TArray<T>& a, double & mean, double & sig)
    88111  { MathArray<T> ma;   return( ma.MeanSigma(a, mean, sig) ); }
    89112
    90 //! Return \b mean of elements of array \b a
     113/*! \ingroup TArray \fn Mean(const TArray<T>&)
     114  \brief Return \b mean of elements of array \b a */
    91115template <class T>
    92116inline double Mean(const TArray<T>& a)
  • trunk/SophyaLib/TArray/sopemtx.h

    r956 r958  
    4848//------------------------------------------------------------
    4949
    50 /*! \ingroup TArray
    51     \fn LinSolveInPlace(TMatrix<r_4>&, TVector<r_4>&)
     50/*! \ingroup TArray \fn LinSolveInPlace(TMatrix<r_4>&,TVector<r_4>&)
    5251    \brief  Solve A*C = B for C in place and return determinant
    5352*/
     
    5958}
    6059
    61 /*! \ingroup TArray
    62     \fn LinSolveInPlace (TMatrix<r_8>&, TVector<r_8>&)
     60/*! \ingroup TArray \fn LinSolveInPlace(TMatrix<r_8>&,TVector<r_8>&)
    6361    \brief  Solve A*X = B in place and return determinant
    6462*/
  • trunk/SophyaLib/TArray/tarray.cc

    r926 r958  
    334334    uint_8 step = AvgStep();
    335335    pe = Data();
    336     for(k=0; k<totsize_; k++ )  pe[k*step] = seq(k);
     336    for(k=0; k<totsize_; k++ )  pe[k*step] = (T) seq(k);
    337337  }
    338338  else {    // Non regular data spacing ...
     
    344344    for(j=0; j<naxa; j++)  {
    345345      pe = mNDBlock.Begin()+Offset(ka,j);
    346       for(k=0; k<gpas; k++)  pe[k*step] = seq(j*gpas+k);
     346      for(k=0; k<gpas; k++)  pe[k*step] = (T) seq(j*gpas+k);
    347347    }
    348348  }
     
    807807{
    808808  if (maxprt < 0)  maxprt = max_nprt_;
    809   int_4 npr = 0;
     809  uint_4 npr = 0;
    810810  Show(os, si);
    811811  if (ndim_ < 1) return;
     
    822822            if(k0 > 0) os << ", "; 
    823823            os << Elem(k0, k1, k2, k3, k4);     npr++;
    824             if (npr >= maxprt) {
     824            if (npr >= (uint_4) maxprt) {
    825825              if (npr < totsize_)  os << "\n     .... " << endl; return;
    826826            }
  • trunk/SophyaLib/TArray/tarray.h

    r956 r958  
    165165// Surcharge d'operateurs A (+,-,*,/) (T) x
    166166
    167 //! Operator TArray = TArray + constant
     167/*! \ingroup TArray \fn operator+(const TArray<T>&,T)
     168  \brief Operator TArray = TArray + constant */
    168169template <class T> inline TArray<T> operator + (const TArray<T>& a, T b)
    169170    {TArray<T> result(a); result.SetTemp(true); result.Add(b); return result;}
    170171
    171 //! Operator TArray = constant + TArray
     172/*! \ingroup TArray \fn operator+(T,const TArray<T>&)
     173  \brief Operator TArray = constant + TArray */
    172174template <class T> inline TArray<T> operator + (T b,const TArray<T>& a)
    173175    {TArray<T> result(a); result.SetTemp(true); result.Add(b); return result;}
    174176
    175 //! Operator TArray = TArray - constant
     177/*! \ingroup TArray \fn operator-(const TArray<T>&,T)
     178  \brief Operator TArray = TArray - constant */
    176179template <class T> inline TArray<T> operator - (const TArray<T>& a, T b)
    177180    {TArray<T> result(a); result.SetTemp(true); result.Sub(b); return result;}
    178181
    179 //! Operator TArray = constant - TArray
     182/*! \ingroup TArray \fn operator-(T,const TArray<T>&)
     183  \brief Operator TArray = constant - TArray */
    180184template <class T> inline TArray<T> operator - (T b,const TArray<T>& a)
    181185    {TArray<T> result(a); result.SetTemp(true); result.SubInv(b); return result;}
    182186
    183 //! Operator TArray = TArray * constant
     187/*! \ingroup TArray \fn operator*(const TArray<T>&,T)
     188  \brief Operator TArray = TArray * constant */
    184189template <class T> inline TArray<T> operator * (const TArray<T>& a, T b)
    185190    {TArray<T> result(a); result.SetTemp(true); result.Mul(b); return result;}
    186191
    187 //! Operator TArray = constant * TArray
     192/*! \ingroup TArray \fn operator*(T,const TArray<T>&)
     193  \brief Operator TArray = constant * TArray */
    188194template <class T> inline TArray<T> operator * (T b,const TArray<T>& a)
    189195    {TArray<T> result(a); result.SetTemp(true); result.Mul(b); return result;}
    190196
    191 //! Operator TArray = TArray / constant
     197/*! \ingroup TArray \fn operator/(const TArray<T>&,T)
     198  \brief Operator TArray = TArray / constant */
    192199template <class T> inline TArray<T> operator / (const TArray<T>& a, T b)
    193200    {TArray<T> result(a); result.SetTemp(true); result.DivInv(b); return result;}
     
    196203// Surcharge d'operateurs C = A (+,-) B
    197204
    198 //! Operator TArray = TArray + TArray
     205/*! \ingroup TArray \fn operator+(const TArray<T>&,const TArray<T>&)
     206  \brief Operator TArray = TArray + TArray */
    199207template <class T>
    200208inline TArray<T> operator + (const TArray<T>& a,const TArray<T>& b)
    201209    {TArray<T> result(a); result.SetTemp(true); result.AddElt(b); return result;}
    202210
    203 //! Operator TArray = TArray - TArray
     211/*! \ingroup TArray \fn operator-(const TArray<T>&,const TArray<T>&)
     212  \brief Operator TArray = TArray - TArray */
    204213template <class T>
    205214inline TArray<T> operator - (const TArray<T>& a,const TArray<T>& b)
  • trunk/SophyaLib/TArray/tmatrix.cc

    r926 r958  
    1 // $Id: tmatrix.cc,v 1.7 2000-04-13 18:39:14 ansari Exp $
     1// $Id: tmatrix.cc,v 1.8 2000-04-18 13:38:52 ansari Exp $
    22//                         C.Magneville          04/99
    33#include "machdefs.h"
     
    290290{
    291291  if (maxprt < 0)  maxprt = max_nprt_;
    292   int_4 npr = 0;
     292  uint_4 npr = 0;
    293293  Show(os, si);
    294294  if (ndim_ < 1)  return;
     
    299299      if(kc > 0) os << ", "; 
    300300      os << (*this)(kr, kc);   npr++;
    301       if (npr >= maxprt) {
     301      if (npr >= (uint_4) maxprt) {
    302302        if (npr < totsize_)  os << "\n     .... " << endl; return;
    303303      }
  • trunk/SophyaLib/TArray/tmatrix.h

    r956 r958  
    126126}
    127127
    128 
    129128// Surcharge d'operateurs C = A (+,-) B
    130129// $CHECK$ Reza 3/4/2000 Pas necessaire  de redefinir les operateurs
     
    132131// Doit-on le faire aussi pour les constantes ? - Fin de $CHECK$ Reza 3/4/2000
    133132
    134 //! + : add matrixes \b a and \b b
     133/*! \ingroup TArray \fn operator+(const TMatrix<T>&,const TMatrix<T>&)
     134  \brief + : add matrixes \b a and \b b */
    135135template <class T>
    136136inline TMatrix<T> operator + (const TMatrix<T>& a,const TMatrix<T>& b)
    137137    {TMatrix<T> result(a); result.SetTemp(true); result.AddElt(b); return result;}
    138138
    139 //! - : substract matrixes \b a and \b b
     139/*! \ingroup TArray \fn operator-(const TMatrix<T>&,const TMatrix<T>&)
     140  \brief \- : substract matrixes \b a and \b b */
    140141template <class T>
    141142inline TMatrix<T> operator - (const TMatrix<T>& a,const TMatrix<T>& b)
     
    143144
    144145// Surcharge d'operateurs C = A * B
    145 //! - : multiply matrixes \b a and \b b
     146/*! \ingroup TArray \fn operator*(const TMatrix<T>&,const TMatrix<T>&)
     147  \brief * : multiply matrixes \b a and \b b */
    146148template <class T> inline TMatrix<T> operator * (const TMatrix<T>& a, const TMatrix<T>& b)
    147149{ TMatrix<T> result(a); result.SetTemp(true); return(result.Multiply(b)); }
Note: See TracChangeset for help on using the changeset viewer.