30 template<
class Form,
class Type>
39 template<
class Form,
class Type>
49 template<
class Form,
class Type>
52 return NullObjectRef<Matrix<Form, Type>>();
56 template<
class Form,
class Type>
63 template<
class Form,
class Type>
70 template<
class Form,
class Type>
77 template<
class Form,
class Type>
81 if (!mRows_ || !nCols_)
84 <<
"Attempt to access element from empty matrix" 87 else if (i<0 || i>=mRows_)
90 <<
"Index " << i <<
" out of range 0 ... " << mRows_-1
97 template<
class Form,
class Type>
101 if (!mRows_ || !nCols_)
104 <<
"Attempt to access element from empty matrix" 107 else if (j<0 || j>=nCols_)
110 <<
"index " << j <<
" out of range 0 ... " << nCols_-1
117 template<
class Form,
class Type>
124 template<
class Form,
class Type>
131 template<
class Form,
class Type>
152 template<
class Form,
class Type>
153 template<
class VectorSpace>
172 template<
class Form,
class Type>
191 template<
class Form,
class Type>
211 template<
class Form,
class Type>
232 template<
class Form,
class Type>
233 template<
class VectorSpace>
248 template<
class Form,
class Type>
263 template<
class Form,
class Type>
285 template<
class Form,
class Type>
294 return v_[i*nCols_ + j];
298 template<
class Form,
class Type>
307 return v_[i*nCols_ + j];
311 template<
class Form,
class Type>
315 return v_ + i*nCols_;
319 template<
class Form,
class Type>
323 return v_ + i*nCols_;
void checkj(const label j) const
Check index j is within valid range (0 ... n-1).
static const direction nCols
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static const direction mRows
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A templated block of an (m x n) matrix of type <MatrixType>.
label m() const
Return the number of rows.
Matrix()
Null constructor.
label n() const
Return the number of columns.
ConstMatrixBlock< mType > col(const label m, const label rowStart) const
static const mType & null()
Return a null Matrix.
ConstMatrixBlock< mType > block(const label m, const label n, const label mStart, const label nStart) const
autoPtr< mType > clone() const
Clone.
errorManip< error > abort(error &err)
const Type * v() const
Return element vector of the constant Matrix.
A templated (m x n) matrix of objects of <T>.
Type * operator[](const label)
Return subscript-checked row of Matrix.
friend Ostream & operator(Ostream &, const mType &)
label size() const
Return the number of elements in matrix (m*n)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void checki(const label i) const
Check index i is within valid range (0 ... m-1).