Changeset 926 in Sophya for trunk/SophyaLib/TArray
- Timestamp:
- Apr 13, 2000, 8:39:39 PM (25 years ago)
- Location:
- trunk/SophyaLib/TArray
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/basarr.cc
r894 r926 7 7 #include "pexceptions.h" 8 8 #include "basarr.h" 9 10 /*! 11 \class SOPHYA::BaseArray 12 \ingroup TArray 13 Base class for template arrays 14 No data are connected to this class. 15 16 Define base methods, enum and defaults for TArray , TMatrix and TVector. 17 */ 9 18 10 19 // Variables statiques globales -
trunk/SophyaLib/TArray/basarr.h
r920 r926 21 21 // ------------ classe template Array ----------- 22 22 //! Base class for template arrays 23 /*!24 \class SOPHYA::BaseArray25 \ingroup TArray26 No data are connected to this class.27 28 Define base methods, enum and defaults for TArray , TMatrix and TVector.29 */30 23 class BaseArray : public AnyDataObj { 31 24 public: -
trunk/SophyaLib/TArray/fioarr.cc
r894 r926 11 11 // Les objets delegues pour la gestion de persistance 12 12 // -------------------------------------------------------- 13 /*! 14 \class SOPHYA::FIO_TArray 15 \ingroup TArray 16 Class for persistent management of TArray 17 18 This class manage also persistence for TMatrix and TVector. 19 \sa TArray TMatrix TVector. 20 */ 13 21 /////////////////////////////////////////////////////////// 14 22 -
trunk/SophyaLib/TArray/fioarr.h
r920 r926 16 16 ///////////////////////////////////////////////////////////////////////// 17 17 //! Class for persistent management of TArray 18 /*!19 \class SOPHYA::FIO_TArray20 \ingroup TArray21 This class manage also persistence for TMatrix and TVector.22 \sa TArray TMatrix TVector.23 */24 18 template <class T> 25 19 class FIO_TArray : public PPersist { -
trunk/SophyaLib/TArray/matharr.cc
r894 r926 10 10 // ---------------------------------------------------- 11 11 12 /*! 13 \class SOPHYA::MathArray 14 \ingroup TArray 15 Class for simple mathematical operation on arrays 16 \warning Instanciated only for \b real and \b double (r_4, r_8) type arrays 17 */ 12 18 13 19 //! Apply Function In Place (function double version) -
trunk/SophyaLib/TArray/matharr.h
r920 r926 13 13 14 14 //! Class for simple mathematical operation on arrays 15 /*!16 \class SOPHYA::MathArray17 \ingroup TArray18 \warning Instanciated only for \b real and \b double (r_4, r_8) type arrays19 */20 15 template <class T> 21 16 class MathArray { -
trunk/SophyaLib/TArray/sopemtx.cc
r813 r926 14 14 // ------------------------------------------------------------- 15 15 //////////////////////////////////////////////////////////////// 16 ///////////////////////////////////////////////////////////////////////// 17 // Classe de lignes/colonnes de matrices 18 enum TRCKind {TmatrixRow=0, TmatrixCol=1, TmatrixDiag=2}; 16 17 //! Class of line, column or diagonal of a TMatrix 18 /*! 19 A TMatrixRC represents a line, a column or the diagonal of a TMatrix 20 */ 19 21 template <class T> 20 22 class TMatrixRC { 21 23 public: 24 //! Define type of TMatrixRC 25 enum TRCKind { 26 TmatrixRow=0, //!< TMatrixRC ligne 27 TmatrixCol=1, //!< TMatrixRC column 28 TmatrixDiag=2 //!< TMatrixRC diagonal 29 }; 22 30 TMatrixRC(); 23 31 TMatrixRC(TMatrix<T>& m, TRCKind kind, uint_4 index=0); … … 39 47 static T* Org(const TMatrix<T>&, TRCKind rckind, uint_4 ind=0); 40 48 49 //! Return the kind of TMatrix (line,column,diagonal) 41 50 TRCKind Kind() const { return kind; } 42 51 uint_4 NElts() const; … … 67 76 static void Swap(TMatrixRC<T>& rc1, TMatrixRC<T>& rc2); 68 77 78 //! Define Absolute value for uint_1 69 79 inline static double Abs_Value(uint_1 v) {return (double) v;} 80 //! Define Absolute value for uint_2 70 81 inline static double Abs_Value(uint_2 v) {return (double) v;} 82 //! Define Absolute value for int_2 71 83 inline static double Abs_Value(int_2 v) {return (v>0)? (double) v: (double) -v;} 84 //! Define Absolute value for int_4 72 85 inline static double Abs_Value(int_4 v) {return (v>0)? (double) v: (double) -v;} 86 //! Define Absolute value for int_8 73 87 inline static double Abs_Value(int_8 v) {return (v>0)? (double) v: (double) -v;} 88 //! Define Absolute value for uint_4 74 89 inline static double Abs_Value(uint_4 v) {return (double) v;} 90 //! Define Absolute value for uint_8 75 91 inline static double Abs_Value(uint_8 v) {return (double) v;} 92 //! Define Absolute value for r_4 76 93 inline static double Abs_Value(r_4 v) {return (double) fabsf(v);} 94 //! Define Absolute value for r_8 77 95 inline static double Abs_Value(r_8 v) {return fabs(v);} 78 inline static double Abs_Value(complex<float> v) 96 //! Define Absolute value for complex r_4 97 inline static double Abs_Value(complex<r_4> v) 79 98 {return sqrt(v.real()*v.real()+v.imag()*v.imag());} 80 inline static double Abs_Value(complex<double> v) 99 //! Define Absolute value for complex r_8 100 inline static double Abs_Value(complex<r_8> v) 81 101 {return sqrt(v.real()*v.real()+v.imag()*v.imag());} 82 102 83 103 protected: 84 TMatrix<T>* matrix; 85 T* data; 86 int_4 index; 87 uint_4 step; 88 TRCKind kind; 104 TMatrix<T>* matrix; //!< pointer to the TMatrix 105 T* data; //!< pointer to the beginnig of interesting datas 106 int_4 index; //!< index of the line/column 107 uint_4 step; //!< step of the line/column 108 TRCKind kind; //!< type: line, column or diagonal 89 109 }; 90 110 91 111 92 112 //! Multiply two TMatrixRC 93 113 template <class T> 94 114 inline T operator * (const TMatrixRC<T>& a, const TMatrixRC<T>& b) … … 103 123 } 104 124 105 125 //! Get the step in datas for a TMatrix for type rckind (line/col/diag) 106 126 template <class T> 107 127 inline uint_4 TMatrixRC<T>::Step(const TMatrix<T>& m, TRCKind rckind) … … 111 131 return 0; } 112 132 133 /*! Get the origin of datas for a TMatrix for type rckind and 134 number index (line/col/diag). ex: origine for line "index". */ 113 135 template <class T> 114 136 inline T* TMatrixRC<T>::Org(const TMatrix<T>& m, TRCKind rckind, uint_4 index) … … 118 140 return NULL; } 119 141 142 //! return number of elements for a TMatrixRC 120 143 template <class T> inline uint_4 TMatrixRC<T>::NElts() const 121 144 { if (!matrix) return 0; … … 125 148 return 0; } 126 149 150 //! access of element \b i 127 151 template <class T> 128 152 inline T& TMatrixRC<T>::operator()(uint_4 i) {return data[i*step];} 153 //! access of element \b i 129 154 template <class T> 130 155 inline T TMatrixRC<T>::operator()(uint_4 i) const {return data[i*step];} 131 156 132 157 //////////////////////////////////////////////////////////////// 133 // Typedef pour simplifier et compatibilite Peida158 //! Typedef to simplifier TMatrixRC<r_8> 134 159 typedef TMatrixRC<r_8> MatrixRC; 135 160 136 161 162 //! Default constructor 137 163 template <class T> TMatrixRC<T>::TMatrixRC() 138 164 : matrix(NULL), data(NULL), index(0), step(0) 139 165 {} 140 166 167 //! Constructor 168 /*! 169 \param m : matrix 170 \param rckind : select line, column or diagonal 171 \param ind : number of the line or column 172 */ 141 173 template <class T> TMatrixRC<T>::TMatrixRC(TMatrix<T>& m,TRCKind rckind,uint_4 ind) 142 174 : matrix(&m), data(Org(m,rckind,ind)), … … 150 182 // Acces aux rangees et colonnes de matrices 151 183 184 //! Return TMatrixRC for line \b r of matrix \b m 152 185 template <class T> 153 186 TMatrixRC<T> TMatrixRC<T>::Row(TMatrix<T> & m, uint_4 r) … … 157 190 } 158 191 192 //! Return TMatrixRC for column \b r of matrix \b m 159 193 template <class T> 160 194 TMatrixRC<T> TMatrixRC<T>::Col(TMatrix<T> & m, uint_4 c) … … 164 198 } 165 199 200 //! Return TMatrixRC for diagonal of matrix \b m 166 201 template <class T> 167 202 TMatrixRC<T> TMatrixRC<T>::Diag(TMatrix<T> & m) … … 197 232 // } 198 233 199 234 //! Set column \b c for this TMatrixRC 200 235 template <class T> int_4 TMatrixRC<T>::SetCol(int_4 c) 201 236 { … … 209 244 } 210 245 246 //! Set line \b r for this TMatrixRC 211 247 template <class T> int_4 TMatrixRC<T>::SetRow(int_4 r) 212 248 { … … 220 256 } 221 257 258 //! Set line diaginal for this TMatrixRC 222 259 template <class T> int_4 TMatrixRC<T>::SetDiag() 223 260 { … … 232 269 } 233 270 234 271 //! Operator = 235 272 template <class T> TMatrixRC<T>& TMatrixRC<T>::operator = (const TMatrixRC<T>& rc) 236 273 { … … 271 308 // } 272 309 273 310 //! Operator to multiply by constant \b x 274 311 template <class T> TMatrixRC<T>& TMatrixRC<T>::operator *= (T x) 275 312 { … … 278 315 } 279 316 317 //! Operator to divide by constant \b x 280 318 template <class T> TMatrixRC<T>& TMatrixRC<T>::operator /= (T x) 281 319 { … … 298 336 // } 299 337 338 //! Linear combination 339 /*! 340 Do : \f$ MRC(i) = MRC(i)*a + rc(i)*b \f$ 341 \return *this 342 */ 300 343 template <class T> 301 344 TMatrixRC<T>& TMatrixRC<T>::LinComb(T a, T b, const TMatrixRC<T>& rc, uint_4 first) … … 309 352 } 310 353 354 //! Linear combination 355 /*! 356 Do : \f$ MRC(i) = MRC(i) + rc(i)*b \f$ 357 */ 311 358 template <class T> 312 359 TMatrixRC<T>& TMatrixRC<T>::LinComb(T b, const TMatrixRC<T>& rc, uint_4 first) … … 320 367 } 321 368 369 //! Find maximum absolute value in TMatrixRC, search begin at \b first 322 370 template <class T> uint_4 TMatrixRC<T>::IMaxAbs(uint_4 first) 323 371 { … … 333 381 } 334 382 383 //! Print on stream \b os 335 384 template <class T> 336 385 void TMatrixRC<T>::Print(ostream & os) const … … 346 395 } 347 396 397 //! Swap two TMatrixRC of the same kind 348 398 template <class T> 349 399 void TMatrixRC<T>::Swap(TMatrixRC<T>& rc1, TMatrixRC<T>& rc2) … … 359 409 360 410 361 362 363 411 //////////////////////////////////////////////////////////////// 412 // ------------------------------------------------------------- 413 // La classe de calcul simple sur les TMatrix 414 // ------------------------------------------------------------- 415 //////////////////////////////////////////////////////////////// 416 364 417 //**** Pour inversion 365 418 #ifndef M_LN2 … … 373 426 #endif 374 427 428 //! Gaussian pivoting 429 /*! 430 Diagonalize matrix \b a, doing the same opreations on matrix \b b 431 \return determinat of \b a 432 */ 375 433 template <class T> 376 434 T SimpleMatrixOperation<T>::GausPiv(TMatrix<T>& a, TMatrix<T>& b) … … 394 452 double nrm = sqrt(vmin*vmax); 395 453 if(nrm > 1.e5 || nrm < 1.e-5) { 396 a /= nrm;397 b /= nrm;454 a /= (T) nrm; 455 b /= (T) nrm; 398 456 //cout << "normalisation matrice " << nrm << endl; 399 457 } else nrm=1; 400 458 401 double det = 1.0;459 T det = 1; 402 460 if(nrm != 1) { 403 461 double ld = a.NRows() * log(nrm); … … 405 463 // cerr << "TMatrix warning, overflow for det" << endl; 406 464 } else { 407 det = exp(ld);408 } 409 } 410 411 TMatrixRC<T> pivRowa(a,T matrixRow);412 TMatrixRC<T> pivRowb(b,T matrixRow);465 det = (T) exp(ld); 466 } 467 } 468 469 TMatrixRC<T> pivRowa(a,TMatrixRC<T>::TmatrixRow); 470 TMatrixRC<T> pivRowb(b,TMatrixRC<T>::TmatrixRow); 413 471 414 472 for(uint_4 k=0; k<n-1; k++) { … … 422 480 TMatrixRC<T>::Swap(bIPiv,bK); 423 481 } 424 doublepivot = a(k,k);425 if (fabs(pivot) < 1.e-50) return 0.0;482 T pivot = a(k,k); 483 if( TMatrixRC<T>::Abs_Value(pivot) < 1.e-50 ) return (T) 0; 426 484 //det *= pivot; 427 485 pivRowa.SetRow(k); // to avoid constructors 428 486 pivRowb.SetRow(k); 429 487 for (uint_4 i=k+1; i<n; i++) { 430 doubler = -a(i,k)/pivot;488 T r = -a(i,k)/pivot; 431 489 TMatrixRC<T>::Row(a, i).LinComb(r, pivRowa); // + rapide que -= r * pivRowa 432 490 TMatrixRC<T>::Row(b, i).LinComb(r, pivRowb); … … 437 495 // on remonte 438 496 for(uint_4 kk=n-1; kk>0; kk--) { 439 doublepivot = a(kk,kk);440 if (fabs(pivot) <= 1.e-50) return 0.0;497 T pivot = a(kk,kk); 498 if( TMatrixRC<T>::Abs_Value(pivot) <= 1.e-50 ) return (T) 0; 441 499 pivRowa.SetRow(kk); // to avoid constructors 442 500 pivRowb.SetRow(kk); 443 501 for(uint_4 jj=0; jj<kk; jj++) { 444 doubler = -a(jj,kk)/pivot;502 T r = -a(jj,kk)/pivot; 445 503 TMatrixRC<T>::Row(a, jj).LinComb(r, pivRowa); 446 504 TMatrixRC<T>::Row(b, jj).LinComb(r, pivRowb); … … 449 507 450 508 for(uint_4 l=0; l<n; l++) { 451 if (fabs((double)a(l,l)) <= 1.e-50) return 0.0;509 if( TMatrixRC<T>::Abs_Value(a(l,l)) <= 1.e-50 ) return (T) 0; 452 510 TMatrixRC<T>::Row(b, l) /= a(l,l); 453 511 } … … 456 514 } 457 515 516 //! Return the inverse matrix of \b A 458 517 template <class T> 459 518 TMatrix<T> SimpleMatrixOperation<T>::Inverse(TMatrix<T> const & A) 460 // Inversion461 519 { 462 520 TMatrix<T> a(A); 463 521 TMatrix<T> b(a.NCols(),a.NRows()); b = IdentityMatrix(1.); 464 if( fabs((double)GausPiv(a,b)) < 1.e-50)465 throw(MathExc("TMatrix Inverse() Singular OMatrix"));522 if( TMatrixRC<T>::Abs_Value(GausPiv(a,b)) < 1.e-50) 523 throw(MathExc("TMatrix Inverse() Singular Matrix")); 466 524 return b; 467 525 } 468 526 527 528 //////////////////////////////////////////////////////////////// 529 // ------------------------------------------------------------- 530 // La classe fit lineaire 531 // ------------------------------------------------------------- 532 //////////////////////////////////////////////////////////////// 469 533 470 534 LinFitter::LinFitter() … … 626 690 #pragma define_template TMatrixRC<r_4> 627 691 #pragma define_template TMatrixRC<r_8> 692 #pragma define_template TMatrixRC< complex<r_4> > 693 #pragma define_template TMatrixRC< complex<r_8> > 628 694 #pragma define_template SimpleMatrixOperation<int_4> 629 695 #pragma define_template SimpleMatrixOperation<r_4> 630 696 #pragma define_template SimpleMatrixOperation<r_8> 697 #pragma define_template SimpleMatrixOperation< complex<r_4> > 698 #pragma define_template SimpleMatrixOperation< complex<r_8> > 631 699 #endif 632 700 … … 636 704 template class TMatrixRC<r_4>; 637 705 template class TMatrixRC<r_8>; 706 template class TMatrixRC< complex<r_4> >; 707 template class TMatrixRC< complex<r_8> >; 638 708 template class SimpleMatrixOperation<int_4>; 639 709 template class SimpleMatrixOperation<r_4>; 640 710 template class SimpleMatrixOperation<r_8>; 711 template class SimpleMatrixOperation< complex<r_4> >; 712 template class SimpleMatrixOperation< complex<r_8> >; 641 713 #endif -
trunk/SophyaLib/TArray/sopemtx.h
r850 r926 7 7 #include "tvector.h" 8 8 9 // doivent imperativement reste avant le namespace SOPHYA ! 10 /*! 11 \class SOPHYA::SimpleMatrixOperation 12 \ingroup TArray 13 Class for simple operation on TMatrix 14 \sa TMatrix TArray 15 */ 16 /*! 17 \class SOPHYA::LinFitter 18 \ingroup TArray 19 Class for linear fitting 20 \sa TMatrix TArray 21 */ 22 9 23 namespace SOPHYA { 10 24 11 12 13 25 //////////////////////////////////////////////////////////////// 26 //! Class for simple operation on TMatrix 14 27 template <class T> 15 28 class SimpleMatrixOperation { 16 29 public: 17 // Pivot de Gauss : diagonalise la matrice A, en effectuant les memes18 // operations sur la matrice B19 30 static TMatrix<T> Inverse(TMatrix<T> const & A); 20 31 static T GausPiv(TMatrix<T>& A, TMatrix<T>& B); 21 32 }; 22 33 34 //////////////////////////////////////////////////////////////// 23 35 // Resolution du systeme A*C = B 36 //! Solve A*C = B for C in place and return determinant 37 /*! \ingroup TArray \fn LinSolveInPlace */ 38 inline r_4 LinSolveInPlace(TMatrix<r_4>& a, TVector<r_4>& b) 39 { 40 if(a.NCols() != b.NRows() || a.NCols() != a.NRows()) 41 throw(SzMismatchError("LinSolveInPlace(TMatrix<r_4>,TVector<r_4>) size mismatch")); 42 return SimpleMatrixOperation<r_4>::GausPiv(a,b); 43 } 44 45 //! Solve A*X = B in place and return determinant 46 /*! \ingroup TArray \fn LinSolveInPlace */ 24 47 inline r_8 LinSolveInPlace(TMatrix<r_8>& a, TVector<r_8>& b) 25 48 { … … 29 52 } 30 53 31 // Resolution du systeme A*C = B, avec C retourne dans B 32 inline r_8 LinSolve(const TMatrix<r_8>& a, const TVector<r_8>& b, TVector<r_8>& c) 33 { 54 //! Solve A*X = B in place and return determinant 55 /*! \ingroup TArray \fn LinSolveInPlace */ 56 inline complex<r_4> LinSolveInPlace(TMatrix< complex<r_4> >& a, TVector< complex<r_4> >& b) 57 { 34 58 if(a.NCols() != b.NRows() || a.NCols() != a.NRows()) 35 throw(SzMismatchError("LinSolve(TMatrix<r_8>,TVector<r_8>) size mismatch")); 36 c = b; 37 TMatrix<r_8> a1(a); 38 return SimpleMatrixOperation<r_8>::GausPiv(a1,c); 59 throw(SzMismatchError("LinSolveInPlace(TMatrix< complex<r_4> >,TVector< complex<r_4> >) size mismatch")); 60 return SimpleMatrixOperation< complex<r_4> >::GausPiv(a,b); 39 61 } 40 62 41 inline r_4 LinSolve(const TMatrix<r_4>& a, const TVector<r_4>& b, TVector<r_4>& c) 42 { 63 //! Solve A*X = B in place and return determinant 64 /*! \ingroup TArray \fn LinSolveInPlace */ 65 inline complex<r_8> LinSolveInPlace(TMatrix< complex<r_8> >& a, TVector< complex<r_8> >& b) 66 { 43 67 if(a.NCols() != b.NRows() || a.NCols() != a.NRows()) 44 throw(SzMismatchError("LinSolve(TMatrix<r_4>,TVector<r_4>) size mismatch")); 45 c = b; 46 TMatrix<r_4> a1(a); 47 return SimpleMatrixOperation<r_4>::GausPiv(a1,c); 68 throw(SzMismatchError("LinSolveInPlace(TMatrix< complex<r_8> >,TVector< complex<r_8> >) size mismatch")); 69 return SimpleMatrixOperation< complex<r_8> >::GausPiv(a,b); 48 70 } 49 71 50 // Inverse d'une matrice 51 inline TMatrix<r_8> Inverse(TMatrix<r_8> const & A) 52 { 53 return SimpleMatrixOperation<r_8>::Inverse(A); 72 //////////////////////////////////////////////////////////////// 73 // Resolution du systeme A*C = B, avec C retourne dans B 74 //! Solve A*C = B and return C and determinant 75 /*! \ingroup TArray \fn LinSolve */ 76 inline r_4 LinSolve(const TMatrix<r_4>& a, const TVector<r_4>& b, TVector<r_4>& c) { 77 if(a.NCols()!=b.NRows() || a.NCols()!=a.NRows()) 78 throw(SzMismatchError("LinSolve(TMatrix<r_4>,TVector<r_4>) size mismatch")); 79 c = b; TMatrix<r_4> a1(a); 80 return SimpleMatrixOperation<r_4>::GausPiv(a1,c); 54 81 } 55 82 56 inline TMatrix<r_4> Inverse(TMatrix<r_4> const & A) 57 { 58 return SimpleMatrixOperation<r_4>::Inverse(A); 83 //! Solve A*C = B and return C and determinant 84 /*! \ingroup TArray \fn LinSolve */ 85 inline r_8 LinSolve(const TMatrix<r_8>& a, const TVector<r_8>& b, TVector<r_8>& c) { 86 if(a.NCols()!=b.NRows() || a.NCols()!=a.NRows()) 87 throw(SzMismatchError("LinSolve(TMatrix<r_8>,TVector<r_8>) size mismatch")); 88 c = b; TMatrix<r_8> a1(a); 89 return SimpleMatrixOperation<r_8>::GausPiv(a1,c); 59 90 } 60 91 92 //! Solve A*C = B and return C and determinant 93 /*! \ingroup TArray \fn LinSolve */ 94 inline complex<r_4> LinSolve(const TMatrix< complex<r_4> >& a, const TVector< complex<r_4> >& b, TVector< complex<r_4> >& c) { 95 if(a.NCols()!=b.NRows() || a.NCols()!=a.NRows()) 96 throw(SzMismatchError("LinSolve(TMatrix< complex<r_4> >,TVector< complex<r_4> >) size mismatch")); 97 c = b; TMatrix< complex<r_4> > a1(a); 98 return SimpleMatrixOperation< complex<r_4> >::GausPiv(a1,c); 99 } 100 101 //! Solve A*C = B and return C and determinant 102 /*! \ingroup TArray \fn LinSolve */ 103 inline complex<r_8> LinSolve(const TMatrix< complex<r_8> >& a, const TVector< complex<r_8> >& b, TVector< complex<r_8> >& c) { 104 if(a.NCols()!=b.NRows() || a.NCols()!=a.NRows()) 105 throw(SzMismatchError("LinSolve(TMatrix< complex<r_8> >,TVector< complex<r_8> >) size mismatch")); 106 c = b; TMatrix< complex<r_8> > a1(a); 107 return SimpleMatrixOperation< complex<r_8> >::GausPiv(a1,c); 108 } 109 110 //////////////////////////////////////////////////////////////// 111 // Inverse d'une matrice 112 //! To inverse a TMatrix 113 /*! \ingroup TArray \fn Inverse */ 114 inline TMatrix<r_4> Inverse(TMatrix<r_4> const & A) 115 {return SimpleMatrixOperation<r_4>::Inverse(A);} 116 //! To inverse a TMatrix 117 /*! \ingroup TArray \fn Inverse */ 118 inline TMatrix<r_8> Inverse(TMatrix<r_8> const & A) 119 {return SimpleMatrixOperation<r_8>::Inverse(A);} 120 //! To inverse a TMatrix 121 /*! \ingroup TArray \fn Inverse */ 122 inline TMatrix< complex<r_4> > Inverse(TMatrix< complex<r_4> > const & A) 123 {return SimpleMatrixOperation< complex<r_4> >::Inverse(A);} 124 //! To inverse a TMatrix 125 /*! \ingroup TArray \fn Inverse */ 126 inline TMatrix< complex<r_8> > Inverse(TMatrix< complex<r_8> > const & A) 127 {return SimpleMatrixOperation< complex<r_8> >::Inverse(A);} 61 128 62 129 //-------------------------------------- … … 64 131 //-------------------------------------- 65 132 133 //! Class for linear fitting 66 134 class LinFitter { 67 135 public : -
trunk/SophyaLib/TArray/tarray.cc
r922 r926 9 9 #include "tarray.h" 10 10 11 12 11 /*! 12 \class SOPHYA::TArray 13 \ingroup TArray 14 Class for template arrays 15 16 This class implements arrays of dimensions up to 17 \ref BASEARRAY_MAXNDIMS "BASEARRAY_MAXNDIMS" 18 */ 13 19 14 20 // ------------------------------------------------------- -
trunk/SophyaLib/TArray/tarray.h
r920 r926 24 24 25 25 //! Class for template arrays 26 /*!27 \class SOPHYA::TArray28 \ingroup TArray29 This class implements arrays of dimensions up to30 \ref BASEARRAY_MAXNDIMS "BASEARRAY_MAXNDIMS"31 */32 26 template <class T> 33 27 class TArray : public BaseArray { -
trunk/SophyaLib/TArray/tarrinit.cc
r920 r926 10 10 */ 11 11 12 int TArrayInitiator::FgInit = 0;13 14 12 /*! 15 13 \class SOPHYA::TArrayInitiator … … 17 15 Array Matrices and Vector initiator 18 16 */ 17 18 int TArrayInitiator::FgInit = 0; 19 19 20 TArrayInitiator::TArrayInitiator() 20 21 : SophyaInitiator() -
trunk/SophyaLib/TArray/tarrinit.h
r894 r926 11 11 namespace SOPHYA { 12 12 13 //! Class to initialize the TArray's classes13 //! Array Matrices and Vector initiator 14 14 class TArrayInitiator : public SophyaInitiator { 15 15 private: -
trunk/SophyaLib/TArray/tmatrix.cc
r894 r926 1 // $Id: tmatrix.cc,v 1. 6 2000-04-12 17:42:21ansari Exp $1 // $Id: tmatrix.cc,v 1.7 2000-04-13 18:39:14 ansari Exp $ 2 2 // C.Magneville 04/99 3 3 #include "machdefs.h" … … 7 7 #include "tmatrix.h" 8 8 9 10 9 /*! 10 \class SOPHYA::TMatrix 11 \ingroup TArray 12 Class of matrixes 13 \sa TArray 14 */ 11 15 12 16 //////////////////////////////////////////////////////////////// -
trunk/SophyaLib/TArray/tmatrix.h
r920 r926 9 9 namespace SOPHYA { 10 10 11 //! Class of matrixes 12 /*! 13 \class SOPHYA::TMatrix 14 \ingroup TArray 15 \sa TArray 16 */ 17 11 //! Class of matrices 18 12 template <class T> 19 13 class TMatrix : public TArray<T> { -
trunk/SophyaLib/TArray/triangmtx.h
r920 r926 7 7 #include "pexceptions.h" 8 8 9 // doit etre mis en dehors du namespace 10 /*! 11 \class SOPHYA::TriangularMatrix 12 \ingroup TArray 13 Class for inferior triangular matrix (base class for the class Alm) 14 */ 15 9 16 namespace SOPHYA { 10 17 11 18 //! Class for inferior triangular matrix (base class for the class Alm) 12 /*!13 \class SOPHYA::TriangularMatrix14 \ingroup TArray15 Class for triangular matrices16 */17 19 template <class T> 18 20 class TriangularMatrix { -
trunk/SophyaLib/TArray/tvector.cc
r914 r926 1 // $Id: tvector.cc,v 1. 5 2000-04-13 16:04:49ansari Exp $1 // $Id: tvector.cc,v 1.6 2000-04-13 18:39:16 ansari Exp $ 2 2 // C.Magneville 04/99 3 3 #include "machdefs.h" … … 5 5 #include "pexceptions.h" 6 6 #include "tvector.h" 7 8 /*! 9 \class SOPHYA::TVector 10 \ingroup TArray 11 Class of vector (line or column) 12 \sa TMatrix TArray 13 */ 7 14 8 15 //////////////////////////////////////////////////////////////// -
trunk/SophyaLib/TArray/tvector.h
r920 r926 9 9 10 10 //! Class of vector (line or column) 11 /*!12 \class SOPHYA::TVector13 \ingroup TArray14 \sa TMatrix TArray15 */16 11 template <class T> 17 12 class TVector : public TMatrix<T> { -
trunk/SophyaLib/TArray/utilarr.cc
r894 r926 9 9 10 10 ////////////////////////////////////////////////////////// 11 /*! 12 \class SOPHYA::RandomSequence 13 \ingroup TArray 14 Class to generate a random sequence of values 15 */ 16 11 17 //! Constructor 12 18 /*! … … 32 38 33 39 ////////////////////////////////////////////////////////// 40 /*! 41 \class SOPHYA::Sequence 42 \ingroup TArray 43 Class to generate a sequence of values 44 */ 45 34 46 //! Constructor 35 47 /*! … … 88 100 89 101 ////////////////////////////////////////////////////////// 102 /*! 103 \class SOPHYA::Range 104 \ingroup TArray 105 Class to define a range of indexes 106 */ 107 90 108 //! Constructor 91 109 /*! … … 126 144 127 145 ////////////////////////////////////////////////////////// 146 /*! 147 \class SOPHYA::IdentityMatrix 148 \ingroup TArray 149 Class to define an identity matrix 150 */ 151 128 152 //! Constructor of a (n,n) diagonal matrix with value diag on the diagonal 129 153 IdentityMatrix::IdentityMatrix(double diag, uint_4 n) -
trunk/SophyaLib/TArray/utilarr.h
r920 r926 20 20 ////////////////////////////////////////////////////////// 21 21 //! Class to generate a random sequence of values 22 /*!23 \class SOPHYA::RandomSequence24 \ingroup TArray25 */26 22 class RandomSequence { 27 23 public: … … 42 38 ////////////////////////////////////////////////////////// 43 39 //! Class to generate a sequence of values 44 /*!45 \class SOPHYA::Sequence46 \ingroup TArray47 */48 40 class Sequence { 49 41 public: … … 66 58 ////////////////////////////////////////////////////////// 67 59 //! Class to define a range of indexes 68 /*!69 \class SOPHYA::Range70 \ingroup TArray71 */72 60 class Range { 73 61 public: … … 90 78 ////////////////////////////////////////////////////////// 91 79 //! Class to define an identity matrix 92 /*!93 \class SOPHYA::IdentityMatrix94 \ingroup TArray95 */96 80 class IdentityMatrix { 97 81 public:
Note:
See TracChangeset
for help on using the changeset viewer.