|
Jpp 19.3.0-rc.3
the software that should make you happy
|
Multidimensional key. More...
#include <JMultiKey.hh>
Public Types | |
| typedef JKey_t | key_type |
| typedef JMultiKey< N-1, JKey_t > | mapped_type |
| typedef std::pair< key_type, mapped_type > | pair_type |
Public Member Functions | |
| JMultiKey () | |
| Default constructor. | |
| JMultiKey (typename JClass< mapped_type >::argument_type __first, typename JClass< key_type > ::argument_type __second) | |
| Constructor. | |
| JMultiKey (typename JClass< key_type > ::argument_type __first, typename JClass< mapped_type >::argument_type __second) | |
| Constructor. | |
| JMultiKey (typename JArgument< N, JKey_t >::argument_type key) | |
| Copy constructor. | |
| bool | less (const JMultiKey< N, JKey_t > &key) const |
| Less than method. | |
| double | getLengthSquared () const |
| Get length squared. | |
| double | getLength () const |
| Get length. | |
| JMultiKey< N-1, JKey_t > | front () const |
| Get frontend key. | |
| key_type | back () const |
| Get backend key. | |
Friends | |
| std::istream & | operator>> (std::istream &in, JMultiKey< N, JKey_t > &key) |
| Read key from input. | |
| std::ostream & | operator<< (std::ostream &out, const JMultiKey< N, JKey_t > &key) |
| Write key to output. | |
Multidimensional key.
This class reproduces the key of a multidimensional map. The individual data members can be accessed as, e.g:
JMultiKey<3, key_type> key;
key[[.second].second].first;
Definition at line 66 of file JMultiKey.hh.
| JKey_t JTOOLS::JMultiKey< N, JKey_t >::key_type |
Definition at line 72 of file JMultiKey.hh.
| JMultiKey<N-1, JKey_t> JTOOLS::JMultiKey< N, JKey_t >::mapped_type |
Definition at line 73 of file JMultiKey.hh.
| std::pair<key_type, mapped_type> JTOOLS::JMultiKey< N, JKey_t >::pair_type |
Definition at line 74 of file JMultiKey.hh.
|
inline |
|
inline |
Constructor.
The secondary key is appended to the end of the primary keys.
| __first | primary keys |
| __second | secondary key |
Definition at line 92 of file JMultiKey.hh.
|
inline |
Constructor.
The primary key is inserted at the start of the secondary keys.
| __first | primary key |
| __second | secondary keys |
Definition at line 105 of file JMultiKey.hh.
|
inline |
|
inline |
Less than method.
| key | key |
Definition at line 127 of file JMultiKey.hh.
|
inline |
Get length squared.
Definition at line 141 of file JMultiKey.hh.
|
inline |
Get length.
Definition at line 152 of file JMultiKey.hh.
|
inline |
|
inline |
Get backend key.
Definition at line 174 of file JMultiKey.hh.
|
friend |
Read key from input.
| in | input stream |
| key | key |
Definition at line 187 of file JMultiKey.hh.
|
friend |
Write key to output.
| out | output stream |
| key | key |
Definition at line 203 of file JMultiKey.hh.