23 size_t nElements_2,
const size_t startElement_1,
const size_t startElement_2)
24 : m_view(base, nTotalRows, nTotalCols,
dynamic_stride(nTotalRows, 1)) {
29 new (&
m_view)
map_type(base + (startElement_2 * nTotalRows) + startElement_1, nElements_1, nElements_2,
40 const size_t startElement_1,
const size_t startElement_2)
41 : m_view(matrix.data(), matrix.rows(), matrix.cols(),
dynamic_stride(matrix.outerStride(), matrix.innerStride())) {
46 new (&
m_view)
map_type(matrix.data() + (startElement_2 * matrix.rows()) + startElement_1, nElements_1, nElements_2,
57 const size_t startElement_1,
const size_t startElement_2)
58 : m_view(matrix.data(), matrix.rows(), matrix.cols(),
dynamic_stride(matrix.outerStride(), matrix.innerStride())) {
63 new (&
m_view)
map_type(matrix.data() + (startElement_2 * matrix.rows()) + startElement_1, nElements_1, nElements_2,
76 size_t nElements_2,
const size_t startElement_1,
const size_t startElement_2)
79 new (&
m_view)
const_map_type(base + (startElement_2 * nTotalRows) + startElement_1, nElements_1, nElements_2,
90 const size_t startElement_1,
const size_t startElement_2)
93 new (&
m_view)
const_map_type(matrix.data() + (startElement_2 * matrix.rows()) + startElement_1, nElements_1,
104 const size_t startElement_1,
const size_t startElement_2)
107 new (&
m_view)
const_map_type(matrix.data() + (startElement_2 * matrix.rows()) + startElement_1, nElements_1,
108 nElements_2,
dynamic_stride(matrix.outerStride(), matrix.innerStride()));
122 : m_view(v.matrix_mutator().data(), v.rows(), v.cols(),
dynamic_stride(v.outerStride(), v.innerStride())),
130 throw std::runtime_error(
"Matrix is const matrix, a const matrix cannot be mutated.");
143 new (&
m_view)
map_type(V.m_view.data(), V.m_view.rows(), V.m_view.cols(),
EigenMatrix_View & operator=(EigenMatrix_View &V)
map_type & matrix_mutator()
void initialiseMatrix(const size_t nTotalRows, const size_t nTotalCols, size_t &nElements_1, size_t &nElements_2)
Eigen::Map< Eigen::MatrixXd, 0, dynamic_stride > map_type
Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > dynamic_stride
Eigen::Map< const Eigen::MatrixXd, 0, dynamic_stride > const_map_type