remove printing
parent
8cb33dd4f8
commit
94d737e1db
|
@ -204,18 +204,12 @@ namespace gtsam {
|
||||||
std::pair<DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr> //
|
std::pair<DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr> //
|
||||||
EliminateDiscrete(const DiscreteFactorGraph& factors,
|
EliminateDiscrete(const DiscreteFactorGraph& factors,
|
||||||
const Ordering& frontalKeys) {
|
const Ordering& frontalKeys) {
|
||||||
factors.print("The Factors to eliminate:");
|
|
||||||
// PRODUCT: multiply all factors
|
// PRODUCT: multiply all factors
|
||||||
gttic(product);
|
gttic(product);
|
||||||
DecisionTreeFactor product;
|
DecisionTreeFactor product;
|
||||||
for (auto&& factor : factors) product = (*factor) * product;
|
for (auto&& factor : factors) product = (*factor) * product;
|
||||||
gttoc(product);
|
gttoc(product);
|
||||||
|
|
||||||
std::cout << "\n\n==========" << std::endl;
|
|
||||||
std::cout << "Product" << std::endl;
|
|
||||||
std::cout << std::endl;
|
|
||||||
product.print();
|
|
||||||
|
|
||||||
// Max over all the potentials by pretending all keys are frontal:
|
// Max over all the potentials by pretending all keys are frontal:
|
||||||
auto normalization = product.max(product.size());
|
auto normalization = product.max(product.size());
|
||||||
|
|
||||||
|
@ -227,10 +221,6 @@ namespace gtsam {
|
||||||
DecisionTreeFactor::shared_ptr sum = product.sum(frontalKeys);
|
DecisionTreeFactor::shared_ptr sum = product.sum(frontalKeys);
|
||||||
gttoc(sum);
|
gttoc(sum);
|
||||||
|
|
||||||
std::cout << "\n->Sum" << std::endl;
|
|
||||||
sum->print();
|
|
||||||
std::cout << "----------------------" << std::endl;
|
|
||||||
|
|
||||||
// Ordering keys for the conditional so that frontalKeys are really in front
|
// Ordering keys for the conditional so that frontalKeys are really in front
|
||||||
Ordering orderedKeys;
|
Ordering orderedKeys;
|
||||||
orderedKeys.insert(orderedKeys.end(), frontalKeys.begin(),
|
orderedKeys.insert(orderedKeys.end(), frontalKeys.begin(),
|
||||||
|
|
Loading…
Reference in New Issue