This is the matrix class intended to appear in user code for large, variable size matrices.
More...
|
| | Matrix_ () |
| |
| | Matrix_ (const MatrixCommitment &mc) |
| |
| | Matrix_ (const Matrix_ &src) |
| |
| Matrix_ & | operator= (const Matrix_ &src) |
| |
| | Matrix_ (const Base &v) |
| |
| | Matrix_ (const BaseNeg &v) |
| |
| | Matrix_ (int m, int n) |
| |
| | Matrix_ (int m, int n, const ELT *cppInitialValuesByRow) |
| |
| | Matrix_ (int m, int n, const ELT &initialValue) |
| |
| | Matrix_ (int m, int n, int leadingDim, const S *data) |
| |
| | Matrix_ (int m, int n, int leadingDim, S *data) |
| |
| template<int M, int N, int CS, int RS> |
| | Matrix_ (const Mat< M, N, ELT, CS, RS > &mat) |
| | Convert a Mat to a Matrix_. More...
|
| |
| Matrix_ & | operator= (const ELT &v) |
| |
| template<class EE > |
| Matrix_ & | operator= (const MatrixBase< EE > &m) |
| |
| template<class EE > |
| Matrix_ & | operator+= (const MatrixBase< EE > &m) |
| |
| template<class EE > |
| Matrix_ & | operator-= (const MatrixBase< EE > &m) |
| |
| Matrix_ & | operator*= (const StdNumber &t) |
| |
| Matrix_ & | operator/= (const StdNumber &t) |
| |
| Matrix_ & | operator+= (const ELT &r) |
| |
| Matrix_ & | operator-= (const ELT &r) |
| |
| const TNeg & | negate () const |
| |
| TNeg & | updNegate () |
| |
| const TNeg & | operator- () const |
| |
| TNeg & | operator- () |
| |
| std::string | toString () const |
| | toString() returns a string representation of the Matrix_. More...
|
| |
| const ELT & | get (int i, int j) const |
| | Variant of indexing operator that's scripting friendly to get entry (i, j) More...
|
| |
| void | set (int i, int j, const ELT &value) |
| | Variant of indexing operator that's scripting friendly to set entry (i, j) More...
|
| |
| const MatrixCommitment & | getCharacterCommitment () const |
| |
| const MatrixCharacter & | getMatrixCharacter () const |
| |
| void | commitTo (const MatrixCommitment &mc) |
| | Change the handle commitment for this matrix handle; only allowed if the handle is currently clear. More...
|
| |
| int | nrow () const |
| | Return the number of rows m in the logical shape of this matrix. More...
|
| |
| int | ncol () const |
| | Return the number of columns n in the logical shape of this matrix. More...
|
| |
| ptrdiff_t | nelt () const |
| | Return the number of elements in the logical shape of this matrix. More...
|
| |
| bool | isResizeable () const |
| | Return true if either dimension of this Matrix is resizable. More...
|
| |
| | MatrixBase () |
| | The default constructor builds a 0x0 matrix managed by a helper that understands how many scalars there are in one of our elements but is otherwise uncommitted. More...
|
| |
| | MatrixBase (int m, int n) |
| | This constructor allocates the default matrix a completely uncommitted matrix commitment, given particular initial dimensions. More...
|
| |
| | MatrixBase (const MatrixCommitment &commitment) |
| | This constructor takes a handle commitment and allocates the default matrix for that kind of commitment. More...
|
| |
| | MatrixBase (const MatrixCommitment &commitment, int m, int n) |
| | This constructor takes a handle commitment and allocates the default matrix for that kind of commitment given particular initial minimum dimensions, which cannot be larger than those permitted by the commitment. More...
|
| |
| | MatrixBase (const MatrixBase &b) |
| | Copy constructor is a deep copy (not appropriate for views!). More...
|
| |
| | MatrixBase (const TNeg &b) |
| | Implicit conversion from matrix with negated elements (otherwise this is just like the copy constructor. More...
|
| |
| MatrixBase & | copyAssign (const MatrixBase &b) |
| | Copy assignment is a deep copy but behavior depends on type of lhs: if view, rhs must match. More...
|
| |
| MatrixBase & | operator= (const MatrixBase &b) |
| |
| MatrixBase & | viewAssign (const MatrixBase &src) |
| | View assignment is a shallow copy, meaning that we disconnect the MatrixBase from whatever it used to refer to (destructing as necessary), then make it a new view for the data descriptor referenced by the source. More...
|
| |
| | MatrixBase (const MatrixCommitment &commitment, int m, int n, const ELT &initialValue) |
| | Initializing constructor with all of the initially-allocated elements initialized to the same value. More...
|
| |
| | MatrixBase (const MatrixCommitment &commitment, int m, int n, const ELT *cppInitialValuesByRow) |
| | Initializing constructor with the initially-allocated elements initialized from a C++ array of elements, which is provided in row major order. More...
|
| |
| | MatrixBase (const MatrixCommitment &commitment, MatrixHelper< Scalar > &source, const typename MatrixHelper< Scalar >::ShallowCopy &shallow) |
| |
| | MatrixBase (const MatrixCommitment &commitment, const MatrixHelper< Scalar > &source, const typename MatrixHelper< Scalar >::ShallowCopy &shallow) |
| |
| | MatrixBase (const MatrixCommitment &commitment, const MatrixHelper< Scalar > &source, const typename MatrixHelper< Scalar >::DeepCopy &deep) |
| |
| void | clear () |
| | This restores the MatrixBase to the state it would be in had it been constructed specifying only its handle commitment. More...
|
| |
| MatrixBase & | operator*= (const StdNumber &t) |
| |
| MatrixBase & | operator/= (const StdNumber &t) |
| |
| MatrixBase & | operator+= (const MatrixBase &r) |
| |
| MatrixBase & | operator-= (const MatrixBase &r) |
| |
| template<class EE > |
| | MatrixBase (const MatrixBase< EE > &b) |
| |
| template<class EE > |
| MatrixBase & | operator= (const MatrixBase< EE > &b) |
| |
| template<class EE > |
| MatrixBase & | operator+= (const MatrixBase< EE > &b) |
| |
| template<class EE > |
| MatrixBase & | operator-= (const MatrixBase< EE > &b) |
| |
| MatrixBase & | operator= (const ELT &t) |
| | Matrix assignment to an element sets only the diagonal elements to the indicated value; everything else is set to zero. More...
|
| |
| template<class S > |
| MatrixBase & | scalarAssign (const S &s) |
| | Set M's diagonal elements to a "scalar" value S, and all off-diagonal elements to zero. More...
|
| |
| template<class S > |
| MatrixBase & | scalarAddInPlace (const S &s) |
| | Add a scalar to M's diagonal. More...
|
| |
| template<class S > |
| MatrixBase & | scalarSubtractInPlace (const S &s) |
| | Subtract a scalar from M's diagonal. More...
|
| |
| template<class S > |
| MatrixBase & | scalarSubtractFromLeftInPlace (const S &s) |
| | Set M(i,i) = S - M(i,i), M(i,j) = -M(i,j) for i!=j. More...
|
| |
| template<class S > |
| MatrixBase & | scalarMultiplyInPlace (const S &) |
| | Set M(i,j) = M(i,j)*S for some "scalar" S. More...
|
| |
| template<class S > |
| MatrixBase & | scalarMultiplyFromLeftInPlace (const S &) |
| | Set M(i,j) = S * M(i,j) for some "scalar" S. More...
|
| |
| template<class S > |
| MatrixBase & | scalarDivideInPlace (const S &) |
| | Set M(i,j) = M(i,j)/S for some "scalar" S. More...
|
| |
| template<class S > |
| MatrixBase & | scalarDivideFromLeftInPlace (const S &) |
| | Set M(i,j) = S/M(i,j) for some "scalar" S. More...
|
| |
| template<class EE > |
| MatrixBase & | rowScaleInPlace (const VectorBase< EE > &) |
| | M = diag(r) * M; r must have nrow() elements. More...
|
| |
| template<class EE > |
| void | rowScale (const VectorBase< EE > &r, typename EltResult< EE >::Mul &out) const |
| | Return type is a new matrix which will have the same dimensions as 'this' but will have element types appropriate for the elementwise multiply being performed. More...
|
| |
| template<class EE > |
| EltResult< EE >::Mul | rowScale (const VectorBase< EE > &r) const |
| |
| template<class EE > |
| MatrixBase & | colScaleInPlace (const VectorBase< EE > &) |
| | M = M * diag(c); c must have ncol() elements. More...
|
| |
| template<class EE > |
| void | colScale (const VectorBase< EE > &c, typename EltResult< EE >::Mul &out) const |
| |
| template<class EE > |
| EltResult< EE >::Mul | colScale (const VectorBase< EE > &c) const |
| |
| template<class ER , class EC > |
| MatrixBase & | rowAndColScaleInPlace (const VectorBase< ER > &r, const VectorBase< EC > &c) |
| | M = diag(r) * M * diag(c); r must have nrow() elements; must have ncol() elements. More...
|
| |
| template<class ER , class EC > |
| void | rowAndColScale (const VectorBase< ER > &r, const VectorBase< EC > &c, typename EltResult< typename VectorBase< ER >::template EltResult< EC >::Mul >::Mul &out) const |
| |
| template<class ER , class EC > |
| EltResult< typename VectorBase< ER >::template EltResult< EC >::Mul >::Mul | rowAndColScale (const VectorBase< ER > &r, const VectorBase< EC > &c) const |
| |
| template<class S > |
| MatrixBase & | elementwiseAssign (const S &s) |
| | Set M(i,j)=s for every element of M and some value s. More...
|
| |
| MatrixBase & | elementwiseAssign (int s) |
| | Overloaded to allow an integer argument, which is converted to Real. More...
|
| |
| MatrixBase & | elementwiseInvertInPlace () |
| | Set M(i,j) = M(i,j)^-1. More...
|
| |
| void | elementwiseInvert (MatrixBase< typename CNT< E >::TInvert > &out) const |
| |
| MatrixBase< typename CNT< E >::TInvert > | elementwiseInvert () const |
| |
| template<class S > |
| MatrixBase & | elementwiseAddScalarInPlace (const S &s) |
| | Set M(i,j)+=s for every element of M and some value s. More...
|
| |
| template<class S > |
| void | elementwiseAddScalar (const S &s, typename EltResult< S >::Add &) const |
| |
| template<class S > |
| EltResult< S >::Add | elementwiseAddScalar (const S &s) const |
| |
| template<class S > |
| MatrixBase & | elementwiseSubtractScalarInPlace (const S &s) |
| | Set M(i,j)-=s for every element of M and some value s. More...
|
| |
| template<class S > |
| void | elementwiseSubtractScalar (const S &s, typename EltResult< S >::Sub &) const |
| |
| template<class S > |
| EltResult< S >::Sub | elementwiseSubtractScalar (const S &s) const |
| |
| template<class S > |
| MatrixBase & | elementwiseSubtractFromScalarInPlace (const S &s) |
| | Set M(i,j) = s - M(i,j) for every element of M and some value s. More...
|
| |
| template<class S > |
| void | elementwiseSubtractFromScalar (const S &, typename MatrixBase< S >::template EltResult< E >::Sub &) const |
| |
| template<class S > |
| MatrixBase< S >::template EltResult< E >::Sub | elementwiseSubtractFromScalar (const S &s) const |
| |
| template<class EE > |
| MatrixBase & | elementwiseMultiplyInPlace (const MatrixBase< EE > &) |
| | M(i,j) *= R(i,j); R must have same dimensions as this. More...
|
| |
| template<class EE > |
| void | elementwiseMultiply (const MatrixBase< EE > &, typename EltResult< EE >::Mul &) const |
| |
| template<class EE > |
| EltResult< EE >::Mul | elementwiseMultiply (const MatrixBase< EE > &m) const |
| |
| template<class EE > |
| MatrixBase & | elementwiseMultiplyFromLeftInPlace (const MatrixBase< EE > &) |
| | M(i,j) = R(i,j) * M(i,j); R must have same dimensions as this. More...
|
| |
| template<class EE > |
| void | elementwiseMultiplyFromLeft (const MatrixBase< EE > &, typename MatrixBase< EE >::template EltResult< E >::Mul &) const |
| |
| template<class EE > |
| MatrixBase< EE >::template EltResult< E >::Mul | elementwiseMultiplyFromLeft (const MatrixBase< EE > &m) const |
| |
| template<class EE > |
| MatrixBase & | elementwiseDivideInPlace (const MatrixBase< EE > &) |
| | M(i,j) /= R(i,j); R must have same dimensions as this. More...
|
| |
| template<class EE > |
| void | elementwiseDivide (const MatrixBase< EE > &, typename EltResult< EE >::Dvd &) const |
| |
| template<class EE > |
| EltResult< EE >::Dvd | elementwiseDivide (const MatrixBase< EE > &m) const |
| |
| template<class EE > |
| MatrixBase & | elementwiseDivideFromLeftInPlace (const MatrixBase< EE > &) |
| | M(i,j) = R(i,j) / M(i,j); R must have same dimensions as this. More...
|
| |
| template<class EE > |
| void | elementwiseDivideFromLeft (const MatrixBase< EE > &, typename MatrixBase< EE >::template EltResult< E >::Dvd &) const |
| |
| template<class EE > |
| MatrixBase< EE >::template EltResult< EE >::Dvd | elementwiseDivideFromLeft (const MatrixBase< EE > &m) const |
| |
| MatrixBase & | setTo (const ELT &t) |
| | Fill every element in current allocation with given element (or NaN or 0). More...
|
| |
| MatrixBase & | setToNaN () |
| |
| MatrixBase & | setToZero () |
| |
| RowVectorView_< ELT > | row (int i) const |
| |
| RowVectorView_< ELT > | updRow (int i) |
| |
| VectorView_< ELT > | col (int j) const |
| |
| VectorView_< ELT > | updCol (int j) |
| |
| RowVectorView_< ELT > | operator[] (int i) const |
| |
| RowVectorView_< ELT > | operator[] (int i) |
| |
| VectorView_< ELT > | operator() (int j) const |
| |
| VectorView_< ELT > | operator() (int j) |
| |
| MatrixView_< ELT > | block (int i, int j, int m, int n) const |
| |
| MatrixView_< ELT > | updBlock (int i, int j, int m, int n) |
| |
| MatrixView_< ELT > | operator() (int i, int j, int m, int n) const |
| |
| MatrixView_< ELT > | operator() (int i, int j, int m, int n) |
| |
| MatrixView_< EHerm > | transpose () const |
| |
| MatrixView_< EHerm > | updTranspose () |
| |
| MatrixView_< EHerm > | operator~ () const |
| |
| MatrixView_< EHerm > | operator~ () |
| |
| VectorView_< ELT > | diag () const |
| | Select main diagonal (of largest leading square if rectangular) and return it as a read-only view of the diagonal elements of this Matrix. More...
|
| |
| VectorView_< ELT > | updDiag () |
| | Select main diagonal (of largest leading square if rectangular) and return it as a writable view of the diagonal elements of this Matrix. More...
|
| |
| VectorView_< ELT > | diag () |
| | This non-const version of diag() is an alternate name for updDiag() available for historical reasons. More...
|
| |
| TInvert | invert () const |
| |
| void | invertInPlace () |
| |
| void | dump (const char *msg=0) const |
| | Matlab-compatible debug output. More...
|
| |
| const ELT & | getElt (int i, int j) const |
| | Element selection for stored elements. More...
|
| |
| ELT & | updElt (int i, int j) |
| |
| const ELT & | operator() (int i, int j) const |
| |
| ELT & | operator() (int i, int j) |
| |
| void | getAnyElt (int i, int j, ELT &value) const |
| | This returns a copy of the element value for any position in the logical matrix, regardless of whether it is stored in memory. More...
|
| |
| ELT | getAnyElt (int i, int j) const |
| |
| ScalarNormSq | scalarNormSqr () const |
| | Scalar norm square is sum( squares of all scalars ). More...
|
| |
| void | abs (TAbs &mabs) const |
| | abs() is elementwise absolute value; that is, the return value has the same dimension as this Matrix but with each element replaced by whatever it thinks its absolute value is. More...
|
| |
| TAbs | abs () const |
| | abs() with the result as a function return. More...
|
| |
| TStandard | standardize () const |
| | Return a Matrix of the same shape and contents as this one but with the element type converted to one based on the standard C++ scalar types: float, double, complex<float>, complex<double>. More...
|
| |
| ScalarNormSq | normSqr () const |
| | This is the scalar Frobenius norm, and its square. More...
|
| |
| CNT< ScalarNormSq >::TSqrt | norm () const |
| |
| CNT< ScalarNormSq >::TSqrt | normRMS () const |
| | We only allow RMS norm if the elements are scalars. More...
|
| |
| RowVector_< ELT > | colSum () const |
| | Form the column sums of this matrix, returned as a RowVector. More...
|
| |
| RowVector_< ELT > | sum () const |
| | Alternate name for colSum(); behaves like the Matlab function sum(). More...
|
| |
| Vector_< ELT > | rowSum () const |
| | Form the row sums of this matrix, returned as a Vector. More...
|
| |
| const MatrixBase & | operator+ () const |
| |
| const TNeg & | negate () const |
| |
| TNeg & | updNegate () |
| |
| const TNeg & | operator- () const |
| |
| TNeg & | operator- () |
| |
| MatrixBase & | negateInPlace () |
| |
| MatrixBase & | resize (int m, int n) |
| | Change the size of this matrix. More...
|
| |
| MatrixBase & | resizeKeep (int m, int n) |
| | Change the size of this matrix, retaining as much of the old data as will fit. More...
|
| |
| void | lockShape () |
| |
| void | unlockShape () |
| |
| const MatrixView_< ELT > & | getAsMatrixView () const |
| |
| MatrixView_< ELT > & | updAsMatrixView () |
| |
| const Matrix_< ELT > & | getAsMatrix () const |
| |
| Matrix_< ELT > & | updAsMatrix () |
| |
| const VectorView_< ELT > & | getAsVectorView () const |
| |
| VectorView_< ELT > & | updAsVectorView () |
| |
| const Vector_< ELT > & | getAsVector () const |
| |
| Vector_< ELT > & | updAsVector () |
| |
| const VectorBase< ELT > & | getAsVectorBase () const |
| |
| VectorBase< ELT > & | updAsVectorBase () |
| |
| const RowVectorView_< ELT > & | getAsRowVectorView () const |
| |
| RowVectorView_< ELT > & | updAsRowVectorView () |
| |
| const RowVector_< ELT > & | getAsRowVector () const |
| |
| RowVector_< ELT > & | updAsRowVector () |
| |
| const RowVectorBase< ELT > & | getAsRowVectorBase () const |
| |
| RowVectorBase< ELT > & | updAsRowVectorBase () |
| |
| int | getNScalarsPerElement () const |
| | This is the number of consecutive scalars used to represent one element of type ELT. More...
|
| |
| int | getPackedSizeofElement () const |
| | This is like sizeof(ELT), but returning the number of bytes we use to store the element which may be fewer than what C++ would use. More...
|
| |
| bool | hasContiguousData () const |
| |
| ptrdiff_t | getContiguousScalarDataLength () const |
| |
| const Scalar * | getContiguousScalarData () const |
| |
| Scalar * | updContiguousScalarData () |
| |
| void | replaceContiguousScalarData (Scalar *newData, ptrdiff_t length, bool takeOwnership) |
| |
| void | replaceContiguousScalarData (const Scalar *newData, ptrdiff_t length) |
| |
| void | swapOwnedContiguousScalarData (Scalar *newData, ptrdiff_t length, Scalar *&oldData) |
| |
| | MatrixBase (MatrixHelperRep< Scalar > *hrep) |
| | Helper rep-stealing constructor. More...
|
| |
| template<class EE > |
| MatrixBase< ELT > & | rowScaleInPlace (const VectorBase< EE > &v) |
| |
| template<class EE > |
| void | rowScale (const VectorBase< EE > &v, typename MatrixBase< ELT >::template EltResult< EE >::Mul &out) const |
| |
| template<class EE > |
| MatrixBase< ELT > & | colScaleInPlace (const VectorBase< EE > &v) |
| |
| template<class EE > |
| void | colScale (const VectorBase< EE > &v, typename MatrixBase< ELT >::template EltResult< EE >::Mul &out) const |
| |
| template<class ER , class EC > |
| MatrixBase< ELT > & | rowAndColScaleInPlace (const VectorBase< ER > &r, const VectorBase< EC > &c) |
| |
| template<class S > |
| MatrixBase< ELT > & | elementwiseAssign (const S &s) |
| |
| template<class S > |
| MatrixBase< ELT > & | elementwiseAddScalarInPlace (const S &s) |
| |
| template<class S > |
| void | elementwiseAddScalar (const S &s, typename MatrixBase< ELT >::template EltResult< S >::Add &out) const |
| |
| template<class S > |
| MatrixBase< ELT > & | elementwiseSubtractScalarInPlace (const S &s) |
| |
| template<class S > |
| void | elementwiseSubtractScalar (const S &s, typename MatrixBase< ELT >::template EltResult< S >::Sub &out) const |
| |
| template<class S > |
| MatrixBase< ELT > & | elementwiseSubtractFromScalarInPlace (const S &s) |
| |
| template<class EE > |
| MatrixBase< ELT > & | elementwiseMultiplyInPlace (const MatrixBase< EE > &r) |
| |
| template<class EE > |
| void | elementwiseMultiply (const MatrixBase< EE > &r, typename MatrixBase< ELT >::template EltResult< EE >::Mul &out) const |
| |
| template<class EE > |
| MatrixBase< ELT > & | elementwiseMultiplyFromLeftInPlace (const MatrixBase< EE > &r) |
| |
| template<class EE > |
| MatrixBase< ELT > & | elementwiseDivideInPlace (const MatrixBase< EE > &r) |
| |
| template<class EE > |
| void | elementwiseDivide (const MatrixBase< EE > &r, typename MatrixBase< ELT >::template EltResult< EE >::Dvd &out) const |
| |
| template<class EE > |
| MatrixBase< ELT > & | elementwiseDivideFromLeftInPlace (const MatrixBase< EE > &r) |
| |
| | MatrixBase (const MatrixCommitment &commitment, const MatrixCharacter &character, int spacing, const Scalar *data) |
| | Construct a read-only view of pre-existing data. More...
|
| |
| | MatrixBase (const MatrixCommitment &commitment, const MatrixCharacter &character, int spacing, Scalar *data) |
| | Construct a writable view of pre-existing data. More...
|
| |