From f5d86d5f9540f7d3c0de3418fd128a67c4986534 Mon Sep 17 00:00:00 2001 From: Thomas Purcell <purcell@fhi-berlin.mpg.de> Date: Tue, 9 Jun 2020 13:15:56 +0200 Subject: [PATCH] Minor bug fixes a typo and test_value_ptr()/set_test_value() only redirects if _selected is false for feature node --- src/descriptor_identifier/Model/Model.cpp | 2 +- src/feature_creation/node/FeatureNode.hpp | 2 +- src/utils/mkl_interface.hpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/descriptor_identifier/Model/Model.cpp b/src/descriptor_identifier/Model/Model.cpp index 95cbb455..b83ede88 100644 --- a/src/descriptor_identifier/Model/Model.cpp +++ b/src/descriptor_identifier/Model/Model.cpp @@ -25,7 +25,7 @@ Model::Model(std::vector<double> prop_train, std::vector<double> prop_test, std: std::copy_n(feats[ff]->value_ptr(), _n_samp_train, a.data() + ff * _n_samp_train); if(_n_samp_test > 0) - std::copy_n(feats[ff]->test_value_ptr(), _n_samp_test, _D_test.data() + ff * _n_samp_test); + std::copy_n(feats[ff]->test_value().data(), _n_samp_test, _D_test.data() + ff * _n_samp_test); } std::copy_n(a.data() + feats.size() * _n_samp_train, _n_samp_train, _D_train.data() + feats.size() * _n_samp_train); diff --git a/src/feature_creation/node/FeatureNode.hpp b/src/feature_creation/node/FeatureNode.hpp index 20562e86..284cb926 100644 --- a/src/feature_creation/node/FeatureNode.hpp +++ b/src/feature_creation/node/FeatureNode.hpp @@ -87,7 +87,7 @@ public: /** * @brief Set the test value for the feature */ - inline void set_test_value(int offset = -1){std::copy_n(_test_value.data(), _n_test_samp, test_value_ptr());} + inline void set_test_value(int offset = -1){if(!_selected) std::copy_n(_test_value.data(), _n_test_samp, test_value_ptr());} /** * @brief Check if the feature contains NaN diff --git a/src/utils/mkl_interface.hpp b/src/utils/mkl_interface.hpp index c2ca71ea..edb228de 100644 --- a/src/utils/mkl_interface.hpp +++ b/src/utils/mkl_interface.hpp @@ -107,8 +107,8 @@ namespace * @brief Wrapper for dgemv_: c<-$\alpha A*x + /beta*y * * @param[in] trans 'T' or 't' for Transpose, 'C' or c' for Hermitian Conjugate, 'N' or 'n' for neither on Matrix B - * @param[in] m Specifies the number of rows of the matrix op(A) and of the matrix C. The value of m must be at least zero. - * @param[in] n Specifies the number of columns of the matrix op(A) and the number of rows of the matrix op(B). + * @param[in] m Specifies the number of rows of the matrix op(A) + * @param[in] n Specifies the number of columns of the matrix op(A) * @param[in] alpha Specifies the scalar alpha. * @param[in] a Array size lda by ka, where ka is k when transa = 'N' or 'n', and is m otherwise. Before entry with transa = 'N' or 'n', the leading m-by-k part of the array a must contain the matrix A, otherwise the leading k-by-m part of the array a must contain the matrix A. * @param[in] lda specifies the leading dimension of a as declared in the calling (sub)program. -- GitLab