src/HSLib/SpinOp.cc
// ____________________________________________________________________________
// iii             CLASS SPIN OPERATOR CHECKING FUNCTIONS
// ____________________________________________________________________________
iii             CLASS SPIN OPERATOR CHECKING FUNCTIONS
iii CLASS SPIN OPERATOR CHECKING FUNCTIONS
int spin_op::checkSpin(int spin, int warn) const
  {
  if(spin>=0 && spin<nspins) return 1;
  if(warn)
    {
    if(warn == 1) SOperror(9, 1);
    else          SOpfatality(9);
    }
  return 0; 
  }
int spin_op :: checkSpin ( int spin , int warn ) const { if ( spin >= 0 && spin < nspins ) return 1 ; if ( warn ) { if ( warn == 1 ) SOperror ( 9 , 1 ) ; else SOpfatality ( 9 ) ; } return 0 ; }
____________________________________________________________________________
iii             CLASS SPIN OPERATOR CHECKING FUNCTIONS
____________________________________________________________________________
____________________________________________________________________________ iii CLASS SPIN OPERATOR CHECKING FUNCTIONS ____________________________________________________________________________
// Input		SOp	: Spin operator (this) //			spin    : A spin index //			warn    : Warning level //					0 = no warning //					1 = non-fatal  warning //				       >1 = fatal warning // Output		TF	: True if the SOp spin exists