src/IntRank2/IntDipVec.cc
/* These functions insure vector integrity and that access is not beyond
   the vector boundaries

           Input                IDV     : Dipole interaction vector (this)
                                dip     : A dipole index
                                warn    : Warning level
           Output               TF      : Returns TRUE if dip is a valid
                                          dipole index, FALSE if not         */
These functions insure vector integrity and that access is not beyond
the vector boundaries

Input                IDV     : Dipole interaction vector (this)
dip     : A dipole index
warn    : Warning level
Output               TF      : Returns TRUE if dip is a valid
dipole index, FALSE if not
These functions insure vector integrity and that access is not beyond the vector boundaries Input IDV : Dipole interaction vector ( this ) dip : A dipole index warn : Warning level Output TF : Returns TRUE if dip is a valid dipole index FALSE if not
bool IntDipVec::CheckDI(int dip, int warn) const
  {
  if(dip>=int(size()) || dip<0)
    {
    if(warn)
      {
      IDVerror(120, Gdec(dip), 1);
      IDVerror(121, Gdec(dip), 1);
      }
    if(warn>1) IDVfatal(24);
    return 0;
    }
  return 1;
  }
bool IntDipVec :: CheckDI ( int dip , int warn ) const { if ( dip >= int ( size ( ) ) || dip < 0 ) { if ( warn ) { IDVerror ( 120 , Gdec ( dip ) , 1 ) ; IDVerror ( 121 , Gdec ( dip ) , 1 ) ; } if ( warn > 1 ) IDVfatal ( 24 ) ; return 0 ; } return 1 ; }
These functions insure vector integrity and that access is not beyond
the vector boundaries
These functions insure vector integrity and that access is not beyond the vector boundaries