Example program to test JTOOLS::JMultiMap.  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "JTools/JMultiMap.hh"
#include "JTools/JMap.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 JTOOLS::JMultiMap. 
- Author
 - mdejong 
 
Definition in file JMultiMap.cc.
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 121 of file JMultiMap.cc.
  129     JParser<> zap(
"Example program to test multi-dimensional map.");
 
  135   catch(
const exception &error) {
 
  136     FATAL(error.what() << endl);
 
  142   const double xmin = -1.0;
 
  143   const double xmax = +1.0;
 
  148                    JMap>::maplist                JMaplist_t;
 
  154   for (
double x = xmin; x <= xmax; x += (xmax - xmin)/(nx - 1)) {
 
  155     for (
double y = xmin; y <= xmax; y += (xmax - xmin)/(nx - 1)) {
 
  156       for (
double z = xmin; z <= xmax; z += (xmax - xmin)/(nx - 1)) {
 
  157         buffer[x][y][z] = x*100 + y*10 + z;
 
  162   JFormat out(cout, 6, 1);
 
  164   cout << 
"i->[second]*->(first|second)" << endl;
 
  166   for (JMultimap_t::super_const_iterator i = buffer.super_begin(); i != buffer.super_end(); ++i) {
 
  167     out << i->first                  << 
' '  
  168          << i->second->first          << 
' '  
  169          << i->second->second->first  << 
' '  
  170          << i->second->second->second << endl;
 
  173   cout << 
"i.getKey() i.getValue()" << endl;
 
  175   for (JMultimap_t::super_const_iterator i = buffer.super_begin(); i != buffer.super_end(); ++i) {
 
  176     out << i.getKey() << 
' ' << i.getValue() << endl;
 
Utility class to parse command line options. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object