[opengm] 186/386: fixed python wrapping, with @Steffen-Wolf
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:37:37 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository opengm.
commit d590ae710fdcb39393f50d4c2d9bec5cf18cf6b1
Author: mschiegg <martin.schiegg at iwr.uni-heidelberg.de>
Date: Fri Dec 19 18:43:20 2014 +0100
fixed python wrapping, with @Steffen-Wolf
---
src/interfaces/python/opengm/learning/helper.hxx | 4 ++--
src/interfaces/python/opengm/learning/pyDataset.cxx | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/interfaces/python/opengm/learning/helper.hxx b/src/interfaces/python/opengm/learning/helper.hxx
index 7a2735f..b981ddb 100644
--- a/src/interfaces/python/opengm/learning/helper.hxx
+++ b/src/interfaces/python/opengm/learning/helper.hxx
@@ -94,13 +94,13 @@ public:
}
template<class INF>
- typename DS::ValueType pyGetLossWithInf(DS & ds, const typename INF::Parameter & param, const size_t i)
+ static typename DS::ValueType pyGetLossWithInf(DS & ds, const typename INF::Parameter & param, const size_t i)
{
return ds. template getLoss<INF>(param, i);
}
template<class INF>
- typename DS::ValueType pyGetTotalLossWithInf(DS & ds, const typename INF::Parameter & param)
+ static typename DS::ValueType pyGetTotalLossWithInf(DS & ds, const typename INF::Parameter & param)
{
return ds. template getTotalLoss<INF>(param);
}
diff --git a/src/interfaces/python/opengm/learning/pyDataset.cxx b/src/interfaces/python/opengm/learning/pyDataset.cxx
index b23bb71..a89f263 100644
--- a/src/interfaces/python/opengm/learning/pyDataset.cxx
+++ b/src/interfaces/python/opengm/learning/pyDataset.cxx
@@ -11,6 +11,8 @@
#include <opengm/python/numpyview.hxx>
#include <opengm/python/opengmpython.hxx>
#include <opengm/python/converter.hxx>
+
+#define DefaultErrorFn DefaultErrorFn_TrwsExternal_DS
#include "helper.hxx"
using namespace boost::python;
@@ -88,7 +90,7 @@ void export_dataset(const std::string& className){
.def("setWeights", &PyDataset::setWeights)
.def("save", &pySaveDataset<GM, LOSS>)
.def("load", &pyLoadDataset<GM, LOSS>)
-// .def(DatasetInferenceSuite<PyDataset>()) //FIXME
+ .def(DatasetInferenceSuite<PyDataset>())
;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opengm.git
More information about the debian-science-commits
mailing list