15 static int const buflen(32);
16 static char buf[buflen];
17 memset(buf, 0,
sizeof(buf));
18 snprintf(buf, buflen - 1,
"% 6.6f ", vv);
25 std::string
const &prefix =
"",
bool vecmode =
false,
27 char const *nlornot(
"\n");
32 os << title << nlornot;
34 if ((mm.rows() <= 0) || (mm.cols() <= 0)) {
35 os << prefix <<
" (empty)" << nlornot;
38 if (!prefix.empty()) os << prefix;
39 for (
int ir(0); ir < mm.rows(); ++ir) {
45 for (
int ir(0); ir < mm.rows(); ++ir) {
46 if (!prefix.empty()) os << prefix;
47 for (
int ic(0); ic < mm.cols(); ++ic) {
58 std::string
const &prefix =
"",
bool nonl =
false) {
64 std::string
const &prefix =
"",
bool nonl =
false) {
70 std::string
const &title, std::string
const &prefix =
"",
77 std::string
const &prefix =
"",
bool nonl =
false) {
83 std::string
const &prefix =
"",
bool nonl =
false) {
89 std::string
const &prefix =
"",
bool nonl =
false) {
95 std::string
const &prefix =
"",
bool nonl =
false) {
101 std::string
const &prefix =
"",
bool nonl =
false) {
105 template <
typename T>
107 printf(
"%s: ", title);
108 for (
size_t i(0); i < _vec.size(); ++i) {
109 printf(
"% 6.4f, \t", _vec[i]);
114 template <
typename T>
116 printf(
"%s: ", title);
117 for (
size_t i(0); i < size; ++i) {
118 printf(
"% 6.4f, \t", _vec[i]);
typename Eigen::Matrix< T, 6, 6 > Mat6
typename Eigen::Matrix< T, 3, 3 > Mat3
typename Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > DMat
typename Eigen::Matrix< T, 4, 1 > Quat
void fprintf_color(PrintColor color, FILE *stream, const char *fmt,...)
typename Eigen::Matrix< T, 3, 1 > Vec3
typename Eigen::Matrix< T, 3, Eigen::Dynamic > D3Mat
typename Eigen::Matrix< T, 6, 1 > SVec
void pretty_print(DMat< T > const &mm, std::ostream &os, std::string const &title, std::string const &prefix="", bool vecmode=false, bool nonl=false)
typename Eigen::Matrix< T, 2, 1 > Vec2
std::string pretty_string(T vv)
void printf_color(PrintColor color, const char *fmt,...)
typename Eigen::Matrix< T, Eigen::Dynamic, 1 > DVec