#include </home/runner/work/mars_lib/mars_lib/source/mars/include/mars/data_utils/write_csv.h>
|
static std::string | vec_to_csv (const Eigen::VectorXd &a) |
|
static std::string | cov_mat_to_csv (const Eigen::MatrixXd &cov) |
| get_csv_state_with_cov_header_string generate string with state and upper triangular covariance More...
|
|
static std::string | get_cov_header_string (const int &num_states) |
|
◆ vec_to_csv()
static std::string mars::WriteCsv::vec_to_csv |
( |
const Eigen::VectorXd & |
a | ) |
|
|
inlinestatic |
26 for (
int k = 0; k < a.size(); k++)
◆ cov_mat_to_csv()
static std::string mars::WriteCsv::cov_mat_to_csv |
( |
const Eigen::MatrixXd & |
cov | ) |
|
|
inlinestatic |
get_csv_state_with_cov_header_string generate string with state and upper triangular covariance
- Returns
39 if (cov.rows() != cov.cols())
41 std::cout <<
"Cov Mat to CSV: Cov matrix non-squared. No line written." << std::endl;
42 return std::string(
"");
46 const int num_cov_state =
static_cast<int>(cov.rows());
48 for (
int k = 0; k < num_cov_state; k++)
50 int row_count = k * num_cov_state + k;
51 int col_count = num_cov_state - k;
52 os << vec_to_csv(Eigen::Map<const Eigen::VectorXd>(cov.data() + row_count, col_count));
◆ get_cov_header_string()
static std::string mars::WriteCsv::get_cov_header_string |
( |
const int & |
num_states | ) |
|
|
inlinestatic |
62 const std::string var(
"p_");
63 for (
int row = 1; row <= num_states; row++)
65 for (
int col = row; col <= num_states; col++)
67 os <<
", " << var << row <<
"_" << col;
The documentation for this class was generated from the following file: