From 68a43c51a089102e4e25ef6487c106db9b5196a5 Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@unibas.ch> Date: Mon, 18 May 2015 09:37:33 +0200 Subject: [PATCH] Make Get Min/Max Weight functions in substitution matrix const and export them to Python --- modules/seq/alg/pymod/wrap_seq_alg.cc | 2 ++ modules/seq/alg/src/subst_weight_matrix.hh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/seq/alg/pymod/wrap_seq_alg.cc b/modules/seq/alg/pymod/wrap_seq_alg.cc index 6597e459e..37d1609b7 100644 --- a/modules/seq/alg/pymod/wrap_seq_alg.cc +++ b/modules/seq/alg/pymod/wrap_seq_alg.cc @@ -61,6 +61,8 @@ BOOST_PYTHON_MODULE(_ost_seq_alg) class_<SubstWeightMatrix, SubstWeightMatrixPtr>("SubstWeightMatrix", init<>()) .def("GetWeight", &SubstWeightMatrix::GetWeight) .def("SetWeight", &SubstWeightMatrix::SetWeight) + .def("GetMinWeight", &SubstWeightMatrix::GetMinWeight) + .def("GetMaxWeight", &SubstWeightMatrix::GetMaxWeight) ; def("MergePairwiseAlignments", &MergePairwiseAlignments); diff --git a/modules/seq/alg/src/subst_weight_matrix.hh b/modules/seq/alg/src/subst_weight_matrix.hh index 6cede33bd..7ccabc68f 100644 --- a/modules/seq/alg/src/subst_weight_matrix.hh +++ b/modules/seq/alg/src/subst_weight_matrix.hh @@ -65,10 +65,10 @@ public: } /// \brief Get the minimal substitution weight of the matrix - WeightType GetMinWeight() { return min_weight_; } + WeightType GetMinWeight() const { return min_weight_; } /// \brief Get the maximal substitution weight of the matrix - WeightType GetMaxWeight() { return max_weight_; } + WeightType GetMaxWeight() const { return max_weight_; } /// \brief Set the substitution weight between two amino acids /// -- GitLab