From d2d038fd5b9c4b4d1cdaaac31c6da98e2c137811 Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Sun, 26 Feb 2017 14:00:47 +0100 Subject: [PATCH] bug fixed --- src/multi_array_operation.cc | 6 +++--- src/multi_array_operation.h | 4 ++-- src/unit_test.cc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/multi_array_operation.cc b/src/multi_array_operation.cc index 05b4fd1..10615a5 100644 --- a/src/multi_array_operation.cc +++ b/src/multi_array_operation.cc @@ -1,3 +1,4 @@ +// -*- C++ -*- #include "multi_array_operation.h" @@ -245,7 +246,7 @@ namespace MultiArrayTools template template MultiArrayOperation,MAOps2...> - MultiArrayOperation::operator()(Operation2& op, const MAOps&... secs) + MultiArrayOperation::operator()(Operation2& op, const MAOps2&... secs) { return MultiArrayOperation, MAOps2...>(op, *this, secs...); @@ -254,7 +255,7 @@ namespace MultiArrayTools template template MultiArrayOperation,MAOps2...> - MultiArrayOperation::operator()(const Operation2& op, const MAOps&... secs) + MultiArrayOperation::operator()(const Operation2& op, const MAOps2&... secs) { return MultiArrayOperation, MAOps2...>(op, *this, secs...); @@ -301,7 +302,6 @@ namespace MultiArrayTools template void MultiArrayOperation::linkIndicesTo(IndefinitIndexBase* target) const { - MAOB::mIibPtr->linkTo(target); TupleIndicesLinker::linkTupleIndicesTo(mArgs, target); } diff --git a/src/multi_array_operation.h b/src/multi_array_operation.h index 3a6a972..e77b6b1 100644 --- a/src/multi_array_operation.h +++ b/src/multi_array_operation.h @@ -102,11 +102,11 @@ namespace MultiArrayTools template MultiArrayOperation,MAOps2...> - operator()(Operation2& op, const MAOps&... secs); + operator()(Operation2& op, const MAOps2&... secs); template MultiArrayOperation,MAOps2...> - operator()(const Operation2& op, const MAOps&... secs); + operator()(const Operation2& op, const MAOps2&... secs); template auto operator+(const MAOp2& sec) -> decltype(operator()(std::plus(), sec)); diff --git a/src/unit_test.cc b/src/unit_test.cc index 7dcd559..e3a67e2 100644 --- a/src/unit_test.cc +++ b/src/unit_test.cc @@ -297,7 +297,7 @@ namespace { auto i3 = i.template getIndex<2>(); //ma2("alpha","beta") = ma("alpha","beta") + ma1d("alpha"); - ma3d2("alpha","beta","gamma") = ma3d("alpha","beta","gamma") + ( ma("alpha","beta") + ma1d("alpha") ); + ma3d2("alpha","beta","gamma") = ma3d("alpha","beta","gamma") + ma("alpha","beta") + ma1d("alpha"); EXPECT_EQ(ma3d2[i(i1 = 0, i2 = 0, i3 = 0)], -15); EXPECT_EQ(ma3d2[i(i1 = 0, i2 = 0, i3 = 1)], -4);