fix warnings
parent
19d64460ba
commit
00f109e88f
|
@ -45,8 +45,9 @@ namespace gtsam {
|
|||
|
||||
/* ************************************************************************* */
|
||||
bool DecisionTreeFactor::equals(const DiscreteFactor& other, double tol) const {
|
||||
if(!dynamic_cast<const DecisionTreeFactor*>(&other))
|
||||
if(!dynamic_cast<const DecisionTreeFactor*>(&other)) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
const DecisionTreeFactor& f(static_cast<const DecisionTreeFactor&>(other));
|
||||
return Potentials::equals(f, tol);
|
||||
|
|
|
@ -72,9 +72,15 @@ void DiscreteConditional::print(const std::string& s,
|
|||
}
|
||||
|
||||
/* ******************************************************************************** */
|
||||
bool DiscreteConditional::equals(const DiscreteConditional& other,
|
||||
bool DiscreteConditional::equals(const DiscreteFactor& other,
|
||||
double tol) const {
|
||||
return Potentials::equals(other, tol);
|
||||
if (!dynamic_cast<const DecisionTreeFactor*>(&other))
|
||||
return false;
|
||||
else {
|
||||
const DecisionTreeFactor& f(
|
||||
static_cast<const DecisionTreeFactor&>(other));
|
||||
return DecisionTreeFactor::equals(f, tol);
|
||||
}
|
||||
}
|
||||
|
||||
/* ******************************************************************************** */
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
const IndexFormatter& formatter = DefaultIndexFormatter) const;
|
||||
|
||||
/// GTSAM-style equals
|
||||
bool equals(const DiscreteConditional& other, double tol = 1e-9) const;
|
||||
bool equals(const DiscreteFactor& other, double tol = 1e-9) const;
|
||||
|
||||
/// @}
|
||||
/// @name Standard Interface
|
||||
|
|
Loading…
Reference in New Issue