src/HSLib/GenOpRep.cc
// Input		OpRep: A operator representation
// 			warn : A warning level
//			         0 = no warning
//			         1 = non-fatal warning
//			         2 = fatal warnings
// Output		bool : True if OprRep matrix mx is square
//			       & its dimension matches its basis
Input          OpRep: A operator representation
warn : A warning level
0 = no warning
1 = non-fatal warning
2 = fatal warnings
Output         bool : True if OprRep matrix mx is square
& its dimension matches its basis
Input OpRep : A operator representation warn : A warning level 0 = no warning 1 = non - fatal warning 2 = fatal warnings Output bool : True if OprRep matrix mx is square & its dimension matches its basis
bool genoprep::OpRepCheck(int warn) const
  {
  if(RepMx.cols() != RepMx.rows())	
    {					
    if(warn)				
      {					
      if(warn > 1) OpRepfatal(50);
      else         OpReperror(50,1);
      }
    return false;
    }
  if(RepMx.cols()!=RepBs.size())	
    {					
    if(warn)				
      {					
      if(warn > 1) OpRepfatal(51);	
      else         OpReperror(51,1);
      }
    return false;
    }
  return true;
  }
bool genoprep :: OpRepCheck ( int warn ) const { if ( RepMx . cols ( ) != RepMx . rows ( ) ) { if ( warn ) { if ( warn > 1 ) OpRepfatal ( 50 ) ; else OpReperror ( 50 , 1 ) ; } return false ; } if ( RepMx . cols ( ) != RepBs . size ( ) ) { if ( warn ) { if ( warn > 1 ) OpRepfatal ( 51 ) ; else OpReperror ( 51 , 1 ) ; } return false ; } return true ; }
Input          OpRep: A operator representation
warn : A warning level
0 = no warning
1 = non-fatal warning
2 = fatal warnings
Output         bool : True if OprRep matrix mx is square
& its dimension matches its basis
Input OpRep : A operator representation warn : A warning level 0 = no warning 1 = non - fatal warning 2 = fatal warnings Output bool : True if OprRep matrix mx is square & its dimension matches its basis
// Insure OpRep matrix is square // If not square, then issue some // warnings and either exit or // return that we failed. // Insure OpRep matrix dimension // matches the OpRep basis dimension // If they do not match, issue some // warnings and either exit or // return that we failed