3 #include <opals/fwd.hpp>
26 template<
class T, std::
size_t nRows_, std::
size_t nCols_ >
27 class Matrix :
public std::array<T, nRows_ * nCols_>
36 T& operator()(
size_t r,
size_t c)
38 return (*
this)[r * nCols_ + c];
40 const T& operator()(
size_t r,
size_t c)
const
42 return (*
this)[r * nCols_ + c];
48 size_t nRows()
const {
return nRows_; }
49 size_t nCols()
const {
return nCols_; }
Contains the public interface of OPALS.
Definition: AbsValueOrQuantile.hpp:8
void swap(Matrix &other)
swap
Definition: Matrix.hpp:31
A template class for storing a two-dimensional array of constant size.
Definition: fwd.hpp:17