28     JFormat(std::ostream& out, 
int width, 
int precision) :
 
   29       std::ostream(out.rdbuf())
 
   32       this->precision = precision;
 
   39     typedef std::ostream& (*io_manip) (std::ostream&);
 
   50       static_cast<std::ostream&>(*
this) << manip;
 
   65       static_cast<std::ostream&>(*
this) << value;
 
   79       static_cast<std::ostream&>(*
this) << std::fixed << std::setw(width) << std::setprecision(precision) << value;
 
   91     template<
unsigned int N>
 
   94       return *
this << value.first << 
' ' << value.second;
 
  106       return *
this << value.first;
 
  121 int main(
int argc, 
char **argv)
 
  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;