support model counting in inc-exc nodes
This commit is contained in:
parent
8b77b93a3b
commit
864f764391
@ -44,6 +44,22 @@ SetAndNode::weight (void) const
|
||||
|
||||
|
||||
|
||||
double
|
||||
IncExcNode::weight (void) const
|
||||
{
|
||||
double w = 0.0;
|
||||
if (Globals::logDomain) {
|
||||
w = Util::logSum (plus1Branch_->weight(), plus2Branch_->weight());
|
||||
w = std::log (std::exp (w) - std::exp (minusBranch_->weight()));
|
||||
} else {
|
||||
w = plus1Branch_->weight() + plus2Branch_->weight();
|
||||
w -= minusBranch_->weight();
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
|
||||
|
||||
double
|
||||
LeafNode::weight (void) const
|
||||
{
|
||||
|
Reference in New Issue
Block a user