1#ifndef __JLANG__JVECTORIZE__
2#define __JLANG__JVECTORIZE__
18namespace JPP {
using namespace JLANG; }
25 template<
class JElement_t,
class JAllocator_t = std::allocator<JElement_t> >
38 for (
typename array_type::const_iterator i =
object.begin(); i !=
object.end(); ++i) {
53 template<
class JValue_t,
size_t N>
60 for (
size_t i = 0; i != N; ++i) {
80 buffer.assign(__begin, __end);
94 template<
class T,
class JType_t,
class JValue_t>
101 for (T __p = __begin; __p != __end; ++__p) {
102 buffer.push_back(*__p.*value);
117 template<
class T,
class JType_t,
class JValue_t>
124 for (T __p = __begin; __p != __end; ++__p) {
125 buffer.push_back((*__p.*function)());
138 template<
class JKey_t,
class JValue_t,
class JComparator_t,
class JAllocator_t>
151 template<
class JKey_t,
class JValue_t,
class JComparator_t,
class JAllocator_t>
168 template<
class T,
class JResult_t,
class JComparator_t>
171 JResult_t std::iterator_traits<T>::value_type::*value,
172 const JComparator_t& comparator)
179 if (p0 == __end) {
return p0; }
180 if (
p1 == __end) {
return p1; }
183 if (comparator((*p0).*value, (*p1).*value))
189 for ( ; p2 != __end; ++p2) {
191 if (comparator((*p0).*value, (*p1).*value)) {
192 if (comparator((*p1).*value, (*p2).*value)) {
195 }
else if (comparator((*p0).*value, (*p2).*value)) {
199 if (comparator((*p2).*value, (*p0).*value)) {
222 for (
typename array_type<T>::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
244 for (
typename array_type<T>::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
261 template<
class T,
class JCompare_t>
266 for (
typename array_type<T>::const_iterator p = buffer.begin(); p != buffer.end(); ++p) {
268 typename array_type<T>::const_iterator q = p;
270 while (++q != buffer.end() && !compare(*p,*q)) {}
272 if (q == buffer.end()) {
289 return getCount(buffer, std::equal_to<T>());
Forward declarations of STD containers.
Auxiliary classes and methods for language specific functionality.
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
T getMaximum(const array_type< T > &buffer, const T value)
Get maximum of values.
T make_set(T __begin, T __end, JResult_t std::iterator_traits< T >::value_type::*value, const JComparator_t &comparator)
Method to exclude outliers from already sorted data.
size_t getCount(const array_type< T > &buffer, const JCompare_t &compare)
Count number of unique values.
const array_type< JValue_t > & get_values(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of values of map.
const array_type< JKey_t > & get_keys(const std::map< JKey_t, JValue_t, JComparator_t, JAllocator_t > &data)
Method to create array of keys of map.
T getMinimum(const array_type< T > &buffer, const T value)
Get minimum of values.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for return type of make methods.
friend std::ostream & operator<<(std::ostream &out, const array_type &object)
Write array to output stream.