Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JMultiMap.hh
Go to the documentation of this file.
1 #ifndef __JTOOLS__JMULTIMAP__
2 #define __JTOOLS__JMULTIMAP__
3 
5 #include "JLang/JEquals.hh"
7 
8 #include "JTools/JDistance.hh"
9 #include "JTools/JPair.hh"
10 #include "JTools/JMultiPair.hh"
11 #include "JTools/JMapList.hh"
13 #include "JTools/JMultiKey.hh"
14 #include "JMath/JMath.hh"
15 
16 
17 /**
18  * \file
19  *
20  * JMultiMap is a general purpose multidimensional map based on a type list of maps.
21  * \author mdejong
22  */
23 namespace JTOOLS {}
24 namespace JPP { using namespace JTOOLS; }
25 
26 namespace JTOOLS {
27 
28  /**
29  * Multidimensional map.
30  *
31  * The first template parameter refers to the data type of the (multidimensional) key;
32  * the second to the data type of the overall mapped value;
33  * the third to the list of maps used; and
34  * the fourth to the distance operator.
35  *
36  * In addition to the standard STL iterators, there is a super_[const_]iterator for
37  * linear access to the multidimensional map.
38  * The access from the super_iterator to the actual elements in the multidimensional map
39  * is handeld via a the standard dereference and pointer operators yielding
40  * a multidimensional key (see JTOOLS::JMultiKey) or pair (see JTOOLS::JMultiPair), respectively.
41  */
42  template<class JAbscissa_t,
43  class JOrdinate_t,
44  class JMaplist_t,
45  class JDistance_t = JDistance<JAbscissa_t> >
46  class JMultiMap;
47 
48 
49  /**
50  * Template specialisation of JMultiMap for map list with at least one map.
51  */
52  template<class JAbscissa_t,
53  class JOrdinate_t,
54  template<class, class, class> class JHead_t,
55  class JTail_t,
56  class JDistance_t>
57  class JMultiMap<JAbscissa_t, JOrdinate_t, JMapList<JHead_t, JTail_t>, JDistance_t> :
58  public JHead_t<JAbscissa_t, JMultiMap<JAbscissa_t, JOrdinate_t, JTail_t, JDistance_t>, JDistance_t>,
59  public JMATH::JMath< JMultiMap<JAbscissa_t, JOrdinate_t, JMapList<JHead_t, JTail_t>, JDistance_t> >
60  {
61  public:
62 
63  enum { NUMBER_OF_DIMENSIONS = JMapLength< JMapList<JHead_t, JTail_t> >::value };
64 
65  typedef JHead_t<JAbscissa_t,
67  JDistance_t> map_type;
68 
69  typedef JAbscissa_t abscissa_type;
70  typedef JOrdinate_t ordinate_type;
71 
72  typedef typename map_type::key_type key_type;
73  typedef typename map_type::mapped_type mapped_type;
74  typedef typename map_type::value_type value_type;
75 
76  typedef typename map_type::const_iterator const_iterator;
77  typedef typename map_type::const_reverse_iterator const_reverse_iterator;
78  typedef typename map_type::iterator iterator;
79  typedef typename map_type::reverse_iterator reverse_iterator;
80 
81  using map_type::insert;
82  using map_type::configure;
83  using map_type::get;
84 
85 
86  /**
87  * Default constructor.
88  */
90  {}
91 
92 
93  /**
94  * Add map.
95  *
96  * \param map multimap
97  * \return this multimap
98  */
100  {
101  static_cast<map_type&>(*this).add(static_cast<const map_type&>(map));
102 
103  return *this;
104  }
105 
106 
107  /**
108  * Subtract map.
109  *
110  * \param map multimap
111  * \return this multimap
112  */
114  {
115  static_cast<map_type&>(*this).sub(static_cast<const map_type&>(map));
116 
117  return *this;
118  }
119 
120 
121  /**
122  * Scale contents.
123  *
124  * \param value multiplication factor
125  * \return this multimap
126  */
127  JMultiMap& mul(const double value)
128  {
129  static_cast<map_type&>(*this).mul(value);
130 
131  return *this;
132  }
133 
134  /**
135  * Scale contents.
136  *
137  * \param value division factor
138  * \return this multimap
139  */
140  JMultiMap& div(const double value)
141  {
142  static_cast<map_type&>(*this).div(value);
143 
144  return *this;
145  }
146 
147 
148  /**
149  * Function application to each element of this multimap.
150  *
151  * \param function function
152  * \return function
153  */
154  template<class JFunction_t>
155  void for_each(const JFunction_t& function)
156  {
157  function(*this);
158 
159  for (iterator i = this->begin(); i != this->end(); ++i) {
160  i->getY().for_each(function);
161  }
162  }
163 
164 
165  /**
166  * Configure multidimensional map.
167  *
168  * \param bounds multidimensional bounds
169  */
171  {
172  this->configure(JMultiKey<0, abscissa_type>(), bounds);
173  }
174 
175 
176  /**
177  * Configure multidimensional map.
178  *
179  * \param key multidimensional key
180  * \param bounds multidimensional bounds
181  */
182  template<unsigned int N, unsigned int M>
184  {
185  this->configure(bounds(key));
186 
187  for (iterator i = this->begin(); i != this->end(); ++i) {
188  i->getY().configure(JMultiKey<M+1, abscissa_type>(key,i->getX()), bounds);
189  }
190  }
191 
192 
193  class super_const_iterator; // forward declaration
194 
195 
196  /**
197  * Multidimensional iterator.
198  */
199  class super_iterator :
200  public JLANG::JEquals <super_iterator>,
201  public JLANG::JForwardIterator<super_iterator>
202  {
203 
208 
209  friend class JMultiMap;
210  friend class super_const_iterator;
211 
212  public:
213 
214  /**
215  * Default constructor.
216  */
218  {}
219 
220 
221  /**
222  * Smart pointer operator.
223  *
224  * \return pointer to pair of iterators
225  */
227  {
228  return pointer_type(new value_type(i->getX(), second));
229  }
230 
231 
232  /**
233  * Dereference operator.
234  *
235  * \return multidimensional pair
236  */
238  {
239  return reference_type(i->getX(), *second);
240  }
241 
242 
243  /**
244  * Equality of super iterator.
245  *
246  * \param cursor super iterator
247  * \return true if equal; else false
248  */
249  virtual bool equals(const super_iterator& cursor) const
250  {
251  return i == cursor.i && (i == range.second || second.equals(cursor.second));
252  }
253 
254 
255  /**
256  * Increment super_iterator.
257  *
258  * \return true if valid; else false
259  */
260  virtual bool increment()
261  {
262  if (!second.increment()) {
263 
264  while (++i != range.second) {
265 
266  second = i->getY().super_begin();
267 
268  if (second != i->getY().super_end()) {
269  break;
270  }
271  }
272  }
273 
274  return i != range.second;
275  }
276 
277 
278  /**
279  * Get multi-dimensional key.
280  *
281  * \return key
282  */
284  {
285  return multikey_type(i->getX(), second.getKey());
286  }
287 
288 
289  /**
290  * Get value.
291  *
292  * \return value
293  */
294  JOrdinate_t& getValue()
295  {
296  return second.getValue();
297  }
298 
299 
300  private:
301  /**
302  * Constructor.
303  *
304  * \param __begin begin of data
305  * \param __end end of data
306  */
308  iterator __end) :
309  range(__begin, __end)
310  {
311  for (i = range.first; i != range.second; ++i) {
312 
313  second = i->getY().super_begin();
314 
315  if (second != i->getY().super_end()) {
316  break;
317  }
318  }
319  }
320 
321 
324  typename mapped_type::super_iterator second;
325  };
326 
327 
328  /**
329  * Multidimensional const_iterator.
330  */
331  class super_const_iterator :
332  public JLANG::JEquals <super_const_iterator>,
333  public JLANG::JForwardIterator<super_const_iterator>
334  {
335 
340 
341  friend class JMultiMap;
342 
343  public:
344 
345  /**
346  * Default constructor.
347  */
349  {}
350 
351 
352  /**
353  * Copy constructor.
354  *
355  * \param cursor super_iterator
356  */
357  super_const_iterator(super_iterator cursor) :
358  range (cursor.range),
359  i (cursor.i),
360  second(cursor.second)
361  {}
362 
363 
364  /**
365  * Smart pointer operator.
366  *
367  * \return pointer to pair of iterators
368  */
370  {
371  return pointer_type(new value_type(i->getX(), second));
372  }
373 
374 
375  /**
376  * Dereference operator.
377  *
378  * \return multidimensional pair
379  */
381  {
382  return reference_type(i->getX(), *second);
383  }
384 
385 
386  /**
387  * Equality of super iterator.
388  *
389  * \param cursor super iterator
390  * \return true if equal; else false
391  */
392  virtual bool equals(const super_const_iterator& cursor) const
393  {
394  return i == cursor.i && (i == range.second || second.equals(cursor.second));
395  }
396 
397 
398  /**
399  * Increment super_iterator.
400  *
401  * \return true if valid; else false
402  */
403  virtual bool increment()
404  {
405  if (!second.increment()) {
406 
407  while (++i != range.second) {
408 
409  second = i->getY().super_begin();
410 
411  if (second != i->getY().super_end()) {
412  break;
413  }
414  }
415  }
416 
417  return i != range.second;
418  }
419 
420 
421  /**
422  * Get multi-dimensional key.
423  *
424  * \return key
425  */
427  {
428  return multikey_type(i->getX(), second.getKey());
429  }
430 
431 
432  /**
433  * Get value.
434  *
435  * \return value
436  */
437  const JOrdinate_t& getValue()
438  {
439  return second.getValue();
440  }
441 
442 
443  private:
444  /**
445  * Constructor.
446  *
447  * \param __begin begin of data
448  * \param __end end of data
449  */
451  const_iterator __end) :
452  range(__begin, __end)
453  {
454  for (i = range.first; i != range.second; ++i) {
455 
456  second = i->getY().super_begin();
457 
458  if (second != i->getY().super_end()) {
459  break;
460  }
461  }
462  }
463 
464 
467  typename mapped_type::super_const_iterator second;
468  };
469 
470 
471  /**
472  * Get super_iterator to begin of data.
473  *
474  * \return super iterator
475  */
476  super_const_iterator super_begin() const
477  {
478  return super_const_iterator(this->begin(), this->end());
479  }
480 
481 
482  /**
483  * Get super_iterator to end of data.
484  *
485  * \return super iterator
486  */
487  super_const_iterator super_end() const
488  {
489  return super_const_iterator(this->end(), this->end());
490  }
491 
492 
493  /**
494  * Get super_iterator to begin of data.
495  *
496  * \return super iterator
497  */
498  super_iterator super_begin()
499  {
500  return super_iterator(this->begin(), this->end());
501  }
502 
503 
504  /**
505  * Get super_iterator to end of data.
506  *
507  * \return super iterator
508  */
509  super_iterator super_end()
510  {
511  return super_iterator(this->end(), this->end());
512  }
513 
514 
515  /**
516  * Get value.
517  *
518  * \param key multidimensional key
519  * \return value
520  */
522  {
523  return this->get(key.first).get(key.second);
524  }
525 
526 
527  /**
528  * Insert element.
529  *
530  * \param key multidimensional key
531  * \param value value
532  */
534  {
535  (*this)[key.first].insert(key.second, value);
536  }
537 
538 
539  /**
540  * Insert element.
541  *
542  * \param value multidimensional pair
543  */
545  {
546  (*this)[value.first].insert(value.second);
547  }
548 
549 
550  /**
551  * Insert element.
552  *
553  * \param value multidimensional iterator value
554  */
555  void insert(const typename super_iterator::reference_type& value)
556  {
557  (*this)[value.first].insert(value.second);
558  }
559 
560 
561  /**
562  * Insert element.
563  *
564  * \param value multidimensional iterator value
565  */
566  void insert(const typename super_const_iterator::reference_type& value)
567  {
568  (*this)[value.first].insert(value.second);
569  }
570  };
571 
572 
573  /**
574  * Terminator class of recursive JMultiMap class.
575  */
576  template<class JAbscissa_t,
577  class JOrdinate_t,
578  template<class, class, class> class JHead_t,
579  class JDistance_t>
580  class JMultiMap<JAbscissa_t, JOrdinate_t, JMapList<JHead_t, JLANG::JNullType>, JDistance_t> :
581  public JHead_t<JAbscissa_t, JOrdinate_t, JDistance_t>,
582  public JMATH::JMath< JMultiMap<JAbscissa_t, JOrdinate_t, JMapList<JHead_t, JLANG::JNullType>, JDistance_t> >
583  {
584  public:
585 
586  enum { NUMBER_OF_DIMENSIONS = 1 };
587 
588  typedef JHead_t<JAbscissa_t, JOrdinate_t, JDistance_t> map_type;
589 
590  typedef JAbscissa_t abscissa_type;
591  typedef JOrdinate_t ordinate_type;
592 
593  typedef typename map_type::key_type key_type;
594  typedef typename map_type::mapped_type mapped_type;
595  typedef typename map_type::value_type value_type;
596 
597  typedef typename map_type::const_iterator const_iterator;
598  typedef typename map_type::const_reverse_iterator const_reverse_iterator;
599 
600  typedef typename map_type::iterator iterator;
601  typedef typename map_type::reverse_iterator reverse_iterator;
602 
603  using map_type::insert;
604  using map_type::configure;
605  using map_type::get;
606 
607 
608  /**
609  * Default constructor.
610  */
612  {}
613 
614 
615  /**
616  * Add map.
617  *
618  * \param map multimap
619  * \return this multimap
620  */
622  {
623  static_cast<map_type&>(*this).add(static_cast<const map_type&>(map));
624 
625  return *this;
626  }
627 
628 
629  /**
630  * Subtract map.
631  *
632  * \param map multimap
633  * \return this multimap
634  */
636  {
637  static_cast<map_type&>(*this).sub(static_cast<const map_type&>(map));
638 
639  return *this;
640  }
641 
642 
643  /**
644  * Scale contents.
645  *
646  * \param value multiplication factor
647  * \return this multimap
648  */
649  JMultiMap& mul(const double value)
650  {
651  static_cast<map_type&>(*this).mul(value);
652 
653  return *this;
654  }
655 
656  /**
657  * Scale contents.
658  *
659  * \param value division factor
660  * \return this multimap
661  */
662  JMultiMap& div(const double value)
663  {
664  static_cast<map_type&>(*this).div(value);
665 
666  return *this;
667  }
668 
669 
670  /**
671  * Termination of function application.
672  *
673  * \param function function
674  * \return function
675  */
676  template<class JFunction_t>
677  void for_each(const JFunction_t& function)
678  {
679  function(*this);
680  }
681 
682 
683  /**
684  * Configure multidimensional map.
685  *
686  * \param bounds multidimensional bounds
687  */
689  {
690  this->configure(JMultiKey<0, abscissa_type>(), bounds);
691  }
692 
693 
694  /**
695  * Configure multidimensional map.
696  *
697  * \param key multidimensional key
698  * \param bounds multidimensional bounds
699  */
700  template<unsigned int N, unsigned int M>
702  {
703  this->configure(bounds(key));
704  }
705 
706 
707  class super_const_iterator; // forward declaration
708 
709 
710  /**
711  * Terminator class of multidimensional iterator.
712  */
713  class super_iterator :
714  public JLANG::JEquals <super_iterator>,
715  public JLANG::JForwardIterator<super_iterator>
716  {
717 
722 
723  friend class JMultiMap;
724  friend class super_const_iterator;
725 
726  public:
727 
728  /**
729  * Default constructor.
730  */
732  {}
733 
734 
735  /**
736  * Smart pointer operator.
737  *
738  * \return pointer to pair of iterators
739  */
741  {
742  return pointer_type(new value_type(i->getX(), i->getY()));
743  }
744 
745 
746  /**
747  * Dereference operator.
748  *
749  * \return multidimensional pair
750  */
752  {
753  return reference_type(i->getX(), i->getY());
754  }
755 
756 
757  /**
758  * Equality of super iterator.
759  *
760  * \param cursor super iterator
761  * \return true if equal; else false
762  */
763  virtual bool equals(const super_iterator& cursor) const
764  {
765  return i == cursor.i;
766  }
767 
768 
769  /**
770  * Increment super_iterator.
771  *
772  * \return true if valid; else false
773  */
774  virtual bool increment()
775  {
776  return ++i != range.second;
777  }
778 
779 
780  /**
781  * Get multi-dimensional key.
782  *
783  * \return key
784  */
786  {
787  return multikey_type(i->getX());
788  }
789 
790 
791  /**
792  * Get value.
793  *
794  * \return value
795  */
796  JOrdinate_t& getValue()
797  {
798  return i->getY();
799  }
800 
801  private:
802  /**
803  * Constructor.
804  *
805  * \param __begin begin of data
806  * \param __end end of data
807  */
809  iterator __end) :
810  range(__begin, __end),
811  i (__begin)
812  {}
813 
814 
817  };
818 
819 
820  /**
821  * Terminator class of multidimensional const_iterator.
822  */
823  class super_const_iterator :
824  public JLANG::JEquals <super_const_iterator>,
825  public JLANG::JForwardIterator<super_const_iterator>
826  {
827 
832 
833  friend class JMultiMap;
834 
835  public:
836 
837  /**
838  * Default constructor.
839  */
841  {}
842 
843 
844  /**
845  * Copy constructor.
846  *
847  * \param cursor super_iterator
848  */
849  super_const_iterator(super_iterator cursor) :
850  range(cursor.range),
851  i (cursor.i)
852  {}
853 
854 
855  /**
856  * Smart pointer operator.
857  *
858  * \return pointer to pair of iterators
859  */
861  {
862  return pointer_type(new value_type(i->getX(), i->getY()));
863  }
864 
865 
866  /**
867  * Dereference operator.
868  *
869  * \return multidimensional pair
870  */
872  {
873  return reference_type(i->getX(), i->getY());
874  }
875 
876 
877  /**
878  * Equality of super iterator.
879  *
880  * \param cursor super iterator
881  * \return true if equal; else false
882  */
883  virtual bool equals(const super_const_iterator& cursor) const
884  {
885  return i == cursor.i;
886  }
887 
888 
889  /**
890  * Increment super_iterator.
891  *
892  * \return true if valid; else false
893  */
894  virtual bool increment()
895  {
896  return ++i != range.second;
897  }
898 
899 
900  /**
901  * Get multi-dimensional key.
902  *
903  * \return key
904  */
906  {
907  return multikey_type(i->getX());
908  }
909 
910 
911  /**
912  * Get value.
913  *
914  * \return value
915  */
916  const JOrdinate_t& getValue()
917  {
918  return i->getY();
919  }
920 
921  private:
922  /**
923  * Constructor.
924  *
925  * \param __begin begin of data
926  * \param __end end of data
927  */
929  const_iterator __end) :
930  range(__begin, __end),
931  i (__begin)
932  {}
933 
934 
937  };
938 
939 
940  /**
941  * Get super_iterator to begin of data.
942  *
943  * \return super_iterator
944  */
945  super_const_iterator super_begin() const
946  {
947  return super_const_iterator(this->begin(), this->end());
948  }
949 
950 
951  /**
952  * Get super_iterator to end of data.
953  *
954  * \return super_iterator
955  */
956  super_const_iterator super_end() const
957  {
958  return super_const_iterator(this->end(), this->end());
959  }
960 
961 
962  /**
963  * Get super_iterator to begin of data.
964  *
965  * \return super_iterator
966  */
967  super_iterator super_begin()
968  {
969  return super_iterator(this->begin(), this->end());
970  }
971 
972 
973  /**
974  * Get super_iterator to end of data.
975  *
976  * \return super_iterator
977  */
978  super_iterator super_end()
979  {
980  return super_iterator(this->end(), this->end());
981  }
982 
983 
984  /**
985  * Get value.
986  *
987  * \param key multidimensional key
988  * \return value
989  */
991  {
992  return get(key.first);
993  }
994 
995 
996  /**
997  * Insert element.
998  *
999  * \param key multidimensional key
1000  * \param value value
1001  */
1002  void insert(const JMultiKey<1, JAbscissa_t>& key, const JOrdinate_t& value)
1003  {
1004  insert(value_type(key.first, value));
1005  }
1006 
1007 
1008  /**
1009  * Insert element.
1010  *
1011  * \param value multidimensional pair
1012  */
1014  {
1015  insert(value_type(value.first, value.second));
1016  }
1017 
1018 
1019  /**
1020  * Insert element.
1021  *
1022  * \param value multidimensional iterator value
1023  */
1024  void insert(const typename super_iterator::reference_type& value)
1025  {
1026  insert(value_type(value.first, value.second));
1027  }
1028 
1029 
1030  /**
1031  * Insert element.
1032  *
1033  * \param value multidimensional iterator value
1034  */
1035  void insert(const typename super_const_iterator::reference_type& value)
1036  {
1037  insert(value_type(value.first, value.second));
1038  }
1039  };
1040 }
1041 
1042 #endif
super_const_iterator super_begin() const
Get super_iterator to begin of data.
Definition: JMultiMap.hh:476
void insert(const typename super_iterator::reference_type &value)
Insert element.
Definition: JMultiMap.hh:1024
Template interface for method bool increment().
void for_each(const JFunction_t &function)
Termination of function application.
Definition: JMultiMap.hh:677
mapped_type second
Definition: JMultiPair.hh:125
Auxiliary base class for aritmetic operations of derived class types.
Definition: JMath.hh:26
void insert(const JMultiPair< 1, JAbscissa_t, JOrdinate_t > &value)
Insert element.
Definition: JMultiMap.hh:1013
Template class for distance evaluation.
Definition: JDistance.hh:24
void configure(const JAbstractMultiMap< NUMBER_OF_DIMENSIONS, abscissa_type > &bounds)
Configure multidimensional map.
Definition: JMultiMap.hh:170
T get(const JHead &header)
Get object from header.
Length of map list.
Definition: JMapList.hh:45
JMultiPair< NUMBER_OF_DIMENSIONS, const JAbscissa_t, const JOrdinate_t & > reference_type
Definition: JMultiMap.hh:338
void insert(const JMultiKey< NUMBER_OF_DIMENSIONS, abscissa_type > &key, const ordinate_type &value)
Insert element.
Definition: JMultiMap.hh:533
JPair< const key_type &, typename mapped_type::super_const_iterator & > value_type
Definition: JMultiMap.hh:336
JMultiPair< NUMBER_OF_DIMENSIONS, const JAbscissa_t, JOrdinate_t & > reference_type
Definition: JMultiMap.hh:206
Abstract interface for abscissa values of a multidimensional map.
Forward declaration of template JMultiKey class.
Definition: JMultiKey.hh:29
The template JSinglePointer class can be used to hold a pointer to an object.
Template specialisation for a pair of values.
Definition: JPair.hh:28
virtual bool equals(const super_const_iterator &cursor) const
Equality of super iterator.
Definition: JMultiMap.hh:883
virtual bool equals(const super_iterator &cursor) const
Equality of super iterator.
Definition: JMultiMap.hh:249
Map list.
Definition: JMapList.hh:24
Template definition of auxiliary base class for comparison of data structures.
Definition: JEquals.hh:24
virtual bool equals(const super_const_iterator &cursor) const
Equality of super iterator.
Definition: JMultiMap.hh:392
void configure(const JMultiKey< M, abscissa_type > &key, const JAbstractMultiMap< N, abscissa_type > &bounds)
Configure multidimensional map.
Definition: JMultiMap.hh:183
Auxiliary class for no type definition.
Definition: JNullType.hh:19
super_const_iterator super_end() const
Get super_iterator to end of data.
Definition: JMultiMap.hh:956
void insert(const JMultiPair< NUMBER_OF_DIMENSIONS, abscissa_type, ordinate_type > &value)
Insert element.
Definition: JMultiMap.hh:544
void configure(const JMultiKey< M, abscissa_type > &key, const JAbstractMultiMap< N, abscissa_type > &bounds)
Configure multidimensional map.
Definition: JMultiMap.hh:701
void insert(const JMultiKey< 1, JAbscissa_t > &key, const JOrdinate_t &value)
Insert element.
Definition: JMultiMap.hh:1002
void insert(const typename super_iterator::reference_type &value)
Insert element.
Definition: JMultiMap.hh:555
virtual bool equals(const super_iterator &cursor) const
Equality of super iterator.
Definition: JMultiMap.hh:763
super_const_iterator super_end() const
Get super_iterator to end of data.
Definition: JMultiMap.hh:487
void configure(const T &value, const JAbstractCollection< JAbscissa_t > &bounds, JBool< false > option)
Configuration of value.
void insert(const typename super_const_iterator::reference_type &value)
Insert element.
Definition: JMultiMap.hh:1035
JHead_t< JAbscissa_t, JMultiMap< JAbscissa_t, JOrdinate_t, JTail_t, JDistance_t >, JDistance_t > map_type
Definition: JMultiMap.hh:67
Base class for data structures with artithmetic capabilities.
Multidimensional pair.
Definition: JMultiPair.hh:30
void for_each(const JFunction_t &function)
Function application to each element of this multimap.
Definition: JMultiMap.hh:155
void configure(const JAbstractMultiMap< NUMBER_OF_DIMENSIONS, abscissa_type > &bounds)
Configure multidimensional map.
Definition: JMultiMap.hh:688
void insert(const typename super_const_iterator::reference_type &value)
Insert element.
Definition: JMultiMap.hh:566
const char * map
Definition: elog.cc:87
JPair< const key_type &, typename mapped_type::super_iterator & > value_type
Definition: JMultiMap.hh:204
Multidimensional map.
Definition: JMultiMap.hh:46
super_const_iterator super_begin() const
Get super_iterator to begin of data.
Definition: JMultiMap.hh:945