From 948d9f58fde5797cb786824679fbb2dadec69f1d Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Tue, 5 Mar 2019 19:40:26 +0100 Subject: [PATCH] meta op root in func ma op --- src/include/functional_multi_array.h | 11 +++++++++++ src/include/multi_array_operation.cc.h | 2 +- src/include/ranges/range_base.h | 4 ---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/include/functional_multi_array.h b/src/include/functional_multi_array.h index 2e10629..bcd16a4 100644 --- a/src/include/functional_multi_array.h +++ b/src/include/functional_multi_array.h @@ -15,6 +15,7 @@ namespace MultiArrayTools static auto mk(const std::shared_ptr& i) -> MultiArray { + assert(0); // deprecated vector vv(i->range()->size()); for(Index j = (*i); j.pos() != j.max(); ++j){ vv[j.pos()] = j.meta(); @@ -55,6 +56,16 @@ namespace MultiArrayTools } }; + template <> + struct ToOpObject + { + template + static auto mk(const std::shared_ptr& ind) + -> MetaOperationRoot + { + return MetaOperationRoot( ind ); + } + }; template auto mkOpObject(const std::shared_ptr& i) diff --git a/src/include/multi_array_operation.cc.h b/src/include/multi_array_operation.cc.h index 90d3e30..283af2b 100644 --- a/src/include/multi_array_operation.cc.h +++ b/src/include/multi_array_operation.cc.h @@ -345,7 +345,7 @@ namespace MultiArrayTools template MetaOperationRoot:: MetaOperationRoot(const std::shared_ptr& ind) : - mWorkIndex(*ind), mIndex( ind ) { } + mWorkIndex(*ind), mIndex( ind ) {} template diff --git a/src/include/ranges/range_base.h b/src/include/ranges/range_base.h index 846070e..5e7e05d 100644 --- a/src/include/ranges/range_base.h +++ b/src/include/ranges/range_base.h @@ -87,10 +87,6 @@ namespace MultiArrayTools virtual DataHeader dataHeader() const = 0; virtual std::shared_ptr sub(size_t num) const { return std::shared_ptr(); } - //virtual bool regular() const = 0; // integer distance (e.g. 2,3,4,...) - //virtual bool linear() const = 0; // 1dim valuable (e.g. 2.45, 3.12, 3.56,...) - //virtual bool multi() const = 0; // mdim - //virtual bool maplike() const = 0; // meta type is ~ MultiArray friend RangeFactoryBase;