From 11e688ffd766507e034294a88acc33df98bc0fbf Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Wed, 12 Dec 2012 21:19:22 +0000 Subject: [PATCH] Lkc: use utility function --- packages/CLPBN/horus/LiftedCircuit.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/CLPBN/horus/LiftedCircuit.cpp b/packages/CLPBN/horus/LiftedCircuit.cpp index 5dd1bca2c..029ea7fea 100644 --- a/packages/CLPBN/horus/LiftedCircuit.cpp +++ b/packages/CLPBN/horus/LiftedCircuit.cpp @@ -54,10 +54,7 @@ SetOrNode::weight (void) const double SetAndNode::weight (void) const { - double w = follow_->weight(); - return Globals::logDomain - ? w * nrGroundings_ - : std::pow (w, nrGroundings_); + return LogAware::pow (follow_->weight(), nrGroundings_); } @@ -111,9 +108,7 @@ LeafNode::weight (void) const nrGroundings *= std::pow (SetOrNode::nrNegatives(), clause_->nrNegCountedLogVars()); } - return Globals::logDomain - ? weight * nrGroundings - : std::pow (weight, nrGroundings); + return LogAware::pow (weight, nrGroundings); }