1 #ifndef __JTOOLS__JHASHCOLLECTION__
2 #define __JTOOLS__JHASHCOLLECTION__
18 namespace JPP {
using namespace JTOOLS; }
32 template<
class JElement_t,
class JEvaluator_t = JHashEvaluator>
45 typedef typename container_type::iterator
iterator;
76 for (
iterator i = this->begin(); i != this->end(); ++i) {
91 container_type::clear();
104 const int ival = this->
getValue(value);
107 return this->begin() +
router.get(ival);
122 const int ival = this->
getValue(value);
125 return this->begin() +
router.get(ival);
142 const int ival = this->
getValue(value);
148 return container_type::operator[](
router.get(ival)).second;
163 const int ival = this->
getValue(value);
166 return container_type::operator[](
router.get(ival)).second;
181 const int ival = this->
getValue(element);
185 container_type::push_back(element);
187 router.put(ival, this->size() - 1);
205 for (
iterator i = container_type::erase(pos); i != this->end(); ++i) {
219 for (
iterator i = __begin; i != __end; ++i) {
223 for (
iterator i = container_type::erase(__begin, __end); i != this->end(); ++i) {
238 const int ival = this->
getValue(value);
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Exception for accessing an index in a collection that is outside of its range.