Class const_matrix_row_gen (o2scl)

O2scl : Class List

template<class mat_t>
class const_matrix_row_gen

Generic object which represents a row of a const matrix.

This class is used in o2scl::eos_sn_base::slice to construct a row of a matrix object of type

std::function<double &(size_t,size_t)>

This class has no size() method because ublas, Eigen, and armadillo matrix types do not have a consistent interface for obtaining the matrix dimensions.

Note

This class is experimental.

Public Functions

inline const_matrix_row_gen(const mat_t &m, size_t row)

Create a row object from row row of matrix m.

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

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

Protected Attributes

const mat_t &m_

A reference to the original matrix.

size_t row_

The selected row.