11 #ifndef BEMBEL_SRC_UTIL_GENERICMATRIX_HPP_
12 #define BEMBEL_SRC_UTIL_GENERICMATRIX_HPP_
20 typedef typename std::vector<std::vector<T> >::size_type colIndex;
21 typedef typename std::vector<T>::size_type rowIndex;
27 GenericMatrix(rowIndex rows, colIndex cols) { resize(rows, cols); }
32 m_data_ = other.m_data_;
38 m_data_ = std::move(other.m_data_);
43 void resize(rowIndex rows, colIndex cols) {
45 for (
auto it = m_data_.begin(); it != m_data_.end(); ++it) it->resize(rows);
51 colIndex cols()
const {
return cols_; }
53 rowIndex rows()
const {
return rows_; }
57 const T& operator()(rowIndex row, colIndex col)
const {
58 return m_data_[col][row];
61 T& operator()(rowIndex row, colIndex col) {
return m_data_[col][row]; }
66 std::swap(m_data_, other.m_data_);
73 std::vector<std::vector<T> > m_data_;
Routines for the evalutation of pointwise errors.