From ccc0e11049509099928630e50c82973a1aa70547 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Sun, 8 Sep 2019 00:47:30 -0400 Subject: [PATCH 1/3] Minor compatibility fixes. --- include/ensmallen_bits/sdp/lrsdp_function.hpp | 5 +++-- include/ensmallen_bits/sdp/sdp.hpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/ensmallen_bits/sdp/lrsdp_function.hpp b/include/ensmallen_bits/sdp/lrsdp_function.hpp index 79a87dd86..edc6d8ed3 100644 --- a/include/ensmallen_bits/sdp/lrsdp_function.hpp +++ b/include/ensmallen_bits/sdp/lrsdp_function.hpp @@ -94,9 +94,10 @@ class LRSDPFunction //! Get the initial point of the LRSDP. template - const MatType& GetInitialPoint() const + MatType GetInitialPoint() const { - return arma::conv_to::from(initialPoint); + MatType result = arma::conv_to::from(initialPoint); + return result; } //! Return the SDP object representing the problem. diff --git a/include/ensmallen_bits/sdp/sdp.hpp b/include/ensmallen_bits/sdp/sdp.hpp index b209e9551..f12b2524e 100644 --- a/include/ensmallen_bits/sdp/sdp.hpp +++ b/include/ensmallen_bits/sdp/sdp.hpp @@ -133,11 +133,11 @@ class SDP bool HasLinearlyIndependentConstraints() const; //! Get an initial point for the primal coordinates. - template + template MatType GetInitialPoint() const; //! Get initial points for the primal and dual coordinates. - template + template void GetInitialPoints(MatType& coordinates, MatType& ySparse, MatType& yDense, From 4b0bf471551e3c005036bd157a7ad1fee11b45d6 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Sun, 8 Sep 2019 01:37:23 -0400 Subject: [PATCH 2/3] Set default type. --- include/ensmallen_bits/sdp/lrsdp_function.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ensmallen_bits/sdp/lrsdp_function.hpp b/include/ensmallen_bits/sdp/lrsdp_function.hpp index edc6d8ed3..d17eed2c7 100644 --- a/include/ensmallen_bits/sdp/lrsdp_function.hpp +++ b/include/ensmallen_bits/sdp/lrsdp_function.hpp @@ -93,7 +93,7 @@ class LRSDPFunction size_t NumConstraints() const { return sdp.NumConstraints(); } //! Get the initial point of the LRSDP. - template + template MatType GetInitialPoint() const { MatType result = arma::conv_to::from(initialPoint); From 0e542f6d007a0f3a2911c1c2fd921b0b6b4bf04f Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Sun, 8 Sep 2019 02:09:45 -0400 Subject: [PATCH 3/3] Oops, forgot to include this fix. --- include/ensmallen_bits/function/arma_traits.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ensmallen_bits/function/arma_traits.hpp b/include/ensmallen_bits/function/arma_traits.hpp index 69ebcb168..d2e1b0883 100644 --- a/include/ensmallen_bits/function/arma_traits.hpp +++ b/include/ensmallen_bits/function/arma_traits.hpp @@ -30,7 +30,7 @@ struct MatTypeTraits> template struct MatTypeTraits> { - typedef arma::Row BaseMatType; + typedef arma::Mat BaseMatType; }; template