DOLFIN-X
DOLFIN-X C++ interface
|
42 Table(std::string title =
"",
bool right_justify =
true);
63 void set(std::string row, std::string col,
64 std::variant<std::string, int, double> value);
70 std::variant<std::string, int, double>
get(std::string row,
71 std::string col)
const;
83 std::string
str()
const;
87 std::vector<std::string> _rows, _cols;
90 std::map<std::pair<std::string, std::string>,
91 std::variant<std::string, int, double>>
Table & operator=(const Table &table)=default
Assignment operator.
std::string str() const
Return string representation of the table.
Definition: Table.cpp:196
Table(std::string title="", bool right_justify=true)
Create empty table.
Definition: Table.cpp:37
Table(const Table &table)=default
Copy constructor.
This class provides storage and pretty-printing for tables. Example usage:
Definition: Table.h:30
Table reduce(MPI_Comm comm, Reduction reduction) const
Do MPI reduction on Table.
Definition: Table.cpp:73
Table & operator=(Table &&table)=default
Move assignment.
~Table()=default
Destructor.
Reduction
Types of MPI reduction available for Table, to get the max, min or average values over an MPI_Comm.
Definition: Table.h:35
std::variant< std::string, int, double > get(std::string row, std::string col) const
Get value of table entry.
Definition: Table.cpp:59
Table(Table &&table)=default
Move constructor.
std::string name
Table name.
Definition: Table.h:80
void set(std::string row, std::string col, std::variant< std::string, int, double > value)
Set table entry.
Definition: Table.cpp:43