[opengm] 49/50: add missing guards for CGC

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun Nov 1 17:14:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository opengm.

commit 50e7ef63c36f768c773ed432bcbd126ca0f49c71
Author: joergkappes <kappes at math.uni-heidelberg.de>
Date:   Wed Oct 28 17:12:21 2015 +0100

    add missing guards for CGC
---
 include/opengm/inference/cgc/submodel2.hxx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/opengm/inference/cgc/submodel2.hxx b/include/opengm/inference/cgc/submodel2.hxx
index a6833f3..e5345fd 100644
--- a/include/opengm/inference/cgc/submodel2.hxx
+++ b/include/opengm/inference/cgc/submodel2.hxx
@@ -809,7 +809,8 @@ typename SubmodelCGC<GM>::ValueType SubmodelCGC<GM>::inferQPBOI(
 template<class GM>
 typename SubmodelCGC<GM>::ValueType SubmodelCGC<GM>::inferPlanarMaxCut(
 
-){  
+){
+#if defined(WITH_BLOSSOM5) && defined(WITH_PLANARITY)  
     opengm::external::PlanarMaxCut solver(numSubVar_, numSubFactors_);
     for(size_t i=0; i<numSubFactors_; ++i){
         solver.addEdge(localFactorVis_(i,0),localFactorVis_(i,1), -1.0*localLambdas_[i]);
@@ -826,6 +827,10 @@ typename SubmodelCGC<GM>::ValueType SubmodelCGC<GM>::inferPlanarMaxCut(
             value+=localLambdas_[i];
     }
     return value;
+#else
+   throw opengm::RuntimeError("inferPlanarMaxCut needs WITH_BLOSSOM5 and WITH_PLANARITY");
+   return 0.0;
+#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