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