12#ifndef __cxz_xindex_cc_h__
13#define __cxz_xindex_cc_h__
24 template <
class Index,
typename Meta>
28 template <
class Index,
typename Meta>
32 template <
class Index,
typename Meta>
35 return std::make_shared<XIndex<Index,Meta>>(mI->THIS());
38 template <
class Index,
typename Meta>
44 template <
class Index,
typename Meta>
52 template <
class Index,
typename Meta>
59 template <
class Index,
typename Meta>
66 template <
class Index,
typename Meta>
69 return std::make_shared<XIndex<Index,Meta>>(*mI +
n);
72 template <
class Index,
typename Meta>
75 return std::make_shared<XIndex<Index,Meta>>(*mI -
n);
78 template <
class Index,
typename Meta>
83 return (*mI) - (*
ip->mI);
86 template <
class Index,
typename Meta>
93 template <
class Index,
typename Meta>
100 template <
class Index,
typename Meta>
106 template <
class Index,
typename Meta>
109 return UPos(mI->pmax());
112 template <
class Index,
typename Meta>
115 return UPos(mI->lmax());
118 template <
class Index,
typename Meta>
124 template <
class Index,
typename Meta>
127 return DType(*(*mI));
130 template <
class Index,
typename Meta>
136 template <
class Index,
typename Meta>
142 template <
class Index,
typename Meta>
145 return mI->stepSize(
id);
148 template <
class Index,
typename Meta>
154 template <
class Index,
typename Meta>
157 return toVec( mI->deepFormat() );
160 template <
class Index,
typename Meta>
163 return toVec( mI->deepMax() );
166 template <
class Index,
typename Meta>
173 template <
class Index,
typename Meta>
179 template <
class Index,
typename Meta>
182 return DType(mI->meta());
185 template <
class Index,
typename Meta>
188 mI->
at(std::any_cast<const Meta&>(meta.
get()));
192 template <
class Index,
typename Meta>
198 template <
class Index,
typename Meta>
201 return mI->formatIsTrivial();
204 template <
class Index,
typename Meta>
210 template <
class Index,
typename Meta>
216 template <
class Index>
219 typedef typename Index::MetaType
Meta;
220 return std::make_shared<XIndex<Index,Meta>>
221 (std::dynamic_pointer_cast<IndexInterface<Index,Meta>>(
i));
#define CXZ_ASSERT(statement, errmsg)
const std::any & get() const
virtual XIndexBase & at(const DType &meta)=0
virtual UPos pmax() const override final
virtual UPos stepSize(const IndexId< 0 > &id) const override final
virtual XIndexPtr operator-(Int n) const override final
virtual UPos lmax() const override final
virtual DType meta() const override final
virtual SizeT lex() const override final
virtual DType operator*() const override final
virtual String stringMeta() const override final
virtual Vector< SizeT > deepMax() const override final
XIndex & operator=(const XIndex &i)
virtual DXpr< None > ifor(const DXpr< None > &xpr, NoF &&f) const override final
virtual RangePtr prange(const XIndexPtr &last) const override final
virtual SizeT pos() const override final
virtual XIndex & reformat(const Vector< SizeT > &f, const Vector< SizeT > &s) override final
virtual SizeT dim() const override final
virtual XIndexPtr copy() const override final
virtual IndexId< 0 > id() const override final
virtual XIndex & operator+=(Int n) override final
virtual XIndexBase & at(const DType &meta) override final
virtual XIndex & operator--() override final
virtual XIndex & operator-=(Int n) override final
virtual RangePtr range() const override final
virtual bool formatIsTrivial() const override final
virtual Vector< SizeT > deepFormat() const override final
virtual XIndexPtr operator+(Int n) const override final
virtual XIndex & operator++() override final
Sptr< RangeBase > RangePtr
Sptr< XIndexBase > XIndexPtr
std::vector< T, Allocator< T > > Vector
decltype(auto) xpr(const Sptr< I > &i)
Sptr< Range > rangeCast(const RangePtr r)
XIndexPtr xindexPtr(const Sptr< Index > &i)
XIndexPtr xindexPtr< XIndexBase >(const Sptr< XIndexBase > &i)
Sptr< IndexInterface< I, MetaType > > IndexPtr
std::shared_ptr< T > Sptr
Vector< T > toVec(const Arr< T, N > &a)
XIndexBase and XIndex template declaration.