diff --git a/src/multi_array_operation.cc b/src/multi_array_operation.cc index fb9c25a..bf571f5 100644 --- a/src/multi_array_operation.cc +++ b/src/multi_array_operation.cc @@ -188,8 +188,8 @@ namespace MultiArrayTools MultiArrayContraction,MAOps...> MultiArrayOperationRoot::contract(const ContractOperation& cop, const std::string& indexName, - const typename Range2::IndexType& begin, - const typename Range2::IndexType& end, + size_t begin, + size_t end, const MAOps&... mao) const { //typename Range2::IndexType ind; @@ -465,8 +465,8 @@ namespace MultiArrayTools MultiArrayContraction,MAOps...> ConstMultiArrayOperationRoot::contract(const ContractOperation& cop, const std::string& indexName, - const typename Range2::IndexType& begin, - const typename Range2::IndexType& end, + size_t begin, + size_t end, const MAOps&... mao) const { typename Range2::IndexType* ind = dynamic_cast( mIndex.getLinked(indexName) ); @@ -767,13 +767,15 @@ namespace MultiArrayTools MultiArrayContraction:: MultiArrayContraction(const ContractOperation& cop, const typename Range::IndexType& runIndex, - const typename Range::IndexType& beginIndex, - const typename Range::IndexType& endIndex, + size_t begin, + size_t end, const MAOps&... mao) : MultiArrayOperation(cop, mao...), - mBeginIndex(beginIndex), mEndIndex(endIndex), + mBeginIndex(runIndex), mEndIndex(runIndex), mRunIndex(runIndex) { + mBeginIndex.setPos(begin); + mEndIndex.setPos(end); MAO::linkIndicesTo(&mRunIndex); } diff --git a/src/multi_array_operation.h b/src/multi_array_operation.h index 3cf184a..360fee9 100644 --- a/src/multi_array_operation.h +++ b/src/multi_array_operation.h @@ -82,8 +82,8 @@ namespace MultiArrayTools template MultiArrayContraction, MAOps...> contract(const ContractOperation& cop, const std::string& indexName, - const typename Range2::IndexType& begin, - const typename Range2::IndexType& end, + size_t begin, + size_t end, const MAOps&... mao) const; @@ -181,8 +181,8 @@ namespace MultiArrayTools template MultiArrayContraction, MAOps...> contract(const ContractOperation& cop, const std::string& indexName, - const typename Range2::IndexType& begin, - const typename Range2::IndexType& end, + size_t begin, + size_t end, const MAOps&... mao) const; template @@ -310,8 +310,8 @@ namespace MultiArrayTools MultiArrayContraction(const ContractOperation& cop, const typename Range::IndexType& runIndex, - const typename Range::IndexType& beginIndex, - const typename Range::IndexType& endIndex, + size_t begin, + size_t end, const MAOps&... mao); virtual const T& get() const override;