Class const_matrix_view_table (o2scl)¶
-
template<class
vec_t
= std::vector<double>>
classo2scl
::
const_matrix_view_table
: public o2scl::const_matrix_view¶ View a o2scl::table object as a matrix.
- Note
This stores a pointer to the table and the user must ensure that the pointer is valid with the matrix view is accessed.
Public Functions
-
const_matrix_view_table
()¶ Create a matrix view object from the specified table and list of columns.
-
const_matrix_view_table
(o2scl::table<vec_t> &t, std::vector<std::string> cols)¶ Create a matrix view object from the specified table and list of columns.
-
void
set
(o2scl::table<vec_t> &t, std::vector<std::string> cols)¶ Create a matrix view object from the specified table and list of columns.
-
size_t
size1
()¶ Return the number of rows.
-
size_t
size2
()¶ Return the number of columns.
-
const double &
operator()
(size_t row, size_t col) const¶ Return a reference to the element at row
row
and columncol
.
Protected Attributes
-
size_t
nc
¶ The number of columns.
-
size_t
nlines
¶ The number of lines in the table.
Friends
-
friend void
swap
(const_matrix_view_table &t1, const_matrix_view_table &t2)¶ Swap method.