Class matrix_view_vec_vec (o2scl)¶
-
template<class
vec1_t
, classvec2_t
= std::vector<vec1_t>>
classo2scl
::
matrix_view_vec_vec
: public o2scl::matrix_view¶ View a o2scl::table object as a matrix.
- Idea for Future:
It would be nice to store a reference rather than a pointer, but this causes problems with o2scl::interpm_idw .
- 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
-
matrix_view_vec_vec
()¶
-
matrix_view_vec_vec
(vec2_t &vv)¶ Create a matrix view object from the specified table and list of rows.
-
size_t
size1
() const¶ Return the number of rows.
-
size_t
size2
() const¶ 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
.
-
double &
operator()
(size_t row, size_t col)¶ Return a reference to the element at row
row
and columncol
.
Friends
-
friend void
swap
(matrix_view_vec_vec &t1, matrix_view_vec_vec &t2)¶ Swap method.