Class for managing 2D table m_data.
More...
#include <TableData.hpp>
|
template<typename T > |
void | addCell (RowType rowValue, ColumnType columnValue, T const &value) |
| Add a cell to the table. If necessary, create automatically the containing column & row. More...
|
|
void | collectTableValues (arrayView1d< real64 const > dim0AxisCoordinates, arrayView1d< real64 const > dim1AxisCoordinates, arrayView1d< real64 const > values, bool columnMajorValues) |
| Collects all the values needed to build the table. More...
|
|
TableData2D::TableDataHolder | convertTable2D (arrayView1d< real64 const > coordX, arrayView1d< real64 const > coordY, string_view rowAxisDescription, string_view columnAxisDescription, arrayView1d< real64 const > const values, bool columnMajorValues, string_view valueDescription) |
| Convert from 2D axis/values a structure the information needed to build a TableFormatter. More...
|
|
TableDataHolder | buildTableData (string_view dataDescription, string_view rowFmt="{}", string_view columnFmt="{}") const |
|
void | clear () |
| Clear all data stored in TableData.
|
|
Class for managing 2D table m_data.
Definition at line 169 of file TableData.hpp.
◆ addCell()
template<typename T >
void geos::TableData2D::addCell |
( |
RowType |
rowValue, |
|
|
ColumnType |
columnValue, |
|
|
T const & |
value |
|
) |
| |
Add a cell to the table. If necessary, create automatically the containing column & row.
- Template Parameters
-
T | The value passed to addCell (can be any type). |
- Parameters
-
value | CellData value to be added. |
rowValue | The value of the row containing the cell. |
columnValue | The value of the column containing the cell. |
Definition at line 291 of file TableData.hpp.
◆ buildTableData()
- Returns
- Convert and return a struct containing a 1D Table, the column names list from a TableData2D and any errors related to the table
- Parameters
-
dataDescription | The table dataDescription shown at the top left side |
rowFmt | The y axis units of the table. |
columnFmt | The x axis units of the table. |
- Note
- The rows and columns FMT can be customized. The bracket "{}" will be replaced by the axis value. By default it displays the axis value. I.E to display a customized axis to show the pressures in y axis, a rowFmt value can be : "pressure [K] = {}"
◆ collectTableValues()
Collects all the values needed to build the table.
- Parameters
-
dim0AxisCoordinates | Vector containing all row axis values |
dim1AxisCoordinates | Vector containing all column axis values |
values | Array containing all table values contiguously |
columnMajorValues | Set the row/column major convention |
◆ convertTable2D()
Convert from 2D axis/values a structure the information needed to build a TableFormatter.
- Parameters
-
coordX | Array containing row axis values |
coordY | Array containing column axis values |
rowAxisDescription | The description for a row unit value |
columnAxisDescription | The description for a column unit value |
values | Vector containing all table values |
columnMajorValues | Set the row/column major convention |
valueDescription | The description of the value (typically, the value unit description) |
- Returns
- A struct containing the tableData converted and all header values ;
The documentation for this class was generated from the following file: