Added default tolerance value to equals in Key classes so that equals() works properly
parent
fa6a515bfd
commit
b5ca322d21
|
@ -57,7 +57,7 @@ namespace gtsam {
|
||||||
virtual void print(const std::string& s) const {
|
virtual void print(const std::string& s) const {
|
||||||
std::cout << s << ": " << (std::string)(*this) << std::endl;
|
std::cout << s << ": " << (std::string)(*this) << std::endl;
|
||||||
}
|
}
|
||||||
bool equals(const TypedSymbol& expected, double tol) const { return (*this)==expected; }
|
bool equals(const TypedSymbol& expected, double tol=0.0) const { return (*this)==expected; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ namespace gtsam {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Testable Requirements
|
// Testable Requirements
|
||||||
bool equals(const TypedLabeledSymbol& expected, double tol) const
|
bool equals(const TypedLabeledSymbol& expected, double tol=0.0) const
|
||||||
{ return (*this)==expected; }
|
{ return (*this)==expected; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -193,7 +193,7 @@ namespace gtsam {
|
||||||
void print(const std::string& s) const {
|
void print(const std::string& s) const {
|
||||||
std::cout << s << ": " << (std::string)(*this) << std::endl;
|
std::cout << s << ": " << (std::string)(*this) << std::endl;
|
||||||
}
|
}
|
||||||
bool equals(const Symbol& expected, double tol) const { return (*this)==expected; }
|
bool equals(const Symbol& expected, double tol=0.0) const { return (*this)==expected; }
|
||||||
|
|
||||||
/** Retrieve key character */
|
/** Retrieve key character */
|
||||||
unsigned char chr() const { return c_; }
|
unsigned char chr() const { return c_; }
|
||||||
|
|
Loading…
Reference in New Issue