DOLFIN
DOLFIN C++ interface
Public Member Functions | Friends | List of all members
dolfin::Table Class Reference

#include <Table.h>

Inheritance diagram for dolfin::Table:
Inheritance graph
[legend]
Collaboration diagram for dolfin::Table:
Collaboration graph
[legend]

Public Member Functions

 Table (std::string title="", bool right_justify=true)
 Create empty table.
 
 ~Table ()
 Destructor.
 
TableEntry operator() (std::string row, std::string col)
 Return table entry.
 
void set (std::string row, std::string col, int value)
 Set value of table entry.
 
void set (std::string row, std::string col, std::size_t value)
 Set value of table entry.
 
void set (std::string row, std::string col, double value)
 Set value of table entry.
 
void set (std::string row, std::string col, std::string value)
 Set value of table entry.
 
std::string get (std::string row, std::string col) const
 Get value of table entry.
 
double get_value (std::string row, std::string col) const
 Get value of table entry.
 
const Tableoperator= (const Table &table)
 Assignment operator.
 
std::string str (bool verbose) const
 Return informal string representation (pretty-print)
 
std::string str_latex () const
 Return informal string representation for LaTeX.
 
- Public Member Functions inherited from dolfin::Variable
 Variable ()
 Create unnamed variable.
 
 Variable (const std::string name, const std::string label)
 Create variable with given name and label.
 
 Variable (const Variable &variable)
 Copy constructor.
 
virtual ~Variable ()
 Destructor.
 
const Variableoperator= (const Variable &variable)
 Assignment operator.
 
void rename (const std::string name, const std::string label)
 Rename variable.
 
std::string name () const
 Return name.
 
std::string label () const
 Return label (description)
 
std::size_t id () const
 

Friends

class MPI
 
class XMLTable
 

Additional Inherited Members

- Public Attributes inherited from dolfin::Variable
Parameters parameters
 Parameters.
 

Detailed Description

This class provides storage and pretty-printing for tables. Example usage:

Table table("Timings");

table("Eigen", "Assemble") = 0.010; table("Eigen", "Solve") = 0.020; table("PETSc", "Assemble") = 0.011; table("PETSc", "Solve") = 0.019; table("Tpetra", "Assemble") = 0.012; table("Tpetra", "Solve") = 0.018;

info(table);


The documentation for this class was generated from the following files: