Changeset 2291 in Sophya for trunk/SophyaLib/TArray/triangmtx.h


Ignore:
Timestamp:
Dec 5, 2002, 4:43:59 PM (23 years ago)
Author:
lemeur
Message:

protections de dimensions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/TArray/triangmtx.h

    r1757 r2291  
    109109  inline int_4 Size() const {return elem_.Size();}
    110110
     111  inline bool CheckRelativeIndices(int_4 l, int_4 m) const
     112   {
     113     if ( l < m )
     114       {
     115         throw RangeCheckError("TriangularMatrix<T>::CheckRelativeIndices: indices out of range " );
     116       }
     117     return true;
     118   }
     119  inline bool CheckAbsoluteIndice(int_4 l, int_4 m) const
     120   {
     121     if ( indexOfElement(l,m) >= elem_.Size() )
     122       {
     123         throw RangeCheckError("TriangularMatrix<T>::CheckAbsoluteIndice: indices out of range " );
     124       }
     125   }
     126  inline bool CheckAbsoluteIndice(int_4 ind) const
     127   {
     128     if ( ind >= elem_.Size() )
     129       {
     130         throw RangeCheckError("TriangularMatrix<T>::CheckAbsoluteIndice: indices out of range " );
     131       }
     132   }
    111133
    112134void Print(int nbLignes=0)
Note: See TracChangeset for help on using the changeset viewer.