fix toDecisionTreeFactor so the keys are ordered correctly
parent
293c29ebf8
commit
8fefbbf06a
|
|
@ -153,8 +153,7 @@ TableFactor::TableFactor(const DiscreteKeys& dkeys,
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
TableFactor::TableFactor(const DecisionTreeFactor& dtf)
|
TableFactor::TableFactor(const DecisionTreeFactor& dtf)
|
||||||
: TableFactor(dtf.discreteKeys(),
|
: TableFactor(dtf.discreteKeys(), dtf) {}
|
||||||
ComputeSparseTable(dtf.discreteKeys(), dtf)) {}
|
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
TableFactor::TableFactor(const DiscreteConditional& c)
|
TableFactor::TableFactor(const DiscreteConditional& c)
|
||||||
|
|
@ -278,7 +277,8 @@ DecisionTreeFactor TableFactor::toDecisionTreeFactor() const {
|
||||||
table.push_back(pair.second);
|
table.push_back(pair.second);
|
||||||
});
|
});
|
||||||
|
|
||||||
DecisionTreeFactor f(rdkeys, table);
|
AlgebraicDecisionTree<Key> tree(rdkeys, table);
|
||||||
|
DecisionTreeFactor f(dkeys, tree);
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue