Move BpLink to inside of BeliefProp
This commit is contained in:
@@ -8,6 +8,16 @@
|
||||
|
||||
namespace Horus {
|
||||
|
||||
WeightedBp::WeightedBp (
|
||||
const FactorGraph& fg,
|
||||
const std::vector<std::vector<unsigned>>& weights)
|
||||
: BeliefProp (fg), weights_(weights)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
WeightedBp::~WeightedBp (void)
|
||||
{
|
||||
for (size_t i = 0; i < links_.size(); i++) {
|
||||
@@ -53,6 +63,19 @@ WeightedBp::getPosterioriOf (VarId vid)
|
||||
|
||||
|
||||
|
||||
WeightedBp::WeightedLink::WeightedLink (
|
||||
FacNode* fn,
|
||||
VarNode* vn,
|
||||
size_t idx,
|
||||
unsigned weight)
|
||||
: BpLink (fn, vn), index_(idx), weight_(weight),
|
||||
pwdMsg_(vn->range(), LogAware::one())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
WeightedBp::createLinks (void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user