move print() and iostream to .cpp file for SO<N>

release/4.3a0
Varun Agrawal 2020-03-17 15:20:54 -04:00
parent 3f8209de21
commit cf3e886d84
3 changed files with 11 additions and 4 deletions

View File

@ -20,6 +20,10 @@
#include <gtsam/base/Matrix.h>
#include <iostream>
using namespace std;
namespace gtsam {
// Implementation for N>5 just uses dynamic version
@ -109,4 +113,9 @@ typename SO<N>::VectorN2 SO<N>::vec(
return X;
}
template <int N>
void SO<N>::print(const std::string& s) const {
cout << s << matrix_ << endl;
}
} // namespace gtsam

View File

@ -13,6 +13,7 @@
* @file SOn.cpp
* @brief Definitions of dynamic specializations of SO(n)
* @author Frank Dellaert
* @author Varun Agrawal
* @date March 2019
*/

View File

@ -24,7 +24,6 @@
#include <Eigen/Core>
#include <iostream> // TODO(frank): how to avoid?
#include <random>
#include <string>
#include <type_traits>
@ -148,9 +147,7 @@ class SO : public LieGroup<SO<N>, internal::DimensionSO(N)> {
/// @name Testable
/// @{
void print(const std::string& s) const {
std::cout << s << matrix_ << std::endl;
}
void print(const std::string& s = std::string()) const;
bool equals(const SO& other, double tol) const {
return equal_with_abs_tol(matrix_, other.matrix_, tol);