Class matrix_view_vec_vec (o2scl)¶
-
template<class vec1_t, class vec2_t = std::vector<vec1_t>>
class matrix_view_vec_vec : public o2scl::matrix_view¶ View a vector of vectors as a matrix.
This class is used in
interpm_idw_ts.cpp
.Note
This stores a pointer to the original object and the user must ensure that the pointer is valid while the matrix view is accessed.
Note
This class presumes that all of the “inner” vectors are at least as large as the first “inner” vector in the “outer” vector object.
Public Functions
-
inline matrix_view_vec_vec()¶
-
inline matrix_view_vec_vec(vec2_t &vv)¶
Create a matrix view object from the specified vector of vectors.
-
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 columncol
.
-
inline double &operator()(size_t row, size_t col)¶
Return a reference to the element at row
row
and columncol
.
Friends
-
inline friend void swap(matrix_view_vec_vec &t1, matrix_view_vec_vec &t2)¶
Swap method.
-
inline matrix_view_vec_vec()¶