Example program to test combinatorics of pairs of indices (class JTOOLS::JCombinatorics).  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "JTools/JCombinatorics.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Example program to test combinatorics of pairs of indices (class JTOOLS::JCombinatorics). 
- Author
 - mdejong 
 
Definition in file JCombinatorics.cc.
 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 15 of file JCombinatorics.cc.
   24     JParser<> zap(
"Example program to test combinatorics of pairs of indices.");
 
   31   catch(
const exception &error) {
 
   32     FATAL(error.what() << endl);
 
   38   if (numberOfElements <= 0) {
 
   39     FATAL(
"Number of elements " << numberOfElements << 
" <= 0" << endl);
 
   47   for (
int i = 0; i != (int) combinatorics.getNumberOfPairs(); ++i) {
 
   51     STATUS(
"pair[" << setw(4) << i << 
"] => (" << setw(3) << 
pair.first << 
"," << setw(3) << 
pair.second << 
")" << endl);
 
   53     if (i != combinatorics.getIndex(
pair.first, 
pair.second)) {
 
   58             setw(3) << 
pair.first  << 
' ' <<
 
   59             setw(3) << 
pair.second << 
' ' <<
 
   60             setw(4) << combinatorics.getIndex(
pair.first, 
pair.second) << endl);
 
   65   NOTICE(
"Number of elements " << setw(8) << right << numberOfElements                 << endl);
 
   66   NOTICE(
"Number of pairs    " << setw(8) << right << combinatorics.getNumberOfPairs() << endl);
 
   67   NOTICE(
"Number of errors   " << setw(8) << right << 
n                                << endl);
 
#define DEBUG(A)
Message macros.
 
#define ASSERT(A,...)
Assert macro.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Utility class to parse command line options.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).