Jpp  15.0.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JAbstractMultiMap.hh
Go to the documentation of this file.
1 #ifndef __JTOOLS__JABSTRACTMULTIMAP__
2 #define __JTOOLS__JABSTRACTMULTIMAP__
3 
5 #include "JTools/JMultiKey.hh"
6 
7 
8 /**
9  * \author mdejong
10  */
11 
12 namespace JTOOLS {}
13 namespace JPP { using namespace JTOOLS; }
14 
15 namespace JTOOLS {
16 
17  /**
18  * Abstract interface for abscissa values of a multidimensional map.
19  *
20  * The template parameters refer to the dimension of the multimap and
21  * the data type of the abscissa values, respectively.
22  */
23  template<unsigned int N, class JAbscissa_t>
25  public virtual JAbstractMultiMap<N - 1, JAbscissa_t>
26  {
27  typedef JAbscissa_t abscissa_type;
29 
31 
32 
33  /**
34  * Virtual destructor.
35  */
37  {}
38 
39 
40  /**
41  * Get abscissa values as a function of given key.
42  *
43  * \param key key
44  * \return abscissa values
45  */
46  virtual const JAbstractCollection<abscissa_type>& operator()(const key_type& key) const = 0;
47  };
48 
49 
50  /**
51  * Terminator class of recursive class JAbstractMultiMap.
52  * This class provides for dummy implementations of interface methods.
53  */
54  template<class JAbscissa_t>
55  struct JAbstractMultiMap<0, JAbscissa_t>
56  {
57  protected:
58  void operator()() const {}
59  };
60 }
61 
62 #endif
virtual const JAbstractCollection< abscissa_type > & operator()(const key_type &key) const =0
Get abscissa values as a function of given key.
Abstract interface for abscissa values of a collection of elements.
virtual ~JAbstractMultiMap()
Virtual destructor.
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
Abstract interface for abscissa values of a multidimensional map.
Multidimensional key.
Definition: JMultiKey.hh:34
JMultiKey< N-1, abscissa_type > key_type