Matrix::Size Method

Overload List

#SignatureDescription
1TMtxVec *Size(TMtxVec *Src) const;Size the object.
2TMtxVec *Size(TMtxVec *Src, bool AComplex) const;Allows the complex property of the calling object to become of AComplex value instead of Src.Complex value.
3TMtxVec *Size(TMtxVecBase *Src, const TMtxFloatPrecision aFloatPrecision) const;
4TMtx *Size(const int ARows, const int ACols, const bool AComplex, const bool aIsDouble) const;Sets the size of matrix.
5TMtx *Size(const int ARows, const int ACols, const TMtxFloatPrecision aFloatPrecision) const;Specifies size of the matrix.
6TMtx *Size(const int ARows, const int ACols, TMtxVec *aFloatPrecisionRef) const;Specifies size of the matrix.
7TMtx *Size(const int ARows, const int ACols, const bool AComplex) const;Sets the size of matrix.
8TMtx *Size(const int ARows, const int ACols) const;Sets the size of matrix.

Overload 1: TMtxVec *Size(TMtxVec *Src) const;

Size the object.

#NameTypeDescription
1SrcTMtxVec *
Remarks:

Assignes the size of the Src object to the calling object. If the calling object is a TVec object then the Src can be of any type, otherwise TMtx can only obtain size from a TMtx object and TSparseMtx can only obtain size from a TSparseMtx object.

If the calling object and Src are of different types, the complex property can be different, if both objects have a matching Matrix::Length property. In this case only the Complex property of the calling object will changed, while all other properties describing the size of the object (rows, cols, length, nonZeros) will be preserved. This is different from simply setting the Complex property. Changing the Complex property directly would also change the Length, Cols and NonZeros properties.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 2: TMtxVec *Size(TMtxVec *Src, bool AComplex) const;

Allows the complex property of the calling object to become of AComplex value instead of Src.Complex value.

#NameTypeDescription
1SrcTMtxVec *
2AComplexbool
Remarks:

It is also possible to pass the calling object as the Src with a different AComplex value. The value of the complex property can be changed without knowing the actual type of the object.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 3: TMtxVec *Size(TMtxVecBase *Src, const TMtxFloatPrecision aFloatPrecision) const;

#NameTypeDescription
1SrcTMtxVecBase *
2aFloatPrecisionconst TMtxFloatPrecision
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 4: TMtx *Size(const int ARows, const int ACols, const bool AComplex, const bool aIsDouble) const;

Sets the size of matrix.

#NameTypeDescription
1ARowsconst int
2AColsconst int
3AComplexconst bool
4aIsDoubleconst bool
Remarks:

Set the calling matrix properties:

Matrix::Rows = ARows, Matrix::Cols = ACols and See cref="Complex"/> = AComplex.

Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.

The floating point precision is defined with aIsDouble.

Note
The Size method performs an out-of-memory safe resize, if the matrix already has memory allocated. This prevents out of memory message for example when redefining the size of the matrix from single column to single row:

A.Rows := 10000; // matrix size = 0
A.Cols := 1;     // matrix size = 10000
// ...
A.Cols := 10000; // matrix size = 100 000 000 (problems here)
A.Rows := 1;     // matrix size = 10 000
See Also: Matrix::Rows, Matrix::Cols, Matrix::Complex
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 5: TMtx *Size(const int ARows, const int ACols, const TMtxFloatPrecision aFloatPrecision) const;

Specifies size of the matrix.

#NameTypeDescription
1ARowsconst int
2AColsconst int
3aFloatPrecisionconst TMtxFloatPrecision
Remarks:

Set the following matrix properties:

Matrix::Rows = ARows, Matrix::Cols = ACols and See cref="FloatPrecision"/> = aFloatPrecision.

Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 6: TMtx *Size(const int ARows, const int ACols, TMtxVec *aFloatPrecisionRef) const;

Specifies size of the matrix.

#NameTypeDescription
1ARowsconst int
2AColsconst int
3aFloatPrecisionRefTMtxVec *
Remarks:

Set the following matrix properties:

Matrix::Rows = ARows, Matrix::Cols = ACols and See cref="FloatPrecision"/> = aFloatPrecisionRef.FloatPrecision.

Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 7: TMtx *Size(const int ARows, const int ACols, const bool AComplex) const;

Sets the size of matrix.

#NameTypeDescription
1ARowsconst int
2AColsconst int
3AComplexconst bool
Remarks:

Set the calling matrix properties:

Matrix::Rows = ARows, Matrix::Cols = ACols and See cref="Complex"/> = AComplex.

Existing floating point precision is preserved. Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 8: TMtx *Size(const int ARows, const int ACols) const;

Sets the size of matrix.

#NameTypeDescription
1ARowsconst int
2AColsconst int
Remarks:

Set the calling matrix properties:

Matrix::Rows = ARows, Matrix::Cols = ACols and See cref="Complex"/> = false.

Existing floating point precision is preserved. Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler