Class matrix_view_vec_vec (o2scl)

O2scl : Class List

template<class vec1_t, class vec2_t = std::vector<vec1_t>>
class o2scl::matrix_view_vec_vec : public o2scl::matrix_view

View a o2scl::table object as a matrix.

Todo

In class matrix_view_vec_vec:

  • Future: It would be nice to store a reference rather than a

pointer, but this causes problems with ref 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

inline matrix_view_vec_vec()
inline matrix_view_vec_vec(vec2_t &vv)

Create a matrix view object from the specified table and list of rows.

inline size_t size1() const

Return the number of rows.

inline size_t size2() const

Return the number of columns.

inline const double &operator()(size_t row, size_t col) const

Return a reference to the element at row row and column col.

inline double &operator()(size_t row, size_t col)

Return a reference to the element at row row and column col.

Protected Attributes

vec2_t *vvp

Pointer to the table.

Friends

inline friend void swap(matrix_view_vec_vec &t1, matrix_view_vec_vec &t2)

Swap method.