Add more assertations to Factor class.
SumOutFirstVariable and SumOutLastVariable will only are correctly defined if the variable is binary.
This commit is contained in:
parent
4ca17b9e9b
commit
c550139c8b
@ -149,6 +149,7 @@ Factor::print() const
|
||||
void
|
||||
Factor::sumOutFirstVariable()
|
||||
{
|
||||
assert (ranges_.size() == 2);
|
||||
size_t sep = params_.size() / 2;
|
||||
if (Globals::logDomain) {
|
||||
std::transform (
|
||||
@ -172,6 +173,7 @@ Factor::sumOutFirstVariable()
|
||||
void
|
||||
Factor::sumOutLastVariable()
|
||||
{
|
||||
assert (ranges_.size() == 2);
|
||||
Params::iterator first1 = params_.begin();
|
||||
Params::iterator first2 = params_.begin();
|
||||
Params::iterator last = params_.end();
|
||||
|
Reference in New Issue
Block a user