[opengm] 318/386: Intersection Based and 3-cycles
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:38:20 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 5368bf5861f1264c715dfc08c8f4be957324ae7c
Author: Constantin Pape <constantin.pape at iwr.uni-heidelberg.de>
Date: Fri Feb 5 16:53:40 2016 +0100
Intersection Based and 3-cycles
---
src/interfaces/python/opengm/inference/CMakeLists.txt | 4 ++--
src/interfaces/python/opengm/inference/inference.cpp | 12 +++++-------
.../python/opengm/inference/param/multicut_param.hxx | 8 ++++++--
.../python/opengm/inference/pyIntersectionBased.cxx | 2 +-
4 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/interfaces/python/opengm/inference/CMakeLists.txt b/src/interfaces/python/opengm/inference/CMakeLists.txt
index a872295..5878e6f 100644
--- a/src/interfaces/python/opengm/inference/CMakeLists.txt
+++ b/src/interfaces/python/opengm/inference/CMakeLists.txt
@@ -16,7 +16,7 @@ set(INF_TARGETS
inference.cpp
pyInference.cxx
#pyPbp.cxx
- pyCgc.cxx
+ #pyCgc.cxx
pyIcm.cxx
pyGraphcut.cxx
pyBp.cxx
@@ -49,7 +49,7 @@ set(INF_TARGETS
pyFusionMoves.cxx
pySelfFusion.cxx
pyFusionBased.cxx
- #pyIntersectionBased.cxx
+ pyIntersectionBased.cxx
)
diff --git a/src/interfaces/python/opengm/inference/inference.cpp b/src/interfaces/python/opengm/inference/inference.cpp
index c87ff5e..4741634 100644
--- a/src/interfaces/python/opengm/inference/inference.cpp
+++ b/src/interfaces/python/opengm/inference/inference.cpp
@@ -73,6 +73,8 @@
#if !defined(NOVIGRA) && (defined(WITH_QPBO) || (defined(WITH_BLOSSOM5) && defined(WITH_PLANARITY) ) )
#include "pyCgc.hxx"
#include "pyIntersectionBased.hxx"
+#else
+#error "something went wrong"
#endif
@@ -180,15 +182,11 @@ BOOST_PYTHON_MODULE_INIT(_inference) {
export_multicut<opengm::python::GmAdder,opengm::Minimizer>();
#endif
-
-
- #if !defined(NOVIGRA) && (defined(WITH_QPBO) || (defined(WITH_BLOSSOM5) && defined(WITH_PLANARITY) ) )
- export_cgc<opengm::python::GmAdder,opengm::Minimizer>();
- //export_intersection_based<opengm::python::GmAdder,opengm::Minimizer>();
+ #if defined(WITH_QPBO) || defined(WITH_CPLEX) || defined(WITH_BLOSSOM5) && defined(WITH_PLANARITY)
+ //export_cgc<opengm::python::GmAdder,opengm::Minimizer>();
+ export_intersection_based<opengm::python::GmAdder,opengm::Minimizer>();
#endif
-
-
//export_lp_inference<opengm::python::GmAdder,opengm::Minimizer>();
#ifdef WITH_LIBDAI
diff --git a/src/interfaces/python/opengm/inference/param/multicut_param.hxx b/src/interfaces/python/opengm/inference/param/multicut_param.hxx
index 891b472..4eb657c 100644
--- a/src/interfaces/python/opengm/inference/param/multicut_param.hxx
+++ b/src/interfaces/python/opengm/inference/param/multicut_param.hxx
@@ -30,7 +30,8 @@ public:
//const MWCRounding MWCRounding,
const size_t reductionMode,
const std::vector<bool>& allowCutsWithin,
- const std::string & workflow
+ const std::string & workflow,
+ const bool initializeWith3Cycles
){
p.numThreads_=numThreads;
p.verbose_=verbose;
@@ -43,6 +44,7 @@ public:
p.reductionMode_=reductionMode;
p.allowCutsWithin_.assign(allowCutsWithin.begin(), allowCutsWithin.end());
p.workFlow_=workflow;
+ p.initializeWith3Cycles_ = initializeWith3Cycles;
}
void static exportInfParam(const std::string & className){
@@ -60,6 +62,7 @@ public:
.def_readwrite("reductionMode", &Parameter::reductionMode_," reductionMode")
.def_readwrite("allowCutsWithin", &Parameter::allowCutsWithin_, "allow cuts within the given label class")
.def_readwrite("workflow", &Parameter::workFlow_," workflow")
+ .def_readwrite("initializeWith3Cycles", &Parameter::initializeWith3Cycles_," initializeWith3Cycles")
.def ("set", &SelfType::set,
(
boost::python::arg("numThreads") =0,
@@ -71,7 +74,8 @@ public:
boost::python::arg("edgeRoundingValue") =0.00000001,
boost::python::arg("reductionMode") =3,
boost::python::arg("allowCutsWithin") =std::vector<bool>(),
- boost::python::arg("workflow") =std::string("")
+ boost::python::arg("workflow") =std::string(""),
+ boost::python::arg("initializeWith3Cycles") =true
)
)
;
diff --git a/src/interfaces/python/opengm/inference/pyIntersectionBased.cxx b/src/interfaces/python/opengm/inference/pyIntersectionBased.cxx
index 6197def..496bc14 100644
--- a/src/interfaces/python/opengm/inference/pyIntersectionBased.cxx
+++ b/src/interfaces/python/opengm/inference/pyIntersectionBased.cxx
@@ -127,4 +127,4 @@ void export_intersection_based(){
}
template void export_intersection_based<opengm::python::GmAdder,opengm::Minimizer>();
-#endif
\ No newline at end of file
+#endif
--
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