2 #include "creativity/data/Equation.hpp" 3 #include "creativity/data/SUR.hpp" 21 unsigned precision = 6;
23 bool showpoint =
false;
25 bool dot_align =
true;
40 bool rows_align_left =
false;
44 bool extracol_align_left =
true;
53 bool preamble =
false;
62 bool postamble =
false;
83 : format{format}, precision{precision}, showpoint{showpoint}, title{title} {}
118 const Eigen::Ref<const Eigen::MatrixXd> &matrix,
120 const std::vector<std::string> &rownames = {},
121 const std::vector<std::string> &colnames = {},
122 const std::vector<std::string> &extracol = {});
166 const std::vector<std::string> &rownames = {});
180 const std::vector<std::string> &rownames = {});
std::string tabulate(const Eigen::Ref< const Eigen::MatrixXd > &matrix, const tabulation_options &options=tabulation_options{}, const std::vector< std::string > &rownames={}, const std::vector< std::string > &colnames={}, const std::vector< std::string > &extracol={})
Function that takes an Eigen matrix and optional row and column names and displays the results...
TableFormat
Enum for supported table output formats.
Definition: tabulate.hpp:10
std::string tabulate_preamble(const tabulation_options &options)
Returns the preamble (if any) for the format contain within the given tabulation_options.
Primary namespace for all Creativity library code.
Definition: config.hpp:4
std::string indent
The indent (only applies when format is Text)
Definition: tabulate.hpp:27
std::string tabulate_escape(const std::string &in, const tabulation_options &options)
Escapes a value according to the given tabulation options format.
Class to store a equation.
Definition: Equation.hpp:33
Struct holding various options controlling tabulation output.
Definition: tabulate.hpp:17
Class for running a seemingly-unrelated regressions model.
Definition: SUR.hpp:13
std::string tabulate_postamble(const tabulation_options &options)
Returns the postamble (if any) for the format contain within the given tabulation_options.
tabulation_options(const std::string &title="", TableFormat format=TableFormat::Text, unsigned precision=6, bool showpoint=false)
Constructs a tabulation_options struct.
Definition: tabulate.hpp:82
tabulation_options(TableFormat format, unsigned precision=6, bool showpoint=false)
Constructs a tabulation_options struct without a title but with a specified format.
Definition: tabulate.hpp:90
std::string title
The title of the table; if non-empty, this title will be displayed as a heading in some format-specif...
Definition: tabulate.hpp:31