Changeset 2421 in Sophya for trunk/SophyaLib/TArray/sopemtx.cc


Ignore:
Timestamp:
Aug 8, 2003, 3:07:06 PM (22 years ago)
Author:
ansari
Message:
  • Modifications methodes TMatrix::NRows() ::NCols() --> Peuvent etre

appelees sur des matrices non allouees.

  • Declaration const pour TMatrix::Transpose() et ::Rearrange(..)
  • remplacement THROW par throw ds Linfitter avec message explicite

Reza 08/08/2003

File:
1 edited

Legend:

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

    r2322 r2421  
    619619{
    620620uint_4 n = x.NElts();
    621 if (n != y.NElts()) THROW(sizeMismatchErr);
     621if (n != y.NElts())
     622  throw SzMismatchError("LinFitter<T>::LinFit(x,y,nf,f,c)/Error x.NElts() <> y.Nelts() ");
    622623 
    623624TMatrix<T> fx(nf,n);
     
    643644{
    644645uint_4 n = y.NElts();
    645 if (n != fx.NCol()) THROW(sizeMismatchErr);
     646if (n != fx.NCol())
     647  throw SzMismatchError("LinFitter<T>::LinFit(fx, y, c)/Error y.NElts() <> fx.Nelts() ");
    646648
    647649uint_4 nf = fx.NRows();
     
    656658c = fx * y;
    657659
    658 if(SimpleMatrixOperation<T>::GausPiv(a,c)==(T) 0) THROW(singMatxErr);
     660if(SimpleMatrixOperation<T>::GausPiv(a,c)==(T) 0)
     661  throw SingMatrixExc("LinFitter<T>::LinFit(fx, y, c) - Non invertible matrix (by GausPiv())");
    659662
    660663r_8 xi2 = 0., ax;
     
    691694{
    692695uint_4 n = x.NElts();
    693 if (n != y.NElts()) THROW(sizeMismatchErr);
     696if (n != y.NElts())
     697  throw SzMismatchError("LinFitter<T>::LinFit(x,y,errY2,nf,f,c,errC)/Error x.NElts() <> y.Nelts() ");
    694698
    695699TMatrix<T> fx(nf, n);
     
    720724{
    721725uint_4 n = y.NElts();
    722 if( n != errY2.NElts()) THROW(sizeMismatchErr);
    723 if( n != fx.NCol()) THROW(sizeMismatchErr);
    724 
     726if( n != errY2.NElts())
     727  throw SzMismatchError("LinFitter<T>::LinFit(fx,y,errY2,c,errC)/Error y.NElts() <> errY2.Nelts() ");
     728if( n != fx.NCol())
     729  throw SzMismatchError("LinFitter<T>::LinFit(fx,y,errY2,c,errC)/Error y.NElts() <> fx.NCols() ");
    725730uint_4 nf = fx.NRows();
    726731
     
    748753}
    749754
    750 if(SimpleMatrixOperation<T>::GausPiv(a,d)==(T) 0) THROW(singMatxErr);
     755if(SimpleMatrixOperation<T>::GausPiv(a,d)==(T) 0)
     756  throw SingMatrixExc("LinFitter<T>::LinFit(...ErrY2...) - Non invertible matrix (by GausPiv())");
     757
    751758
    752759for(uint_4 l=0; l<nf; l++) {
Note: See TracChangeset for help on using the changeset viewer.