Go to the documentation of this file.
43 #define GTSAM_PRINT(x)((x).print(#x))
48 template <
typename T>
struct traits;
76 inline void print(
float v,
const std::string&
s =
"") {
77 std::cout << (
s.empty() ?
s :
s +
" ") <<
v << std::endl;
79 inline void print(
double v,
const std::string&
s =
"") {
80 std::cout << (
s.empty() ?
s :
s +
" ") <<
v << std::endl;
85 inline bool equal(
const T& obj1,
const T& obj2,
double tol) {
91 inline bool equal(
const T& obj1,
const T& obj2) {
102 printf(
"Not equal:\n");
112 struct equals :
public std::function<bool(const V&, const V&)> {
124 struct equals_star :
public std::function<bool(const std::shared_ptr<V>&, const std::shared_ptr<V>&)> {
128 if (!actual && !
expected)
return true;
176 #define GTSAM_CONCEPT_TESTABLE_INST(T) template class gtsam::IsTestable<T>;
177 #define GTSAM_CONCEPT_TESTABLE_TYPE(T) using _gtsam_Testable_##T = gtsam::IsTestable<T>;
bool operator()(const std::shared_ptr< V > &expected, const std::shared_ptr< V > &actual)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
BOOST_CONCEPT_USAGE(HasTestablePrereqs)
void print(const Matrix &A, const string &s, ostream &stream)
BOOST_CONCEPT_USAGE(IsTestable)
static bool Equals(const T &m1, const T &m2, double tol=1e-8)
bool operator()(const V &expected, const V &actual)
GTSAM_CONCEPT_ASSERT(HasTestablePrereqs< T >)
static void Print(const T &m, const std::string &str="")
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
Array< int, Dynamic, 1 > v
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
equals_star(double tol=1e-9)
Requirements on type to pass it to Testable template below.
bool equal(const T &obj1, const T &obj2, double tol)
gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:06:00