move print() and iostream to .cpp file for SO<N>
parent
3f8209de21
commit
cf3e886d84
|
|
@ -20,6 +20,10 @@
|
||||||
|
|
||||||
#include <gtsam/base/Matrix.h>
|
#include <gtsam/base/Matrix.h>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
// Implementation for N>5 just uses dynamic version
|
// Implementation for N>5 just uses dynamic version
|
||||||
|
|
@ -109,4 +113,9 @@ typename SO<N>::VectorN2 SO<N>::vec(
|
||||||
return X;
|
return X;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <int N>
|
||||||
|
void SO<N>::print(const std::string& s) const {
|
||||||
|
cout << s << matrix_ << endl;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace gtsam
|
} // namespace gtsam
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
* @file SOn.cpp
|
* @file SOn.cpp
|
||||||
* @brief Definitions of dynamic specializations of SO(n)
|
* @brief Definitions of dynamic specializations of SO(n)
|
||||||
* @author Frank Dellaert
|
* @author Frank Dellaert
|
||||||
|
* @author Varun Agrawal
|
||||||
* @date March 2019
|
* @date March 2019
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include <Eigen/Core>
|
#include <Eigen/Core>
|
||||||
|
|
||||||
#include <iostream> // TODO(frank): how to avoid?
|
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
@ -148,9 +147,7 @@ class SO : public LieGroup<SO<N>, internal::DimensionSO(N)> {
|
||||||
/// @name Testable
|
/// @name Testable
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
void print(const std::string& s) const {
|
void print(const std::string& s = std::string()) const;
|
||||||
std::cout << s << matrix_ << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool equals(const SO& other, double tol) const {
|
bool equals(const SO& other, double tol) const {
|
||||||
return equal_with_abs_tol(matrix_, other.matrix_, tol);
|
return equal_with_abs_tol(matrix_, other.matrix_, tol);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue