View a o2scl::table object as a matrix.
More...
#include <vector.h>
template<class vec1_t, class vec2_t = std::vector<vec1_t>>
class o2scl::matrix_view_vec_vec< vec1_t, vec2_t >
- Note
- This stores a pointer to the table and the user must ensure that the pointer is valid with the matrix view is accessed.
- Idea for Future:
- It would be nice to store a reference rather than a pointer, but this causes problems with o2scl::interpm_idw .
Definition at line 2942 of file vector.h.
|
| 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 column col .
|
|
double & | operator() (size_t row, size_t col) |
| Return a reference to the element at row row and column col .
|
|
const double & | operator() (size_t row, size_t col) const |
| Return a reference to the element at row row and column col .
|
|
double & | operator() (size_t row, size_t col) |
| Return a reference to the element at row row and column col .
|
|
size_t | size1 () const |
| Return the number of rows.
|
|
size_t | size2 () const |
| Return the number of columns.
|
|
|
vec2_t * | vvp |
| Pointer to the table.
|
|
◆ swap
template<class vec1_t , class vec2_t = std::vector<vec1_t>>
Just swap the pointer
Definition at line 2953 of file vector.h.
The documentation for this class was generated from the following file:
- /home/awsteiner/wcs/o2scl/src/base/vector.h