src/IntRank2/IntG.cc
/* These functions allow users to specify G interactions from parameters in an
   external ASCII file or from parameters in a GAMMA parameter set. These two
   methods are nearly equivalent since any ASCII file will be immediately read
   into a parameter set and the parameter set subsequently used to set the
   interaction.

       Input                GI      : G factor interaction
                            filename: Output file name
                            pset    : Parameter set
                            idx     : Interaction index (default -1->none)
                            warn    : Warning output label
                                       0 = no warnings
                                       1 = warnings
                                      >1 = fatal warnings
       Output               none    : G factor interaction is read in
                                      from parameters in file filename
                                      or those in the parameter set          */
These functions allow users to specify G interactions from parameters in an
external ASCII file or from parameters in a GAMMA parameter set. These two
methods are nearly equivalent since any ASCII file will be immediately read
into a parameter set and the parameter set subsequently used to set the
interaction.


These functions allow users to specify G interactions from parameters in an external ASCII file or from parameters in a GAMMA parameter set . These two methods are nearly equivalent since any ASCII file will be immediately read into a parameter set and the parameter set subsequently used to set the interaction .
bool IntG::read(const string &filename, int idx, int warn)
  {
  ParameterSet pset;			
  if(!pset.read(filename, warn?1:0))    
    {                                   
    if(warn)                            
      {
      IGerror(1, filename, 1);		
      if(warn > 1) IGfatal(21);      
      else         IGerror(21);         
      }
    return false;			
    }
  if(!read(pset, idx, warn?1:0)) 	
    {                                   
    if(warn)                            
      {
      IGerror(1, filename, 1);		
      if(warn > 1) IGfatal(22);      
      else         IGerror(22);         
      }
    return false;			
    }
  return true;				
  }
bool IntG :: read ( const string & filename , int idx , int warn ) { ParameterSet pset ; if ( ! pset . read ( filename , warn ? 1 : 0 ) ) { if ( warn ) { IGerror ( 1 , filename , 1 ) ; if ( warn > 1 ) IGfatal ( 21 ) ; else IGerror ( 21 ) ; } return false ; } if ( ! read ( pset , idx , warn ? 1 : 0 ) ) { if ( warn ) { IGerror ( 1 , filename , 1 ) ; if ( warn > 1 ) IGfatal ( 22 ) ; else IGerror ( 22 ) ; } return false ; } return true ; }
These functions allow users to specify G interactions from parameters in an
external ASCII file or from parameters in a GAMMA parameter set.
These functions allow users to specify G interactions from parameters in an external ASCII file or from parameters in a GAMMA parameter set .
// Declare a parameter set // Read in pset from file // If we cannot read the file at all // then issue warnings as desired //      Filename problems //      Fatal error //      or a warning issued //  Return that we failed! // Use overloaded function // If we cannot read the file at all // then issue warnings as desired //      Filename problems //      Fatal error //      or a warning issued //  Return that we failed! //  Return that all OK