Class matrix_row_gen_ctor (o2scl)

O2scl : Class List

template<class mat_t>
class matrix_row_gen_ctor

Matrix row object with a constructor and resize method.

This is used in o2scl::ode_iv_solve_grid .

Public Functions

inline matrix_row_gen_ctor(mat_t &m, size_t row)

Create a row object from row row of matrix m.

inline matrix_row_gen_ctor(size_t n_cols = 0)

Create a row object from row row of matrix m.

inline void resize(size_t n_cols = 0)

Resize.

inline size_t size() const

Return size.

inline double &operator[](size_t i)

Return a reference to the ith column of the selected row.

inline const double &operator[](size_t i) const

Return a const reference to the ith column of the selected row.

Protected Attributes

mat_t *mp

A pointer to the matrix.

size_t row_

The selected row.

mat_t mat

A matrix to point to.