fix decision tree equality and move default constructor to public
parent
a25e3f6d38
commit
94f21358f4
|
|
@ -79,7 +79,7 @@ namespace gtsam {
|
|||
bool equals(const Node& q, double tol) const override {
|
||||
const Leaf* other = dynamic_cast<const Leaf*> (&q);
|
||||
if (!other) return false;
|
||||
return std::abs(double(this->constant_ - other->constant_)) < tol;
|
||||
return this->constant_ == other->constant_;
|
||||
}
|
||||
|
||||
/** print */
|
||||
|
|
|
|||
|
|
@ -113,14 +113,14 @@ namespace gtsam {
|
|||
convert(const typename DecisionTree<M, X>::NodePtr& f, const std::map<M,
|
||||
L>& map, std::function<Y(const X&)> op);
|
||||
|
||||
/** Default constructor */
|
||||
DecisionTree();
|
||||
|
||||
public:
|
||||
|
||||
/// @name Standard Constructors
|
||||
/// @{
|
||||
|
||||
/** Default constructor (for serialization) */
|
||||
DecisionTree();
|
||||
|
||||
/** Create a constant */
|
||||
DecisionTree(const Y& y);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue