1#ifndef BITSIM_UTILS_IO_PRINT_UTILS_H
2#define BITSIM_UTILS_IO_PRINT_UTILS_H
12#include "bitsim/bitsim_config.h"
19#include <chrono/core/ChFrame.h>
20#include <chrono/core/ChMatrix33.h>
21#include <chrono/core/ChVector3.h>
39void print_title(
const std::string &title, std::ostream &out);
50void print_flag(
const std::string &label,
bool value,
int width = 26);
60void print_value(
const std::string &label,
real_t value,
const std::string &unit,
int precision = 3,
68std::string
to_string(
const chrono::ChVector3d &v);
73void print_vector(
const std::string &label,
const chrono::ChVector3d &v,
int width = 26);
78void print_matrix(
const std::string &label,
const chrono::ChMatrix33d &R);
84void print_frame(
const std::string &label,
const chrono::ChFrame<> &frame,
int width = 14);
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
Definition csv_file_reader.cpp:12
void print_error(const std::string &label, real_t value, int width)
The label and the value in scientific notation with one decimal, for small errors.
Definition print_utils.cpp:33
void print_flag(const std::string &label, bool value, int width)
The label and true or false.
Definition print_utils.cpp:27
std::string to_string(const chrono::ChVector3d &v)
"(x, y, z)" with 3 decimals
Definition print_utils.cpp:48
void print_number(const std::string &label, real_t value, int width)
The label and the value, with 3 decimals.
Definition print_utils.cpp:21
std::ostream & print_vector(std::ostream &out, const std::vector< T > &obs)
Definition io_utils.h:21
void print_matrix(const std::string &label, const chrono::ChMatrix33d &R)
The label on a line of its own, then the three rows of the matrix.
Definition print_utils.cpp:61
real_t clean(real_t x, real_t zero)
x, or 0 when zero
Definition print_utils.cpp:15
void print_title(const std::string &title, std::ostream &out)
An empty line and then the title.
Definition print_utils.cpp:17
void print_value(const std::string &label, real_t value, const std::string &unit, int precision, int width)
The label, the value right-aligned with the given decimals, and the unit.
Definition print_utils.cpp:39
void print_frame(const std::string &label, const chrono::ChFrame<> &frame, int width)
The label, the origin of the frame and its three axes, as seen from its parent: the columns of its ro...
Definition print_utils.cpp:75
Definition bitsim_utils.h:11
Definition dc_motor_backend_base.h:9
std::ostream & operator<<(std::ostream &out, const std::chrono::system_clock::time_point &tp)
Definition io_utils.h:65
double real_t
real_t
Definition bitsim_types.h:20
Null placeholder.
Definition bitsim_types.h:179