[opengm] 370/386: some python fixes

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Aug 31 08:38:36 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 bd965a084f9705876a81d2ddd2b58248ca9db6ba
Author: Joerg Kappes <kappes at math.uni-heidelberg.de>
Date:   Wed Jul 27 23:33:15 2016 +0200

    some python fixes
---
 src/interfaces/python/opengm/inference/CMakeLists.txt      | 10 +++++-----
 src/interfaces/python/opengm/inference/inf_def_visitor.hxx |  1 +
 src/interfaces/python/opengm/inference/inference.cpp       |  4 +++-
 src/interfaces/python/opengm/inference/pyFusionMoves.cxx   |  4 ++--
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/interfaces/python/opengm/inference/CMakeLists.txt b/src/interfaces/python/opengm/inference/CMakeLists.txt
index 5878e6f..e052428 100644
--- a/src/interfaces/python/opengm/inference/CMakeLists.txt
+++ b/src/interfaces/python/opengm/inference/CMakeLists.txt
@@ -49,7 +49,7 @@ set(INF_TARGETS
     pyFusionMoves.cxx
     pySelfFusion.cxx
     pyFusionBased.cxx
-    pyIntersectionBased.cxx
+    #pyIntersectionBased.cxx
 )
 
 
@@ -82,7 +82,7 @@ if(LINK_RT)
     find_library(RT rt)
     target_link_libraries(_inference ${Boost_PYTHON_LIBRARIES} rt)
 else()
-    target_link_libraries(_inference ${Boost_PYTHON_LIBRARIES})
+    target_link_libraries(_inference ${PYTHON_LIBRARY} ${Boost_PYTHON_LIBRARIES})
 endif(LINK_RT)
 
 set_target_properties(_inference PROPERTIES PREFIX "")
@@ -90,7 +90,7 @@ set_target_properties(_inference PROPERTIES PREFIX "")
 if(WITH_LIBDAI)
   target_link_libraries(_inference ${LIBDAI_LIBRARY})
   target_link_libraries(_inference ${GMPXX_LIBRARY})
-  target_link_libraries(_inference ${GMP_LIBRARY}) 
+  target_link_libraries(_inference ${GMP_LIBRARY})
 endif()
 
 if(WITH_QPBO)
@@ -138,9 +138,9 @@ endif()
 
 
 if(WITH_GUROBI)
-  target_link_libraries(_inference ${CMAKE_THREAD_LIBS_INIT} 
+  target_link_libraries(_inference ${CMAKE_THREAD_LIBS_INIT}
     ${GUROBI_LIBRARIES}
-    #${GUOBI_CXX_LIBRARY}  
+    #${GUOBI_CXX_LIBRARY}
     #${GUROBI_LIBRARY}
     ${CMAKE_THREAD_LIBS_INIT}
     #${GUROBI_LIBRARIES}
diff --git a/src/interfaces/python/opengm/inference/inf_def_visitor.hxx b/src/interfaces/python/opengm/inference/inf_def_visitor.hxx
index dd2b051..87cb5e0 100644
--- a/src/interfaces/python/opengm/inference/inf_def_visitor.hxx
+++ b/src/interfaces/python/opengm/inference/inf_def_visitor.hxx
@@ -141,6 +141,7 @@ public:
     template <class classT>
     void visit(classT& c) const{
         std::string className = std::string("_")+algName_;
+
         for(size_t hp=0;hp<infSetup_.hyperParameters.size();++hp){
             className+=std::string("_");
             className+=infSetup_.hyperParameters[hp];
diff --git a/src/interfaces/python/opengm/inference/inference.cpp b/src/interfaces/python/opengm/inference/inference.cpp
index 425bcd3..291aec2 100644
--- a/src/interfaces/python/opengm/inference/inference.cpp
+++ b/src/interfaces/python/opengm/inference/inference.cpp
@@ -72,6 +72,8 @@
 
 #if (defined(WITH_VIGRA) && defined(WITH_QPBO) ) || (defined(WITH_BLOSSOM5) && defined(WITH_PLANARITY) ) 
 #include "pyCgc.hxx"
+#endif
+#if defined(WITH_QPBO) || defined(WITH_CPLEX) || defined(WITH_BLOSSOM5) && defined(WITH_PLANARITY)
 #include "pyIntersectionBased.hxx"
 #endif
 
@@ -182,7 +184,7 @@ BOOST_PYTHON_MODULE_INIT(_inference) {
 
         #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>();
+       	//export_intersection_based<opengm::python::GmAdder,opengm::Minimizer>();
         #endif
 
          //export_lp_inference<opengm::python::GmAdder,opengm::Minimizer>();
diff --git a/src/interfaces/python/opengm/inference/pyFusionMoves.cxx b/src/interfaces/python/opengm/inference/pyFusionMoves.cxx
index e7debfe..b8ec9c1 100644
--- a/src/interfaces/python/opengm/inference/pyFusionMoves.cxx
+++ b/src/interfaces/python/opengm/inference/pyFusionMoves.cxx
@@ -123,10 +123,10 @@ private:
 			#endif 
 		}
 		else if(fusionSolver==std::string("lf2")){
-			return  fusionMover_. template fuse<LazyFlipperSubInf> (typename LazyFlipperSubInf::Parameter(2),true);
+			return  fusionMover_. template fuse<LazyFlipperSubInf> (typename LazyFlipperSubInf::Parameter(size_t(2)),true);
 		}
 		else if(fusionSolver==std::string("lf3")){
-			return  fusionMover_. template fuse<LazyFlipperSubInf> (typename LazyFlipperSubInf::Parameter(3),true);
+			return  fusionMover_. template fuse<LazyFlipperSubInf> (typename LazyFlipperSubInf::Parameter(size_t(3)),true);
 		}
 
         throw opengm::RuntimeError("unknown fusion solver");

-- 
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