Jpp
JHashMap.hh
Go to the documentation of this file.
1 #ifndef __JTOOLS__JHASHMAP__
2 #define __JTOOLS__JHASHMAP__
3 
4 #include <vector>
5 #include <utility>
6 #include <algorithm>
7 
8 #include "JLang/JNullType.hh"
9 #include "JLang/JTypeList.hh"
10 #include "JLang/JSinglePointer.hh"
11 #include "JLang/JEquals.hh"
13 #include "JLang/JException.hh"
15 #include "JTools/JHashEvaluator.hh"
16 #include "JTools/JRouter.hh"
17 #include "JTools/JTuple.hh"
18 #include "JTools/JPair.hh"
19 #include "JIO/JSerialisable.hh"
20 #include "JIO/JSTDIO.hh"
21 
22 
23 /**
24  * \file
25  *
26  * General purpose classes for (multidimensional) hash maps.
27  * \author mdejong
28  */
29 namespace JTOOLS {}
30 namespace JPP { using namespace JTOOLS; }
31 
32 namespace JTOOLS {
33 
34  using JLANG::JNullType;
35  using JLANG::JTypeList;
36  using JLANG::JTYPELIST;
37  using JLANG::JClass;
39  using JIO::JReader;
40  using JIO::JWriter;
41 
42 
43  /**
44  * General purpose class for hash map of (key, value) pairs.
45  *
46  * The elements in a hash map are sorted according to the specified evaluation.
47  * The evaluation of elements corresponds to a unary method returning an integer value for a given key;
48  * The default evaluator is JHashEvaluator.
49  *
50  * This class implements the JMappableCollection interface.
51  */
52  template<class JKey_t, class JValue_t, class JEvaluator_t = JHashEvaluator>
53  struct JHashMap :
54  public std::vector< std::pair<JKey_t, JValue_t> >,
55  public JMappableCollection<JKey_t, JValue_t>
56  {
57  public:
58 
59  typedef JKey_t key_type;
60  typedef JValue_t mapped_type;
62  typedef JEvaluator_t evaluator_type;
63 
65 
66  typedef typename container_type::const_iterator const_iterator;
67  typedef typename container_type::const_reverse_iterator const_reverse_iterator;
68  typedef typename container_type::iterator iterator;
69  typedef typename container_type::reverse_iterator reverse_iterator;
70 
72 
74 
75 
76  /**
77  * Auxiliary class for ordering of objects in the collection by the hash value of their keys.
78  */
79  struct JComparator {
80 
81  /**
82  * Constructor.
83  *
84  * \param evaluator evaluator
85  */
86  JComparator(const JEvaluator_t& evaluator = JEvaluator_t()) :
87  getValue(evaluator)
88  {}
89 
90 
91  /**
92  * Comparison of elements.
93  *
94  * \param first first element
95  * \param second second element
96  * \return true if first element less than second element; else false
97  */
98  inline bool operator()(typename JClass<value_type>::argument_type first,
99  typename JClass<value_type>::argument_type second) const
100  {
101  return this->getValue(first.first) < this->getValue(second.first);
102  }
103 
104 
105  /**
106  * Comparison of element and key value.
107  *
108  * \param element element
109  * \param x key value
110  * \return true if element less than key value; else false
111  */
112  inline bool operator()(typename JClass<value_type>::argument_type element,
113  typename JClass<key_type>::argument_type x) const
114  {
115  return this->getValue(element.first) < this->getValue(x);
116  }
117 
118 
119  /**
120  * Function object for evaluation of key.
121  */
122  JEvaluator_t getValue;
123  };
124 
125 
126  /**
127  * Constructor.
128  *
129  * \param evaluator evaluator
130  */
131  JHashMap(const JEvaluator_t& evaluator = JEvaluator_t()) :
132  getValue(evaluator),
133  compare (evaluator),
134  router (-1) // default address
135  {}
136 
137 
138  /**
139  * Clear.
140  */
141  virtual void clear()
142  {
143  // reset internal router
144 
145  for (iterator i = this->begin(); i != this->end(); ++i) {
146  router.put(this->getValue(i->first), router.getDefaultAddress());
147  }
148 
149  container_type::clear();
150  }
151 
152 
153  /**
154  * Get mapped value.
155  *
156  * \param key key
157  * \return mapped value
158  */
160  {
161  const int ival = this->getValue(key);
162 
163  if (!router.has(ival)) {
164  insert(value_type(key, mapped_type()));
165  }
166 
167  return container_type::operator[](router.get(ival)).second;
168  }
169 
170 
171  /**
172  * Get mapped value.
173  *
174  * This method will throw an exception if given key is not present following the prerequisite of constness.
175  *
176  * \param key key
177  * \return mapped value
178  */
180  {
181  const int ival = this->getValue(key);
182 
183  if (router.has(ival))
184  return container_type::operator[](router.get(ival)).second;
185  else
186  THROW(JIndexOutOfRange, "JHasMap::get(): invalid key.");
187  }
188 
189 
190  /**
191  * Insert element.
192  *
193  * \param element element
194  * \return (position, status), where status is true if inserted; else false
195  */
196  pair_type insert(const value_type& element)
197  {
198  using namespace std;
199 
200  const int ival = this->getValue(element.first);
201 
202  if (!router.has(ival)) {
203 
204  iterator i = container_type::insert(lower_bound(this->begin(), this->end(), element.first, compare), element);
205 
206  router.put(ival, distance(this->begin(), i));
207 
208  for (iterator __i = i; ++__i != this->end(); ) {
209  router.put(this->getValue(__i->first), distance(this->begin(), __i));
210  }
211 
212  return pair_type(i, true);
213 
214  } else {
215 
216  return pair_type(this->end(), false);
217  }
218  }
219 
220 
221  /**
222  * Erase element at given position.
223  *
224  * \param pos valid position
225  */
226  void erase(iterator pos)
227  {
228  this->router.put(this->getValue(*pos), this->router.getDefaultAddress());
229 
230  iterator i = pos;
231 
232  container_type::erase(i++);
233 
234  for ( ; i != this->end(); ++i) {
235  this->router.put(this->getValue(*i), distance(this->begin(), i));
236  }
237  }
238 
239 
240  /**
241  * Erase elements in given range.
242  *
243  * \param __begin begin position (included)
244  * \param __end end position (excluded)
245  */
246  void erase(iterator __begin, iterator __end)
247  {
248  iterator i = __begin;
249 
250  while (i != __end) {
251 
252  this->router.put(this->getValue(*i), this->router.getDefaultAddress());
253 
254  container_type::erase(i++);
255  }
256 
257  for ( ; i != this->end(); ++i) {
258  this->router.put(this->getValue(*i), distance(this->begin(), i));
259  }
260  }
261 
262 
263  /**
264  * Erase element.
265  *
266  * \param key key
267  * \return true if element with given key has been erased; else false
268  */
269  bool erase(typename JClass<key_type>::argument_type key) const
270  {
271  const int ival = this->getValue(key);
272 
273  if (router.has(ival)) {
274 
275  iterator pos = this->begin();
276 
277  std::advance(pos, this->router.get(ival));
278 
279  iterator i = container_type::erase(pos);
280 
281  for ( ; i != this->end(); ++i) {
282  this->router.put(this->getValue(*i), distance(this->begin(), i));
283  }
284 
285  return true;
286  }
287 
288  return false;
289  }
290 
291 
292  /**
293  * Test whether key is present.
294  *
295  * \param key key
296  * \return true if present; else false
297  */
298  bool has(typename JClass<key_type>::argument_type key) const
299  {
300  return router.has(this->getValue(key));
301  }
302 
303 
304  /**
305  * Get comparator.
306  *
307  * \return comparator
308  */
309  const JComparator& getComparator() const
310  {
311  return compare;
312  }
313 
314 
315  /**
316  * Read hash map from input.
317  *
318  * \param in reader
319  * \param object hash map
320  * \return reader
321  */
322  friend inline JReader& operator>>(JReader& in, JHashMap& object)
323  {
324  using namespace JIO;
325 
326  int n;
327 
328  in >> n;
329 
330  object.resize(n);
331 
332  for (value_type element; n != 0 && in >> element; --n) {
333  object.insert(element);
334  }
335 
336  return in;
337  }
338 
339 
340  /**
341  * Write hash map to output.
342  *
343  * \param out writer
344  * \param object hash map
345  * \return writer
346  */
347  friend inline JWriter& operator<<(JWriter& out, const JHashMap& object)
348  {
349  using namespace JIO;
350 
351  int n = object.size();
352 
353  out << n;
354 
355  for (typename JHashMap::const_iterator i = object.begin(); i != object.end(); ++i) {
356  out << *i;
357  }
358 
359  return out;
360  }
361 
362 
363  /**
364  * Function object for evaluation of key.
365  */
366  JEvaluator_t getValue;
367 
368 
369  protected:
370  /**
371  * Function object for comparison.
372  */
373  JComparator compare;
374 
376 
377  private:
378  void resize();
379  void push_back();
380  void pop_back();
381  };
382 
383 
384  /**
385  * Multi-dimensional hash map.
386  */
387  template<class JHead_t, class JTail_t, class JValue_t, class JEvaluator_t>
388  struct JHashMap<JTypeList<JHead_t, JTail_t>, JValue_t, JEvaluator_t> :
389  public JHashMap<JHead_t, JHashMap<JTail_t, JValue_t, JEvaluator_t>, JEvaluator_t>
390  {
391 
392  typedef JHead_t key_type;
395  typedef JEvaluator_t evaluator_type;
398 
401  typedef typename map_type::iterator iterator;
403 
404  using map_type::get;
405  using map_type::put;
406  using map_type::has;
407  using map_type::erase;
408 
409 
410  /**
411  * Constructor.
412  *
413  * \param evaluator evaluator
414  */
415  JHashMap(const JEvaluator_t& evaluator = JEvaluator_t()) :
416  JHashMap<JHead_t, JHashMap<JTail_t, JValue_t, JEvaluator_t>, JEvaluator_t>(evaluator)
417  {}
418 
419 
420  class super_const_iterator; // forward declaration
421 
422 
423  /**
424  * Multidimensional iterator.
425  */
426  class super_iterator :
427  public JLANG::JEquals <super_iterator>,
428  public JLANG::JForwardIterator<super_iterator>
429  {
430 
434 
435  friend class JHashMap;
436 
437  public:
438 
439  /**
440  * Default constructor.
441  */
443  {}
444 
445 
446  /**
447  * Smart pointer operator.
448  *
449  * \return pointer to pair of iterators
450  */
452  {
453  return pointer_type(new value_type(i->first, second));
454  }
455 
456 
457  /**
458  * Dereference operator.
459  *
460  * \return multidimensional pair
461  */
463  {
464  return reference_type(i->first, *second);
465  }
466 
467 
468  /**
469  * Equality of super iterator.
470  *
471  * \param cursor super iterator
472  * \return true if equal; else false
473  */
474  virtual bool equals(const super_iterator& cursor) const
475  {
476  return i == cursor.i && (i == range.second || second.equals(cursor.second));
477  }
478 
479 
480  /**
481  * Increment super_iterator.
482  *
483  * \return true if valid; else false
484  */
485  virtual bool increment()
486  {
487  if (!second.increment()) {
488 
489  while (++i != range.second) {
490 
491  second = i->second.super_begin();
492 
493  if (second != i->second.super_end()) {
494  break;
495  }
496  }
497  }
498 
499  return i != range.second;
500  }
501 
502 
503  /**
504  * Get multi-dimensional key.
505  *
506  * \return key
507  */
509  {
510  return multikey_type(i->first, second.getKey());
511  }
512 
513 
514  /**
515  * Get value.
516  *
517  * \return value
518  */
519  JValue_t& getValue()
520  {
521  return second.getValue();
522  }
523 
524 
525  private:
526  /**
527  * Constructor.
528  *
529  * \param __begin begin of data
530  * \param __end end of data
531  */
533  iterator __end) :
534  range(__begin, __end)
535  {
536  for (i = range.first; i != range.second; ++i) {
537 
538  second = i->second.super_begin();
539 
540  if (second != i->second.super_end()) {
541  break;
542  }
543  }
544  }
545 
546 
549  typename mapped_type::super_iterator second;
550  };
551 
552 
553  /**
554  * Multidimensional const_iterator.
555  */
556  class super_const_iterator :
557  public JLANG::JEquals <super_const_iterator>,
558  public JLANG::JForwardIterator<super_const_iterator>
559  {
560 
564 
565  friend class JHashMap;
566 
567  public:
568 
569  /**
570  * Default constructor.
571  */
573  {}
574 
575 
576  /**
577  * Copy constructor.
578  *
579  * \param cursor super_iterator
580  */
581  super_const_iterator(super_iterator cursor) :
582  range (cursor.range),
583  i (cursor.i),
584  second(cursor.second)
585  {}
586 
587 
588  /**
589  * Smart pointer operator.
590  *
591  * \return pointer to pair of iterators
592  */
594  {
595  return pointer_type(new value_type(i->first, second));
596  }
597 
598 
599  /**
600  * Dereference operator.
601  *
602  * \return multidimensional pair
603  */
605  {
606  return reference_type(i->first, *second);
607  }
608 
609 
610  /**
611  * Equality of super iterator.
612  *
613  * \param cursor super iterator
614  * \return true if equal; else false
615  */
616  virtual bool equals(const super_const_iterator& cursor) const
617  {
618  return i == cursor.i && (i == range.second || second.equals(cursor.second));
619  }
620 
621 
622  /**
623  * Increment super_iterator.
624  *
625  * \return true if valid; else false
626  */
627  virtual bool increment()
628  {
629  if (!second.increment()) {
630 
631  while (++i != range.second) {
632 
633  second = i->second.super_begin();
634 
635  if (second != i->second.super_end()) {
636  break;
637  }
638  }
639  }
640 
641  return i != range.second;
642  }
643 
644 
645  /**
646  * Get multi-dimensional key.
647  *
648  * \return key
649  */
651  {
652  return multikey_type(i->first, second.getKey());
653  }
654 
655 
656  /**
657  * Get value.
658  *
659  * \return value
660  */
661  const JValue_t& getValue()
662  {
663  return second.getValue();
664  }
665 
666 
667  private:
668  /**
669  * Constructor.
670  *
671  * \param __begin begin of data
672  * \param __end end of data
673  */
675  const_iterator __end) :
676  range(__begin, __end)
677  {
678  for (i = range.first; i != range.second; ++i) {
679 
680  second = i->second.super_begin();
681 
682  if (second != i->second.super_end()) {
683  break;
684  }
685  }
686  }
687 
688 
691  typename mapped_type::super_const_iterator second;
692  };
693 
694 
695  /**
696  * Get super_iterator to begin of data.
697  *
698  * \return super iterator
699  */
700  super_const_iterator super_begin() const
701  {
702  return super_const_iterator(this->begin(), this->end());
703  }
704 
705 
706  /**
707  * Get super_iterator to end of data.
708  *
709  * \return super iterator
710  */
711  super_const_iterator super_end() const
712  {
713  return super_const_iterator(this->end(), this->end());
714  }
715 
716 
717  /**
718  * Get super_iterator to begin of data.
719  *
720  * \return super iterator
721  */
722  super_iterator super_begin()
723  {
724  return super_iterator(this->begin(), this->end());
725  }
726 
727 
728  /**
729  * Get super_iterator to end of data.
730  *
731  * \return super iterator
732  */
733  super_iterator super_end()
734  {
735  return super_iterator(this->end(), this->end());
736  }
737 
738 
739  /**
740  * Get mapped value.
741  *
742  * \param key key
743  * \return value
744  */
745  JValue_t& get(const multikey_type& key)
746  {
747  this->get(key.first).get(key.second);
748  }
749 
750 
751  /**
752  * Get mapped value.
753  *
754  * This method will throw an exception if given key is not present following the prerequisite of constness.
755  *
756  * \param key key
757  * \return value
758  */
759  const JValue_t& get(const multikey_type& key) const
760  {
761  this->get(key.first).get(key.second);
762  }
763 
764 
765  /**
766  * Put tuple-wise element (key,value) into collection.
767  *
768  * \param key key
769  * \param value value
770  */
771  void put(const multikey_type& key, const JValue_t& value)
772  {
773  this->get(key.first).put(key.second, value);
774  }
775 
776 
777  /**
778  * Erase element.
779  *
780  * \param key key
781  * \return true if element with given key has been erased; else false
782  */
783  bool erase(const multikey_type& key)
784  {
785  if (this->has(key.first))
786  return this->get(key.first).erase(key.second);
787  else
788  return false;
789  }
790 
791 
792  /**
793  * Test whether key is present.
794  *
795  * \param key key
796  * \return true if present; else false
797  */
798  bool has(const multikey_type& key) const
799  {
800  return map_type::has(key.first) && this->get(key.first).has(key.second);
801  }
802  };
803 
804 
805  /**
806  * Terminator class of recursive class JHashMap.
807  */
808  template<class JHead_t, class JValue_t, class JEvaluator_t>
809  struct JHashMap<JTypeList<JHead_t, JNullType>, JValue_t, JEvaluator_t> :
810  public JHashMap<JHead_t, JValue_t, JEvaluator_t>
811  {
812 
813  typedef JHead_t key_type;
814  typedef JValue_t mapped_type;
816  typedef JEvaluator_t evaluator_type;
817  typedef JHead_t multikey_type;
819 
822  typedef typename map_type::iterator iterator;
824 
825 
826  /**
827  * Constructor.
828  *
829  * \param evaluator evaluator
830  */
831  JHashMap(const JEvaluator_t& evaluator = JEvaluator_t()) :
832  JHashMap<JHead_t, JValue_t, JEvaluator_t>(evaluator)
833  {}
834 
835 
836  class super_const_iterator; // forward declaration
837 
838 
839  /**
840  * Terminator class of multidimensional iterator.
841  */
842  class super_iterator :
843  public JLANG::JEquals <super_iterator>,
844  public JLANG::JForwardIterator<super_iterator>
845  {
846 
850 
851  friend class JHashMap;
852 
853  public:
854 
855  /**
856  * Default constructor.
857  */
859  {}
860 
861 
862  /**
863  * Smart pointer operator.
864  *
865  * \return pointer to pair of iterators
866  */
868  {
869  return pointer_type(new value_type(i->first, i->second));
870  }
871 
872 
873  /**
874  * Dereference operator.
875  *
876  * \return multidimensional pair
877  */
879  {
880  return reference_type(i->first, i->second);
881  }
882 
883 
884  /**
885  * Equality of super iterator.
886  *
887  * \param cursor super iterator
888  * \return true if equal; else false
889  */
890  virtual bool equals(const super_iterator& cursor) const
891  {
892  return i == cursor.i;
893  }
894 
895 
896  /**
897  * Increment super_iterator.
898  *
899  * \return true if valid; else false
900  */
901  virtual bool increment()
902  {
903  return ++i != range.second;
904  }
905 
906 
907  /**
908  * Get multi-dimensional key.
909  *
910  * \return key
911  */
913  {
914  return multikey_type(i->first);
915  }
916 
917 
918  /**
919  * Get value.
920  *
921  * \return value
922  */
923  JValue_t& getValue()
924  {
925  return i->second;
926  }
927 
928  private:
929  /**
930  * Constructor.
931  *
932  * \param __begin begin of data
933  * \param __end end of data
934  */
936  iterator __end) :
937  range(__begin, __end),
938  i (__begin)
939  {}
940 
941 
944  };
945 
946 
947  /**
948  * Terminator class of multidimensional const_iterator.
949  */
950  class super_const_iterator :
951  public JLANG::JEquals <super_const_iterator>,
952  public JLANG::JForwardIterator<super_const_iterator>
953  {
954 
958 
959  friend class JHashMap;
960 
961  public:
962 
963  /**
964  * Default constructor.
965  */
967  {}
968 
969 
970  /**
971  * Copy constructor.
972  *
973  * \param cursor super_iterator
974  */
975  super_const_iterator(super_iterator cursor) :
976  range(cursor.range),
977  i (cursor.i)
978  {}
979 
980 
981  /**
982  * Smart pointer operator.
983  *
984  * \return pointer to pair of iterators
985  */
987  {
988  return pointer_type(new value_type(i->first, i->second));
989  }
990 
991 
992  /**
993  * Dereference operator.
994  *
995  * \return multidimensional pair
996  */
998  {
999  return reference_type(i->first, i->second);
1000  }
1001 
1002 
1003  /**
1004  * Equality of super iterator.
1005  *
1006  * \param cursor super iterator
1007  * \return true if equal; else false
1008  */
1009  virtual bool equals(const super_const_iterator& cursor) const
1010  {
1011  return i == cursor.i;
1012  }
1013 
1014 
1015  /**
1016  * Increment super_iterator.
1017  *
1018  * \return true if valid; else false
1019  */
1020  virtual bool increment()
1021  {
1022  return ++i != range.second;
1023  }
1024 
1025 
1026  /**
1027  * Get multi-dimensional key.
1028  *
1029  * \return key
1030  */
1032  {
1033  return multikey_type(i->first);
1034  }
1035 
1036 
1037  /**
1038  * Get value.
1039  *
1040  * \return value
1041  */
1042  const JValue_t& getValue()
1043  {
1044  return i->second;
1045  }
1046 
1047  private:
1048  /**
1049  * Constructor.
1050  *
1051  * \param __begin begin of data
1052  * \param __end end of data
1053  */
1055  const_iterator __end) :
1056  range(__begin, __end),
1057  i (__begin)
1058  {}
1059 
1060 
1063  };
1064 
1065 
1066  /**
1067  * Get super_iterator to begin of data.
1068  *
1069  * \return super_iterator
1070  */
1071  super_const_iterator super_begin() const
1072  {
1073  return super_const_iterator(this->begin(), this->end());
1074  }
1075 
1076 
1077  /**
1078  * Get super_iterator to end of data.
1079  *
1080  * \return super_iterator
1081  */
1082  super_const_iterator super_end() const
1083  {
1084  return super_const_iterator(this->end(), this->end());
1085  }
1086 
1087 
1088  /**
1089  * Get super_iterator to begin of data.
1090  *
1091  * \return super_iterator
1092  */
1093  super_iterator super_begin()
1094  {
1095  return super_iterator(this->begin(), this->end());
1096  }
1097 
1098 
1099  /**
1100  * Get super_iterator to end of data.
1101  *
1102  * \return super_iterator
1103  */
1104  super_iterator super_end()
1105  {
1106  return super_iterator(this->end(), this->end());
1107  }
1108  };
1109 }
1110 
1111 #endif
1112 
JException.hh
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::const_reverse_iterator
map_type::const_reverse_iterator const_reverse_iterator
Definition: JHashMap.hh:400
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::getKey
multikey_type getKey() const
Get multi-dimensional key.
Definition: JHashMap.hh:650
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::operator*
reference_type operator*()
Dereference operator.
Definition: JHashMap.hh:604
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_begin
super_iterator super_begin()
Get super_iterator to begin of data.
Definition: JHashMap.hh:722
JTOOLS::JHashMap::JComparator::operator()
bool operator()(typename JClass< value_type >::argument_type first, typename JClass< value_type >::argument_type second) const
Comparison of elements.
Definition: JHashMap.hh:98
JForwardIterator.hh
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::mapped_type
JValue_t mapped_type
Definition: JHashMap.hh:814
JIO::JReader
Interface for binary input.
Definition: JSerialisable.hh:62
JTOOLS::JHashMap::reverse_iterator
container_type::reverse_iterator reverse_iterator
Definition: JHashMap.hh:69
JLANG::JIndexOutOfRange
Exception for accessing an index in a collection that is outside of its range.
Definition: JException.hh:90
JTOOLS::JTuple< JTypeList< JHead_t, JTail_t > >
Template specialisation of JTuple for multiple data types.
Definition: JTuple.hh:222
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::value_type
std::pair< key_type, mapped_type > value_type
Definition: JHashMap.hh:394
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_begin
super_const_iterator super_begin() const
Get super_iterator to begin of data.
Definition: JHashMap.hh:700
JTuple.hh
JLANG::JSinglePointer
The template JSinglePointer class can be used to hold a pointer to an object.
Definition: JSinglePointer.hh:24
JTOOLS::JHashMap::container_type
std::vector< value_type > container_type
Definition: JHashMap.hh:64
JTOOLS::JTuple< JTypeList< JHead_t, JTail_t > >::second
JTuple< JTail_t > second
Definition: JTuple.hh:436
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::reference_type
JTuple< JTypeList< multikey_type, JValue_t & > > reference_type
Definition: JHashMap.hh:433
JTOOLS::JMappableCollection
Template interface definition for associative collection of elements.
Definition: JMappableCollection.hh:30
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_begin
super_iterator super_begin()
Get super_iterator to begin of data.
Definition: JHashMap.hh:1093
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::getKey
multikey_type getKey() const
Get multi-dimensional key.
Definition: JHashMap.hh:912
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::super_iterator
super_iterator(iterator __begin, iterator __end)
Constructor.
Definition: JHashMap.hh:532
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::JHashMap
JHashMap(const JEvaluator_t &evaluator=JEvaluator_t())
Constructor.
Definition: JHashMap.hh:415
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::multikey_type
JHead_t multikey_type
Definition: JHashMap.hh:817
JROOT::advance
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.
Definition: JCounter.hh:35
JTOOLS::JHashMap::iterator
container_type::iterator iterator
Definition: JHashMap.hh:68
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::reference_type
JTuple< JTypeList< multikey_type, const JValue_t & > > reference_type
Definition: JHashMap.hh:849
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::super_iterator
super_iterator()
Default constructor.
Definition: JHashMap.hh:858
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::operator->
pointer_type operator->()
Smart pointer operator.
Definition: JHashMap.hh:986
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::getKey
multikey_type getKey() const
Get multi-dimensional key.
Definition: JHashMap.hh:508
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_end
super_const_iterator super_end() const
Get super_iterator to end of data.
Definition: JHashMap.hh:711
JTOOLS::JHashMap::pop_back
void pop_back()
JLANG::JEquals
Template definition of auxiliary base class for comparison of data structures.
Definition: JEquals.hh:24
JTOOLS::JHashMap::const_reverse_iterator
container_type::const_reverse_iterator const_reverse_iterator
Definition: JHashMap.hh:67
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::get
const JValue_t & get(const multikey_type &key) const
Get mapped value.
Definition: JHashMap.hh:759
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::i
const_iterator i
Definition: JHashMap.hh:690
JSinglePointer.hh
JTOOLS::JHashMap::value_type
std::pair< JKey_t, JValue_t > value_type
Definition: JHashMap.hh:61
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::equals
virtual bool equals(const super_const_iterator &cursor) const
Equality of super iterator.
Definition: JHashMap.hh:1009
JTOOLS::n
const int n
Definition: JPolint.hh:628
JLANG::JNullType
Auxiliary class for no type definition.
Definition: JNullType.hh:19
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::operator*
reference_type operator*()
Dereference operator.
Definition: JHashMap.hh:997
JLANG::JClass::argument_type
JArgument< T >::argument_type argument_type
Definition: JClass.hh:82
std::vector
Definition: JSTDTypes.hh:12
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::evaluator_type
JEvaluator_t evaluator_type
Definition: JHashMap.hh:816
JTOOLS::JHashMap::compare
JComparator compare
Function object for comparison.
Definition: JHashMap.hh:373
JTOOLS::JHashMap
General purpose class for hash map of (key, value) pairs.
Definition: JHashMap.hh:53
JLANG::JTYPELIST
Auxiliary class for recursive type list generation.
Definition: JTypeList.hh:377
JLANG::JClass
Template for generic class types.
Definition: JClass.hh:80
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_begin
super_const_iterator super_begin() const
Get super_iterator to begin of data.
Definition: JHashMap.hh:1071
distance
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Definition: PhysicsEvent.hh:434
JTOOLS::JHashMap::get
const mapped_type & get(typename JClass< key_type >::argument_type key) const
Get mapped value.
Definition: JHashMap.hh:179
JLANG::JForwardIterator
Template interface for method bool increment().
Definition: JForwardIterator.hh:18
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::reverse_iterator
map_type::reverse_iterator reverse_iterator
Definition: JHashMap.hh:823
JTOOLS::JTuple< JTypeList< JHead_t, JTail_t > >::first
JHead_t first
Definition: JTuple.hh:435
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::key_type
JHead_t key_type
Definition: JHashMap.hh:813
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::const_iterator
map_type::const_iterator const_iterator
Definition: JHashMap.hh:399
JEquals.hh
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::operator->
pointer_type operator->()
Smart pointer operator.
Definition: JHashMap.hh:867
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::value_type
JPair< const key_type &, const mapped_type & > value_type
Definition: JHashMap.hh:955
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::second
mapped_type::super_iterator second
Definition: JHashMap.hh:549
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::JHashMap
JHashMap(const JEvaluator_t &evaluator=JEvaluator_t())
Constructor.
Definition: JHashMap.hh:831
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::super_const_iterator
super_const_iterator(const_iterator __begin, const_iterator __end)
Constructor.
Definition: JHashMap.hh:674
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::increment
virtual bool increment()
Increment super_iterator.
Definition: JHashMap.hh:901
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::value_type
std::pair< key_type, mapped_type > value_type
Definition: JHashMap.hh:815
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::i
const_iterator i
Definition: JHashMap.hh:1062
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::increment
virtual bool increment()
Increment super_iterator.
Definition: JHashMap.hh:485
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::getValue
const JValue_t & getValue()
Get value.
Definition: JHashMap.hh:1042
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::put
void put(const multikey_type &key, const JValue_t &value)
Put tuple-wise element (key,value) into collection.
Definition: JHashMap.hh:771
JMappableCollection.hh
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::increment
virtual bool increment()
Increment super_iterator.
Definition: JHashMap.hh:1020
JTOOLS::JRouter< int >
JTOOLS::JHashMap::evaluator_type
JEvaluator_t evaluator_type
Definition: JHashMap.hh:62
JTOOLS::JHashMap::clear
virtual void clear()
Clear.
Definition: JHashMap.hh:141
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::equals
virtual bool equals(const super_iterator &cursor) const
Equality of super iterator.
Definition: JHashMap.hh:890
JSerialisable.hh
JTOOLS::JHashMap::operator>>
friend JReader & operator>>(JReader &in, JHashMap &object)
Read hash map from input.
Definition: JHashMap.hh:322
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_end
super_iterator super_end()
Get super_iterator to end of data.
Definition: JHashMap.hh:1104
JSTDIO.hh
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::pointer_type
JLANG::JSinglePointer< value_type > pointer_type
Definition: JHashMap.hh:432
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::multikey_type
JTuple< JTypeList< JHead_t, JTail_t > > multikey_type
Definition: JHashMap.hh:396
JTOOLS::JHashMap::key_type
JKey_t key_type
Definition: JHashMap.hh:59
JTOOLS::JHashMap::has
bool has(typename JClass< key_type >::argument_type key) const
Test whether key is present.
Definition: JHashMap.hh:298
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::reverse_iterator
map_type::reverse_iterator reverse_iterator
Definition: JHashMap.hh:402
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::const_iterator
map_type::const_iterator const_iterator
Definition: JHashMap.hh:820
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::operator*
reference_type operator*()
Dereference operator.
Definition: JHashMap.hh:878
JHashEvaluator.hh
JIO::JWriter
Interface for binary output.
Definition: JSerialisable.hh:131
JPair.hh
JTOOLS::JHashMap::insert
pair_type insert(const value_type &element)
Insert element.
Definition: JHashMap.hh:196
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::get
JValue_t & get(const multikey_type &key)
Get mapped value.
Definition: JHashMap.hh:745
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::value_type
JPair< const key_type &, typename mapped_type::super_const_iterator & > value_type
Definition: JHashMap.hh:561
JTOOLS::JHashMap::JHashMap
JHashMap(const JEvaluator_t &evaluator=JEvaluator_t())
Constructor.
Definition: JHashMap.hh:131
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::getValue
JValue_t & getValue()
Get value.
Definition: JHashMap.hh:923
THROW
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::super_const_iterator
super_const_iterator(super_iterator cursor)
Copy constructor.
Definition: JHashMap.hh:581
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::iterator
map_type::iterator iterator
Definition: JHashMap.hh:822
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::range
std::pair< const_iterator, const_iterator > range
Definition: JHashMap.hh:689
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::super_const_iterator
super_const_iterator(const_iterator __begin, const_iterator __end)
Constructor.
Definition: JHashMap.hh:1054
JTOOLS::JHashMap::get
virtual mapped_type & get(typename JClass< key_type >::argument_type key)
Get mapped value.
Definition: JHashMap.hh:159
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::super_const_iterator
super_const_iterator()
Default constructor.
Definition: JHashMap.hh:966
JTOOLS::JHashMap::erase
void erase(iterator __begin, iterator __end)
Erase elements in given range.
Definition: JHashMap.hh:246
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::range
std::pair< iterator, iterator > range
Definition: JHashMap.hh:547
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::pointer_type
JLANG::JSinglePointer< value_type > pointer_type
Definition: JHashMap.hh:562
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_end
super_const_iterator super_end() const
Get super_iterator to end of data.
Definition: JHashMap.hh:1082
JLANG::JTypeList
Type list.
Definition: JTypeList.hh:22
std::pair
Definition: JSTDTypes.hh:15
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::mapped_type
JHashMap< JTail_t, JValue_t, JEvaluator_t > mapped_type
Definition: JHashMap.hh:393
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::map_type
JHashMap< key_type, mapped_type, evaluator_type > map_type
Definition: JHashMap.hh:818
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::getKey
multikey_type getKey() const
Get multi-dimensional key.
Definition: JHashMap.hh:1031
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::reference_type
JTuple< JTypeList< multikey_type, const JValue_t & > > reference_type
Definition: JHashMap.hh:563
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::super_iterator
super_iterator()
Default constructor.
Definition: JHashMap.hh:442
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::increment
virtual bool increment()
Increment super_iterator.
Definition: JHashMap.hh:627
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::operator->
pointer_type operator->()
Smart pointer operator.
Definition: JHashMap.hh:593
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::range
std::pair< iterator, iterator > range
Definition: JHashMap.hh:942
JTOOLS::JHashMap::pair_type
std::pair< const_iterator, bool > pair_type
Definition: JHashMap.hh:71
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::super_const_iterator
super_const_iterator(super_iterator cursor)
Copy constructor.
Definition: JHashMap.hh:975
JTOOLS::JHashMap::push_back
void push_back()
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::value_type
JPair< const key_type &, typename mapped_type::super_iterator & > value_type
Definition: JHashMap.hh:431
JTOOLS::JHashMap::const_iterator
container_type::const_iterator const_iterator
Definition: JHashMap.hh:66
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::equals
virtual bool equals(const super_const_iterator &cursor) const
Equality of super iterator.
Definition: JHashMap.hh:616
JTOOLS::JHashMap::JComparator::getValue
JEvaluator_t getValue
Function object for evaluation of key.
Definition: JHashMap.hh:122
JTOOLS::JHashMap::operator<<
friend JWriter & operator<<(JWriter &out, const JHashMap &object)
Write hash map to output.
Definition: JHashMap.hh:347
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::operator*
reference_type operator*()
Dereference operator.
Definition: JHashMap.hh:462
JTOOLS::JTuple
Template data structure.
Definition: JTuple.hh:45
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::range
std::pair< const_iterator, const_iterator > range
Definition: JHashMap.hh:1061
std
Definition: jaanetDictionary.h:36
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::equals
virtual bool equals(const super_iterator &cursor) const
Equality of super iterator.
Definition: JHashMap.hh:474
JTypeList.hh
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::has
bool has(const multikey_type &key) const
Test whether key is present.
Definition: JHashMap.hh:798
JIO
Auxiliary classes and methods for binary I/O.
Definition: JBinaryFileReader.hh:17
JRouter.hh
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::pointer_type
JLANG::JSinglePointer< value_type > pointer_type
Definition: JHashMap.hh:848
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::key_type
JHead_t key_type
Definition: JHashMap.hh:392
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::map_type
JHashMap< key_type, mapped_type, evaluator_type > map_type
Definition: JHashMap.hh:397
JNullType.hh
JTOOLS::JHashMap::JComparator::operator()
bool operator()(typename JClass< value_type >::argument_type element, typename JClass< key_type >::argument_type x) const
Comparison of element and key value.
Definition: JHashMap.hh:112
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::pointer_type
JLANG::JSinglePointer< value_type > pointer_type
Definition: JHashMap.hh:956
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::i
iterator i
Definition: JHashMap.hh:548
JTOOLS::JHashMap::router
JRouter< int > router
Definition: JHashMap.hh:375
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::super_const_iterator
super_const_iterator()
Default constructor.
Definition: JHashMap.hh:572
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::value_type
JPair< const key_type &, const mapped_type & > value_type
Definition: JHashMap.hh:847
JTOOLS::JHashMap::resize
void resize()
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::const_reverse_iterator
map_type::const_reverse_iterator const_reverse_iterator
Definition: JHashMap.hh:821
JTOOLS::JPair
Template specialisation for a pair of values.
Definition: JPair.hh:28
JTOOLS::JHashMap::JComparator
Auxiliary class for ordering of objects in the collection by the hash value of their keys.
Definition: JHashMap.hh:79
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::operator->
pointer_type operator->()
Smart pointer operator.
Definition: JHashMap.hh:451
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::evaluator_type
JEvaluator_t evaluator_type
Definition: JHashMap.hh:395
JTOOLS::JHashMap::erase
void erase(iterator pos)
Erase element at given position.
Definition: JHashMap.hh:226
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::second
mapped_type::super_const_iterator second
Definition: JHashMap.hh:691
JAANET::get
T get(const JHead &header)
Get object from header.
Definition: JHeadToolkit.hh:295
JTOOLS
Auxiliary classes and methods for multi-dimensional interpolations and histograms.
Definition: JAbstractCollection.hh:9
JTOOLS::JHashMap::mapped_type
JValue_t mapped_type
Definition: JHashMap.hh:60
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator::getValue
JValue_t & getValue()
Get value.
Definition: JHashMap.hh:519
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator::reference_type
JTuple< JTypeList< multikey_type, const JValue_t & > > reference_type
Definition: JHashMap.hh:957
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::erase
bool erase(const multikey_type &key)
Erase element.
Definition: JHashMap.hh:783
JTOOLS::JHashMap::getComparator
const JComparator & getComparator() const
Get comparator.
Definition: JHashMap.hh:309
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator::getValue
const JValue_t & getValue()
Get value.
Definition: JHashMap.hh:661
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::i
iterator i
Definition: JHashMap.hh:943
JTOOLS::JHashMap::erase
bool erase(typename JClass< key_type >::argument_type key) const
Erase element.
Definition: JHashMap.hh:269
JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator::super_iterator
super_iterator(iterator __begin, iterator __end)
Constructor.
Definition: JHashMap.hh:935
JTOOLS::JHashMap::getValue
JEvaluator_t getValue
Function object for evaluation of key.
Definition: JHashMap.hh:366
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::iterator
map_type::iterator iterator
Definition: JHashMap.hh:401
JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_end
super_iterator super_end()
Get super_iterator to end of data.
Definition: JHashMap.hh:733
JTOOLS::JHashMap::JComparator::JComparator
JComparator(const JEvaluator_t &evaluator=JEvaluator_t())
Constructor.
Definition: JHashMap.hh:86