Jpp  15.0.1-rc.1-highqe
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JGridMap.hh
Go to the documentation of this file.
1 #ifndef __JTOOLS__JGRIDMAP__
2 #define __JTOOLS__JGRIDMAP__
3 
6 #include "JTools/JElement.hh"
7 
8 
9 /**
10  * \author mdejong
11  */
12 
13 namespace JTOOLS {}
14 namespace JPP { using namespace JTOOLS; }
15 
16 namespace JTOOLS {
17 
18 
19  /**
20  * Map of equidistant pair-wise elements.
21  *
22  * The key_type and mapped_type refer to the pair-wise element of this map, respectively.
23  */
24  template<class JKey_t,
25  class JValue_t,
26  class JDistance_t = JDistance<JKey_t> >
27  class JGridMap :
28  public JGridCollection<JElement2D<JKey_t, JValue_t>, JDistance_t>
29  {
30  public:
31 
32  typedef JKey_t key_type;
33  typedef JValue_t mapped_type;
34 
36 
40 
45 
46 
47  /**
48  * Default constructor.
49  */
51  {}
52  };
53 
54 
55  /**
56  * Specialisation of JMapCollection for JGridMap.
57  */
58  template<>
60  /**
61  * Collection of elements.
62  */
63  template<class JElement_t,
65  struct collection_type :
66  public JGridCollection<JElement_t, JDistance_t>
67  {};
68  };
69 }
70 
71 #endif
JKey_t key_type
Definition: JGridMap.hh:32
collection_type::value_type value_type
Definition: JGridMap.hh:39
JGridMap()
Default constructor.
Definition: JGridMap.hh:50
General purpose class for collection of elements, see: &lt;a href=&quot;JTools.PDF&quot;;&gt;Collection of elements...
Definition: JCollection.hh:73
The elements in a collection are sorted according to their abscissa values and a given distance opera...
JGridCollection< JElement2D< JKey_t, JValue_t >, JDistance_t > collection_type
Definition: JGridMap.hh:35
collection_type::reverse_iterator reverse_iterator
Definition: JGridMap.hh:44
Template class for distance evaluation.
Definition: JDistance.hh:24
JElement2D< JKey_t, JHistogram_t >::abscissa_type abscissa_type
Definition: JCollection.hh:82
collection_type::iterator iterator
Definition: JGridMap.hh:43
General purpose class for collection of equidistant elements.
collection_type::ordinate_type ordinate_type
Definition: JGridMap.hh:38
Template class to define the corresponding JCollection for a given template JMap. ...
JElement2D< JKey_t, JHistogram_t >::ordinate_type ordinate_type
Definition: JCollection.hh:83
Map of equidistant pair-wise elements.
Definition: JGridMap.hh:27
collection_type::const_iterator const_iterator
Definition: JGridMap.hh:41
collection_type::abscissa_type abscissa_type
Definition: JGridMap.hh:37
2D Element.
Definition: JElement.hh:46
JValue_t mapped_type
Definition: JGridMap.hh:33
collection_type::const_reverse_iterator const_reverse_iterator
Definition: JGridMap.hh:42