61template<
class MatrixType>
67 const MatrixType& matrix_;
74 const label rowStart_;
75 const label colStart_;
81 label disallow(
const char *what)
const;
89 typedef typename MatrixType::cmptType
cmptType;
92 typedef typename MatrixType::value_type
value_type;
95 typedef typename MatrixType::size_type
size_type;
103 const MatrixType& matrix,
114 label
m() const
noexcept {
return mRows_; }
117 label
n() const
noexcept {
return nCols_; }
136 void checkIndex(const label i, const label j) const;
144template<class MatrixType>
157 const label rowStart_;
158 const label colStart_;
164 label disallow(
const char *what)
const;
172 typedef typename MatrixType::cmptType
cmptType;
175 typedef typename MatrixType::value_type
value_type;
178 typedef typename MatrixType::size_type
size_type;
203 label
m() const
noexcept {
return mRows_; }
206 label
n() const
noexcept {
return nCols_; }
222 inline
cmptType& operator()(const label i, const label j);
228 void checkIndex(const label i, const label j) const;
244 template<class MatrixType2>
248 template<class MatrixType2>
263 void operator=(const Block<SubTensor, BRowStart, BColStart>&);
276 void operator=(const Block<SubVector, BStart>&);
289#include "MatrixBlockI.H"
void checkIndex(const label i, const label j) const
Check if (i, j) is within range of row-column limits.
label m() const noexcept
Return the number of rows in the block.
MatrixType::size_type size_type
The type to represent the size of a Matrix.
labelPair sizes() const noexcept
Return row/column sizes of the block.
MatrixType::value_type value_type
The value type the Matrix contains.
label size() const noexcept
The number of elements in the block (m*n).
label n() const noexcept
Return the number of columns in the block.
MatrixType::cmptType cmptType
The value type the Matrix contains.
ConstMatrixBlock(const MatrixType &matrix, const label m, const label n, const label mStart, const label nStart)
Construct block for matrix, size and location.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
A templated block of an (m x n) matrix of type <MatrixType>.
void checkIndex(const label i, const label j) const
Check if (i, j) is within range of row-column limits.
label m() const noexcept
Return the number of rows in the block.
MatrixType::size_type size_type
The type to represent the size of a Matrix.
labelPair sizes() const noexcept
Return row/column sizes of the block.
MatrixType::value_type value_type
The value type the Matrix contains.
label n() const noexcept
Return the number of columns in the block.
MatrixType::cmptType cmptType
The value type the Matrix contains.
MatrixBlock(const MatrixBlock &)=default
Copy construct.
A templated (m x n) matrix of objects of <T>. The layout is (mRows x nCols) - row-major order:
Pair< label > labelPair
A pair of labels.