fix equals
parent
623bd63ec8
commit
9f85d4cc2d
|
|
@ -130,12 +130,14 @@ void DiscreteTableConditional::print(const string& s,
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
bool DiscreteTableConditional::equals(const DiscreteFactor& other,
|
bool DiscreteTableConditional::equals(const DiscreteFactor& other,
|
||||||
double tol) const {
|
double tol) const {
|
||||||
if (!dynamic_cast<const DiscreteConditional*>(&other)) {
|
auto dtc = dynamic_cast<const DiscreteTableConditional*>(&other);
|
||||||
|
if (!dtc) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
const DiscreteConditional& f(
|
const DiscreteConditional& f(
|
||||||
static_cast<const DiscreteConditional&>(other));
|
static_cast<const DiscreteConditional&>(other));
|
||||||
return DiscreteConditional::equals(f, tol);
|
return table_.equals(dtc->table_, tol) &&
|
||||||
|
DiscreteConditional::equals(f, tol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue