replace Util::add and Util::multiply by Util::apply_n_times
This commit is contained in:
@@ -275,7 +275,8 @@ BpSolver::calcFactorToVarMsg (SpLink* link)
|
||||
cout << " message from " << links[i]->varNode()->label();
|
||||
cout << ": " ;
|
||||
}
|
||||
Util::add (msgProduct, getVarToFactorMsg (links[i]), reps);
|
||||
Util::apply_n_times (msgProduct, getVarToFactorMsg (links[i]),
|
||||
reps, std::plus<double>());
|
||||
if (Constants::SHOW_BP_CALCS) {
|
||||
cout << endl;
|
||||
}
|
||||
@@ -289,7 +290,8 @@ BpSolver::calcFactorToVarMsg (SpLink* link)
|
||||
cout << " message from " << links[i]->varNode()->label();
|
||||
cout << ": " ;
|
||||
}
|
||||
Util::multiply (msgProduct, getVarToFactorMsg (links[i]), reps);
|
||||
Util::apply_n_times (msgProduct, getVarToFactorMsg (links[i]),
|
||||
reps, std::multiplies<double>());
|
||||
if (Constants::SHOW_BP_CALCS) {
|
||||
cout << endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user