Lkc: use utility function
This commit is contained in:
		@@ -54,10 +54,7 @@ SetOrNode::weight (void) const
 | 
				
			|||||||
double
 | 
					double
 | 
				
			||||||
SetAndNode::weight (void) const
 | 
					SetAndNode::weight (void) const
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  double w = follow_->weight();
 | 
					  return LogAware::pow (follow_->weight(), nrGroundings_);
 | 
				
			||||||
  return Globals::logDomain
 | 
					 | 
				
			||||||
      ? w * nrGroundings_
 | 
					 | 
				
			||||||
      : std::pow (w, nrGroundings_);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -111,9 +108,7 @@ LeafNode::weight (void) const
 | 
				
			|||||||
    nrGroundings *= std::pow (SetOrNode::nrNegatives(),
 | 
					    nrGroundings *= std::pow (SetOrNode::nrNegatives(),
 | 
				
			||||||
        clause_->nrNegCountedLogVars());
 | 
					        clause_->nrNegCountedLogVars());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return Globals::logDomain
 | 
					  return LogAware::pow (weight, nrGroundings);
 | 
				
			||||||
      ? weight * nrGroundings
 | 
					 | 
				
			||||||
      : std::pow (weight, nrGroundings);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user