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

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

Input                IGV     : Electron G interaction vector (this)
spin    : A G index
warn    : Warning level
Output               TF      : Returns TRUE if spin is a valid
interaction index, FALSE if not
These functions insure vector integrity and that access is not beyond the vector boundaries Input IGV : Electron G interaction vector ( this ) spin : A G index warn : Warning level Output TF : Returns TRUE if spin is a valid interaction index FALSE if not
bool IntGVec::check_spin(int spin, int warn) const
  {
  if(spin>=int(size()) || spin<0)
    {
    if(warn)
      {
      IGVerror(120, Gdec(spin), 1);
      IGVerror(121, Gdec(spin), 1);
      }
    if(warn>1) IGVfatal(24);
    return false;
    }
  return true;
  }
bool IntGVec :: check_spin ( int spin , int warn ) const { if ( spin >= int ( size ( ) ) || spin < 0 ) { if ( warn ) { IGVerror ( 120 , Gdec ( spin ) , 1 ) ; IGVerror ( 121 , Gdec ( spin ) , 1 ) ; } if ( warn > 1 ) IGVfatal ( 24 ) ; return false ; } return true ; }
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