multi_array: 'format constructor'
This commit is contained in:
parent
4a5a413a47
commit
2247336fee
2 changed files with 16 additions and 1 deletions
|
@ -73,6 +73,17 @@ namespace MultiArrayTools
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, class... SRanges>
|
||||||
|
template <class... Ranges>
|
||||||
|
MultiArray<T,SRanges...>::MultiArray(const std::shared_ptr<SRanges>&... ranges, MultiArray<T,Ranges...>&& in) :
|
||||||
|
MutableMultiArrayBase<T,SRanges...>(ranges...),
|
||||||
|
mCont( std::move( in.mCont ) )
|
||||||
|
{
|
||||||
|
// maybe some checks here in the future...
|
||||||
|
assert(mCont.size() == MAB::mRange->size());
|
||||||
|
MAB::mInit = true;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, class... SRanges>
|
template <typename T, class... SRanges>
|
||||||
MultiArray<T,SRanges...>::MultiArray(MultiArray<T,AnonymousRange>&& ama, SIZET<SRanges>... sizes) :
|
MultiArray<T,SRanges...>::MultiArray(MultiArray<T,AnonymousRange>&& ama, SIZET<SRanges>... sizes) :
|
||||||
MutableMultiArrayBase<T,SRanges...>
|
MutableMultiArrayBase<T,SRanges...>
|
||||||
|
|
|
@ -42,6 +42,10 @@ namespace MultiArrayTools
|
||||||
MultiArray(const std::shared_ptr<SRanges>&... ranges, const T& val);
|
MultiArray(const std::shared_ptr<SRanges>&... ranges, const T& val);
|
||||||
MultiArray(const std::shared_ptr<SRanges>&... ranges, const vector<T>& vec);
|
MultiArray(const std::shared_ptr<SRanges>&... ranges, const vector<T>& vec);
|
||||||
MultiArray(const std::shared_ptr<SRanges>&... ranges, vector<T>&& vec);
|
MultiArray(const std::shared_ptr<SRanges>&... ranges, vector<T>&& vec);
|
||||||
|
|
||||||
|
template <class... Ranges>
|
||||||
|
MultiArray(const std::shared_ptr<SRanges>&... ranges, MultiArray<T,Ranges...>&& in); // same effect as format
|
||||||
|
|
||||||
MultiArray(const typename CRange::Space& space);
|
MultiArray(const typename CRange::Space& space);
|
||||||
MultiArray(const typename CRange::Space& space, vector<T>&& vec);
|
MultiArray(const typename CRange::Space& space, vector<T>&& vec);
|
||||||
MultiArray(MultiArray<T,AnonymousRange>&& ama, SIZET<SRanges>... sizes);
|
MultiArray(MultiArray<T,AnonymousRange>&& ama, SIZET<SRanges>... sizes);
|
||||||
|
|
Loading…
Reference in a new issue