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>
283 template<
class Form,
class Type>
293 template<
class Form,
class Type>
302 return v_[i*nCols_ + j];
306 template<
class Form,
class Type>
315 return v_[i*nCols_ + j];
319 template<
class Form,
class Type>
323 return v_ + i*nCols_;
327 template<
class Form,
class Type>
331 return v_ + i*nCols_;
label n() const
Return the number of columns.
void shallowResize(const label m, const label n)
Resize the matrix without reallocating storage (unsafe)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void checki(const label i) const
Check index i is within valid range (0 ... m-1).
autoPtr< mType > clone() const
Clone.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A templated block of an (m x n) matrix of type <MatrixType>.
Matrix()
Null constructor.
void checkj(const label j) const
Check index j is within valid range (0 ... n-1).
static const mType & null()
Return a null Matrix.
label size() const
Return the number of elements in matrix (m*n)
errorManip< error > abort(error &err)
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 &)
Write Matrix to Ostream.
ConstMatrixBlock< mType > block(const label m, const label n, const label mStart, const label nStart) const
label m() const
Return the number of rows.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const Type * v() const
Return element vector of the constant Matrix.
ConstMatrixBlock< mType > col(const label m, const label rowStart) const