cnorxz/src/include/ranges/single_range.h

652 lines
17 KiB
C
Raw Normal View History

2017-02-16 11:20:40 +01:00
// -*- C++ -*-
#ifndef __single_range_h__
#define __single_range_h__
#include <cstdlib>
#include <vector>
2017-06-01 13:19:27 +02:00
#include <memory>
#include <map>
2017-02-16 11:20:40 +01:00
#include "base_def.h"
2018-07-16 00:12:05 +02:00
//#include "ranges/rpack_num.h"
2017-12-17 17:40:55 +01:00
#include "ranges/index_base.h"
#include "ranges/range_base.h"
#include "ranges/x_to_string.h"
#include "ranges/type_map.h"
2017-02-16 11:20:40 +01:00
#include "xfor/for_type.h"
//#include "xfor/xfor.h"
2017-02-16 11:20:40 +01:00
namespace MultiArrayTools
{
namespace
{
using namespace MultiArrayHelper;
}
2017-02-16 11:20:40 +01:00
template <typename U, SpaceType TYPE, size_t S>
class GenSingleIndex : public IndexInterface<GenSingleIndex<U,TYPE,S>,U>
2017-02-16 11:20:40 +01:00
{
public:
typedef IndexInterface<GenSingleIndex<U,TYPE,S>,U> IB;
2017-08-04 14:57:19 +02:00
typedef U MetaType;
typedef GenSingleRange<U,TYPE,S> RangeType;
typedef GenSingleIndex IType;
2018-02-13 16:54:13 +01:00
//DEFAULT_MEMBERS_X(GenSingleIndex);
2017-08-04 11:27:47 +02:00
GenSingleIndex(const std::shared_ptr<GenSingleRange<U,TYPE,S> >& range);
static constexpr IndexType sType() { return IndexType::SINGLE; }
static constexpr size_t totalDim() { return 1; }
static constexpr size_t sDim() { return 1; }
2018-07-28 15:27:11 +02:00
static constexpr SpaceType STYPE = TYPE;
2019-01-15 17:41:43 +01:00
static constexpr bool PARALLEL = true;
// ==== >>>>> STATIC POLYMORPHISM <<<<< ====
IndexType type() const;
GenSingleIndex& operator=(size_t pos);
GenSingleIndex& operator++();
GenSingleIndex& operator--();
2017-12-17 14:23:23 +01:00
int pp(std::intptr_t idxPtrNum);
int mm(std::intptr_t idxPtrNum);
2018-07-22 16:16:24 +02:00
std::string stringMeta() const;
U meta() const;
const U* metaPtr() const;
GenSingleIndex& at(const U& metaPos);
size_t posAt(const U& metaPos) const;
2018-10-14 16:59:27 +02:00
bool isMeta(const U& metaPos) const;
2017-12-17 14:23:23 +01:00
size_t dim(); // = 1
bool last();
bool first();
2017-12-17 14:23:23 +01:00
std::shared_ptr<RangeType> range();
2017-12-12 11:15:39 +01:00
template <size_t N>
2017-12-17 14:23:23 +01:00
void getPtr();
2017-12-17 14:23:23 +01:00
size_t getStepSize(size_t n);
std::string id() const;
2017-12-17 14:23:23 +01:00
void print(size_t offset);
template <class Expr>
auto ifor(size_t step, Expr ex) const
-> For<GenSingleIndex<U,TYPE,S>,Expr>;
template <class Expr>
auto iforh(size_t step, Expr ex) const
-> For<GenSingleIndex<U,TYPE,S>,Expr,ForType::HIDDEN>;
2019-01-15 17:41:43 +01:00
template <class Expr>
auto pifor(size_t step, Expr ex) const
-> PFor<GenSingleIndex<U,TYPE,S>,Expr>;
2019-01-15 17:41:43 +01:00
2018-03-19 18:38:53 +01:00
private:
std::shared_ptr<RangeType> mExplicitRangePtr;
const U* mMetaPtr;
2017-02-16 11:20:40 +01:00
};
template <typename U, SpaceType TYPE, size_t S>
class GenSingleRangeFactory : public RangeFactoryBase
2017-07-28 11:33:31 +02:00
{
public:
typedef GenSingleRange<U,TYPE,S> oType;
2017-07-28 11:33:31 +02:00
GenSingleRangeFactory() = delete;
2019-02-13 21:59:13 +01:00
GenSingleRangeFactory(const vector<U>& space);
2019-03-14 19:10:06 +01:00
GenSingleRangeFactory(vector<U>&& space);
2017-07-28 11:33:31 +02:00
std::shared_ptr<RangeBase> create();
};
template <typename U>
class MetaMap
{
private:
std::map<U,size_t> mMap;
public:
MetaMap() = default;
MetaMap(const MetaMap& in) = default;
MetaMap(MetaMap&& in) = default;
MetaMap& operator=(const MetaMap& in) = default;
MetaMap& operator=(MetaMap&& in) = default;
//MetaMap(const std::map<U,size_t>& in) : mMap(in) {}
2019-02-13 21:59:13 +01:00
MetaMap(const vector<U>& in)
{
for(size_t i = 0; i != in.size(); ++i){
mMap[in[i]] = i;
}
}
size_t at(const U& in) const { return mMap.at(in); }
2018-10-14 16:59:27 +02:00
size_t count(const U& in) const { return mMap.count(in); }
};
template <>
class MetaMap<std::array<int,2> >
{
private:
2019-02-13 21:59:13 +01:00
vector<size_t> mMap;
int min1;
int min2;
int max1;
int max2;
size_t s1;
size_t s2;
public:
typedef std::array<int,2> U;
MetaMap() = default;
MetaMap(const MetaMap& in) = default;
MetaMap(MetaMap&& in) = default;
MetaMap& operator=(const MetaMap& in) = default;
MetaMap& operator=(MetaMap&& in) = default;
2019-02-13 21:59:13 +01:00
MetaMap(const vector<U>& in) : min1(in[0][0]),
min2(in[0][1]),
max1(in[0][0]),
max2(in[0][1])
{
for(auto& x: in){
if(min1 > x[0]) min1 = x[0];
if(min2 > x[1]) min2 = x[1];
if(max1 < x[0]+1) max1 = x[0]+1;
if(max2 < x[1]+1) max2 = x[1]+1;
}
s1 = max1 - min1;
s2 = max2 - min2;
mMap.resize(s1*s2,-1);
for(size_t i = 0; i != in.size(); ++i){
const size_t mpos = (in[i][0] - min1) * s2 + (in[i][1] - min2);
mMap[ mpos ] = i;
}
}
size_t at(const U& in) const
{
//CHECK;
const size_t mpos = (in[0] - min1) * s2 + (in[1] - min2);
assert(mpos < mMap.size());
assert(mMap[ mpos ] != static_cast<size_t>( -1 ) );
return mMap[ mpos ];
}
};
template <size_t S>
struct CheckStatic
{
static constexpr size_t ISSTATIC = true;
static constexpr size_t SIZE = S;
};
template <>
struct CheckStatic<-1>
{
static constexpr size_t ISSTATIC = false;
static constexpr size_t SIZE = -1;
};
2019-02-13 21:59:13 +01:00
template <SpaceType TYPE>
struct CheckDefault
{
static constexpr size_t ISDEFAULT = false;
static constexpr size_t HASMETACONT = true;
};
template <>
struct CheckDefault<SpaceType::NONE>
{
static constexpr size_t ISDEFAULT = true;
static constexpr size_t HASMETACONT = false;
};
template <typename U, SpaceType TYPE, size_t S>
class GenSingleRange : public RangeInterface<GenSingleIndex<U,TYPE,S> >
2017-02-16 11:20:40 +01:00
{
public:
2017-08-04 11:27:47 +02:00
typedef RangeBase RB;
typedef GenSingleIndex<U,TYPE,S> IndexType;
typedef GenSingleRange RangeType;
typedef U MetaType;
typedef GenSingleRangeFactory<U,TYPE,S> FType;
//typedef typename RangeInterface<GenSingleIndex<U,TYPE,S> >::IndexType IndexType;
virtual size_t size() const final;
virtual size_t dim() const final;
virtual SpaceType spaceType() const final;
2018-11-07 10:58:07 +01:00
virtual DataHeader dataHeader() const final;
2019-03-13 21:51:48 +01:00
virtual size_t typeNum() const final;
2019-03-14 14:20:38 +01:00
virtual size_t cmeta(char* target, size_t pos) const final;
virtual std::string stringMeta(size_t pos) const final;
2019-02-13 21:59:13 +01:00
virtual vector<char> data() const final;
2017-08-04 11:27:47 +02:00
2018-10-14 16:59:27 +02:00
bool isMeta(const U& metaPos) const;
2017-02-16 11:20:40 +01:00
const U& get(size_t pos) const;
size_t getMeta(const U& metaPos) const;
virtual IndexType begin() const final;
virtual IndexType end() const final;
2018-02-15 16:24:54 +01:00
friend GenSingleRangeFactory<U,TYPE,S>;
2019-02-13 21:59:13 +01:00
static GenSingleRangeFactory<U,TYPE,S> factory()
{
static_assert( not CheckDefault<TYPE>::HASMETACONT,
"asked for default factory for meta data containing range" );
return GenSingleRangeFactory<U,TYPE,S>(vector<U>());
}
static constexpr bool defaultable = CheckDefault<TYPE>::ISDEFAULT;
static constexpr size_t ISSTATIC = CheckStatic<S>::ISSTATIC;
static constexpr size_t SIZE = CheckStatic<S>::SIZE;
2019-02-13 21:59:13 +01:00
static constexpr bool HASMETACONT = CheckDefault<TYPE>::HASMETACONT;
2017-02-16 11:20:40 +01:00
protected:
GenSingleRange() = delete;
GenSingleRange(const GenSingleRange& in) = delete;
2017-06-01 13:19:27 +02:00
2019-02-13 21:59:13 +01:00
GenSingleRange(const vector<U>& space);
2019-03-14 19:10:06 +01:00
GenSingleRange(vector<U>&& space);
2017-06-01 13:19:27 +02:00
2019-02-13 21:59:13 +01:00
vector<U> mSpace;
//std::map<U,size_t> mMSpace;
MetaMap<U> mMSpace;
2017-02-16 11:20:40 +01:00
};
2017-03-14 23:00:41 +01:00
template <typename U, SpaceType TYPE>
using SingleRange = GenSingleRange<U,TYPE,-1>;
template <typename U, SpaceType TYPE>
using SingleIndex = GenSingleIndex<U,TYPE,-1>;
template <typename U, SpaceType TYPE>
using SingleRangeFactory = GenSingleRangeFactory<U,TYPE,-1>;
}
/* ========================= *
* --- TEMPLATE CODE --- *
* ========================= */
2017-03-14 23:00:41 +01:00
namespace MultiArrayTools
{
/******************
* GenSingleIndex *
******************/
template <bool HASMETACONT>
struct MetaPtrHandle
{
template <class Range>
static const typename Range::MetaType* set(Range* r)
{
return &r->get(0);
}
template <typename U, class Range>
static inline U getMeta(U* metaPtr, size_t pos, std::shared_ptr<Range> r)
{
return metaPtr[pos];
}
};
template <>
struct MetaPtrHandle<false>
{
template <class Range>
static const typename Range::MetaType* set(Range* r)
{
return nullptr;
}
template <typename U, class Range>
static inline U getMeta(U* metaPtr, size_t pos, std::shared_ptr<Range> r)
{
return r->get(pos);
}
};
template <typename U, SpaceType TYPE, size_t S>
GenSingleIndex<U,TYPE,S>::GenSingleIndex(const std::shared_ptr<GenSingleRange<U,TYPE,S> >& range) :
IndexInterface<GenSingleIndex<U,TYPE,S>,U>(range, 0),
mExplicitRangePtr(std::dynamic_pointer_cast<RangeType>(IB::mRangePtr)),
mMetaPtr(MetaPtrHandle<GenSingleIndex<U,TYPE,S>::RangeType::HASMETACONT>::set
( dynamic_cast<RangeType*>(IB::mRangePtr.get() ) ) ) {}
2017-12-17 14:23:23 +01:00
template <typename U, SpaceType TYPE, size_t S>
IndexType GenSingleIndex<U,TYPE,S>::type() const
2017-12-17 14:23:23 +01:00
{
return IndexType::SINGLE;
}
template <typename U, SpaceType TYPE, size_t S>
GenSingleIndex<U,TYPE,S>& GenSingleIndex<U,TYPE,S>::operator=(size_t pos)
2017-12-17 14:23:23 +01:00
{
IB::mPos = pos;
return *this;
}
template <typename U, SpaceType TYPE, size_t S>
GenSingleIndex<U,TYPE,S>& GenSingleIndex<U,TYPE,S>::operator++()
2017-12-17 14:23:23 +01:00
{
++IB::mPos;
return *this;
}
template <typename U, SpaceType TYPE, size_t S>
GenSingleIndex<U,TYPE,S>& GenSingleIndex<U,TYPE,S>::operator--()
2017-12-17 14:23:23 +01:00
{
--IB::mPos;
return *this;
}
template <typename U, SpaceType TYPE, size_t S>
int GenSingleIndex<U,TYPE,S>::pp(std::intptr_t idxPtrNum)
2017-12-17 14:23:23 +01:00
{
++(*this);
return 1;
}
template <typename U, SpaceType TYPE, size_t S>
int GenSingleIndex<U,TYPE,S>::mm(std::intptr_t idxPtrNum)
2017-12-17 14:23:23 +01:00
{
--(*this);
return 1;
}
template <typename U, SpaceType TYPE, size_t S>
std::string GenSingleIndex<U,TYPE,S>::stringMeta() const
2018-07-22 16:16:24 +02:00
{
return std::dynamic_pointer_cast<GenSingleRange<U,TYPE,S> const>( IB::mRangePtr )->stringMeta(IB::mPos);
2018-07-22 16:16:24 +02:00
}
template <typename U, SpaceType TYPE, size_t S>
U GenSingleIndex<U,TYPE,S>::meta() const
2017-12-17 14:23:23 +01:00
{
return MetaPtrHandle<GenSingleIndex<U,TYPE,S>::RangeType::HASMETACONT>::getMeta
( mMetaPtr, IB::mPos, mExplicitRangePtr );
2017-12-17 14:23:23 +01:00
}
2019-03-13 21:51:48 +01:00
template <typename U, SpaceType TYPE, size_t S>
const U* GenSingleIndex<U,TYPE,S>::metaPtr() const
2018-03-19 18:38:53 +01:00
{
return mMetaPtr;
}
2018-10-14 16:59:27 +02:00
template <typename U, SpaceType TYPE, size_t S>
bool GenSingleIndex<U,TYPE,S>::isMeta(const U& metaPos) const
2018-10-14 16:59:27 +02:00
{
return mExplicitRangePtr->isMeta(metaPos);
}
2018-03-19 18:38:53 +01:00
template <typename U, SpaceType TYPE, size_t S>
GenSingleIndex<U,TYPE,S>& GenSingleIndex<U,TYPE,S>::at(const U& metaPos)
2017-12-17 14:23:23 +01:00
{
(*this) = std::dynamic_pointer_cast<GenSingleRange<U,TYPE,S> const>( IB::mRangePtr )->getMeta( metaPos );
2017-12-17 14:23:23 +01:00
return *this;
}
template <typename U, SpaceType TYPE, size_t S>
size_t GenSingleIndex<U,TYPE,S>::posAt(const U& metaPos) const
{
return std::dynamic_pointer_cast<GenSingleRange<U,TYPE,S> const>( IB::mRangePtr )->getMeta( metaPos );
}
2018-10-14 16:59:27 +02:00
template <typename U, SpaceType TYPE, size_t S>
size_t GenSingleIndex<U,TYPE,S>::dim() // = 1
2017-12-17 14:23:23 +01:00
{
return 1;
}
template <typename U, SpaceType TYPE, size_t S>
bool GenSingleIndex<U,TYPE,S>::last()
2017-12-17 14:23:23 +01:00
{
return IB::mPos == IB::mMax - 1;
}
template <typename U, SpaceType TYPE, size_t S>
bool GenSingleIndex<U,TYPE,S>::first()
2017-12-17 14:23:23 +01:00
{
return IB::mPos == 0;
}
template <typename U, SpaceType TYPE, size_t S>
std::shared_ptr<typename GenSingleIndex<U,TYPE,S>::RangeType> GenSingleIndex<U,TYPE,S>::range()
2017-12-17 14:23:23 +01:00
{
2018-11-26 18:23:38 +01:00
return mExplicitRangePtr;
2017-12-17 14:23:23 +01:00
}
template <typename U, SpaceType TYPE, size_t S>
2017-12-17 14:23:23 +01:00
template <size_t N>
void GenSingleIndex<U,TYPE,S>::getPtr() {}
2017-12-24 18:14:07 +01:00
template <typename U, SpaceType TYPE, size_t S>
size_t GenSingleIndex<U,TYPE,S>::getStepSize(size_t n)
2017-12-17 14:23:23 +01:00
{
return 1;
}
template <typename U, SpaceType TYPE, size_t S>
std::string GenSingleIndex<U,TYPE,S>::id() const
2017-12-17 14:23:23 +01:00
{
return std::string("sin") + std::to_string(IB::mId);
}
template <typename U, SpaceType TYPE, size_t S>
void GenSingleIndex<U,TYPE,S>::print(size_t offset)
2017-12-17 14:23:23 +01:00
{
if(offset == 0){
std::cout << " === " << std::endl;
}
for(size_t j = 0; j != offset; ++j) { std::cout << "\t"; }
std::cout << id() << "[" << reinterpret_cast<std::intptr_t>(this)
<< "](" << IB::mRangePtr << "): " << meta() << std::endl;
}
template <typename U, SpaceType TYPE, size_t S>
template <class Expr>
auto GenSingleIndex<U,TYPE,S>::ifor(size_t step, Expr ex) const
-> For<GenSingleIndex<U,TYPE,S>,Expr>
{
//static const size_t LAYER = typename Expr::LAYER;
return For<GenSingleIndex<U,TYPE,S>,Expr>(this, step, ex);
}
template <typename U, SpaceType TYPE, size_t S>
template <class Expr>
auto GenSingleIndex<U,TYPE,S>::iforh(size_t step, Expr ex) const
-> For<GenSingleIndex<U,TYPE,S>,Expr,ForType::HIDDEN>
{
//static const size_t LAYER = typename Expr::LAYER;
return For<GenSingleIndex<U,TYPE,S>,Expr,ForType::HIDDEN>(this, step, ex);
}
template <typename U, SpaceType TYPE, size_t S>
2019-01-15 17:41:43 +01:00
template <class Expr>
auto GenSingleIndex<U,TYPE,S>::pifor(size_t step, Expr ex) const
-> PFor<GenSingleIndex<U,TYPE,S>,Expr>
2019-01-15 17:41:43 +01:00
{
//static const size_t LAYER = typename Expr::LAYER;
return PFor<GenSingleIndex<U,TYPE,S>,Expr>(this, step, ex);
2019-01-15 17:41:43 +01:00
}
/********************
* SingleRange *
********************/
2017-03-14 23:00:41 +01:00
template <typename U, SpaceType TYPE, size_t S>
2019-02-13 21:59:13 +01:00
GenSingleRangeFactory<U,TYPE,S>::GenSingleRangeFactory(const vector<U>& space)
2017-03-14 23:00:41 +01:00
{
mProd = std::shared_ptr<oType>( new GenSingleRange<U,TYPE,S>( space ) );
}
2017-03-14 23:00:41 +01:00
2019-03-14 19:10:06 +01:00
template <typename U, SpaceType TYPE, size_t S>
GenSingleRangeFactory<U,TYPE,S>::GenSingleRangeFactory(vector<U>&& space)
{
mProd = std::shared_ptr<oType>( new GenSingleRange<U,TYPE,S>( space ) );
}
template <typename U, SpaceType TYPE, size_t S>
std::shared_ptr<RangeBase> GenSingleRangeFactory<U,TYPE,S>::create()
{
setSelf();
return mProd;
}
/********************
* SingleRange *
********************/
template <typename U, SpaceType TYPE, size_t S>
2019-02-13 21:59:13 +01:00
GenSingleRange<U,TYPE,S>::GenSingleRange(const vector<U>& space) :
RangeInterface<GenSingleIndex<U,TYPE,S> >(),
mSpace(space), mMSpace(mSpace)
{
//for(size_t i = 0; i != mSpace.size(); ++i){
// mMSpace[mSpace[i]] = i;
//}
}
2019-03-14 19:10:06 +01:00
template <typename U, SpaceType TYPE, size_t S>
GenSingleRange<U,TYPE,S>::GenSingleRange(vector<U>&& space) :
RangeInterface<GenSingleIndex<U,TYPE,S> >(),
mSpace(space), mMSpace(mSpace) {}
template <typename U, SpaceType TYPE, size_t S>
const U& GenSingleRange<U,TYPE,S>::get(size_t pos) const
2017-03-14 23:00:41 +01:00
{
return mSpace[pos];
}
2017-03-14 23:00:41 +01:00
template <typename U, SpaceType TYPE, size_t S>
size_t GenSingleRange<U,TYPE,S>::getMeta(const U& metaPos) const
{
return mMSpace.at(metaPos);
}
2017-03-14 23:00:41 +01:00
2019-02-13 21:59:13 +01:00
template <size_t SIZE>
inline size_t getStatSizeOrDyn(size_t size)
{
return SIZE;
}
template <>
inline size_t getStatSizeOrDyn<-1>(size_t size)
{
return size;
}
template <typename U, SpaceType TYPE, size_t S>
size_t GenSingleRange<U,TYPE,S>::size() const
{
2019-02-13 21:59:13 +01:00
return getStatSizeOrDyn<S>(mSpace.size());
}
2017-03-14 23:00:41 +01:00
template <typename U, SpaceType TYPE, size_t S>
size_t GenSingleRange<U,TYPE,S>::dim() const
2017-03-14 23:00:41 +01:00
{
return 1;
}
2017-03-14 23:00:41 +01:00
template <typename U, SpaceType TYPE, size_t S>
bool GenSingleRange<U,TYPE,S>::isMeta(const U& metaPos) const
2018-10-14 16:59:27 +02:00
{
return mMSpace.count(metaPos) != 0;
}
template <typename U, SpaceType TYPE, size_t S>
SpaceType GenSingleRange<U,TYPE,S>::spaceType() const
2018-07-28 15:27:11 +02:00
{
return TYPE;
}
2019-03-14 14:20:38 +01:00
template <typename U, SpaceType TYPE, size_t S>
size_t GenSingleRange<U,TYPE,S>::typeNum() const
{
return NumTypeMap<U>::num;
}
2018-07-28 15:27:11 +02:00
2019-03-14 14:20:38 +01:00
template <typename U, SpaceType TYPE, size_t S>
size_t GenSingleRange<U,TYPE,S>::cmeta(char* target, size_t pos) const
{
if(target){
*reinterpret_cast<U*>(target) = mSpace[pos];
}
return sizeof(U);
}
template <typename U, SpaceType TYPE, size_t S>
std::string GenSingleRange<U,TYPE,S>::stringMeta(size_t pos) const
{
return xToString(get(pos));
}
template <typename U, SpaceType TYPE, size_t S>
2019-02-13 21:59:13 +01:00
vector<char> GenSingleRange<U,TYPE,S>::data() const
{
2018-11-07 10:58:07 +01:00
DataHeader h = dataHeader();
2019-02-13 21:59:13 +01:00
vector<char> out;
out.reserve(h.metaSize + sizeof(DataHeader));
char* hcp = reinterpret_cast<char*>(&h);
out.insert(out.end(), hcp, hcp + sizeof(DataHeader));
stringCat(out, mSpace);
//const char* scp = reinterpret_cast<const char*>(mSpace.data());
//out.insert(out.end(), scp, scp + h.metaSize);
return out;
}
template <typename U, SpaceType TYPE, size_t S>
DataHeader GenSingleRange<U,TYPE,S>::dataHeader() const
2018-11-07 10:58:07 +01:00
{
DataHeader h;
h.spaceType = static_cast<int>( TYPE );
h.metaSize = metaSize(mSpace);
h.metaType = NumTypeMap<U>::num;
h.multiple = 0;
return h;
}
template <typename U, SpaceType TYPE, size_t S>
typename GenSingleRange<U,TYPE,S>::IndexType GenSingleRange<U,TYPE,S>::begin() const
{
GenSingleIndex<U,TYPE,S> i( std::dynamic_pointer_cast<GenSingleRange<U,TYPE,S> >
( std::shared_ptr<RangeBase>( RB::mThis ) ) );
i = 0;
return i;
}
template <typename U, SpaceType TYPE, size_t S>
typename GenSingleRange<U,TYPE,S>::IndexType GenSingleRange<U,TYPE,S>::end() const
{
GenSingleIndex<U,TYPE,S> i( std::dynamic_pointer_cast<GenSingleRange<U,TYPE,S> >
( std::shared_ptr<RangeBase>( RB::mThis ) ) );
i = size();
return i;
}
}
2017-02-16 11:20:40 +01:00
#include "range_types/header.h"
2017-02-16 11:20:40 +01:00
#endif