ccnc Namespace Reference

Functions

const char * as_string (ccnc_t ccnc)
ccnc_t get_from_code (int code)

Function Documentation

const char* ccnc::as_string ( ccnc_t  ccnc  )  [inline]

Definition at line 33 of file ccnc.h.

References e_both_ccnc, e_cc, e_nc, and e_undefined_ccnc.

Referenced by interaction::print(), and neugen_cuts::print().

00034      {
00035        switch(ccnc) {
00036          case e_cc:          return "CC";     break;
00037          case e_nc:          return "NC";     break;
00038          case e_both_ccnc:   return "CC+NC";  break;
00039 
00040          case e_undefined_ccnc:
00041          default:            
00042                       return "unknown CCNC"; break;
00043        }
00044        return "bad ccnc";
00045      }

ccnc_t ccnc::get_from_code ( int  code  )  [inline]

Definition at line 47 of file ccnc.h.

References e_both_ccnc, e_cc, e_nc, and e_undefined_ccnc.

Referenced by neugen_inputs::get_interaction().

00048      {
00049         if      (code == 1) return e_cc;
00050         else if (code == 2) return e_nc;
00051         else if (code == 3) return e_both_ccnc;
00052         else                return e_undefined_ccnc;
00053      }


Generated on 15 Jul 2018 for loon by  doxygen 1.6.1