TMtx::Size Method

Overload List

#SignatureDescription
1TMtxVec *Size(TMtxVecBase *Src);Size the object.
2TMtx *Size(const int ARows, const int ACols, const bool AComplex, const bool aIsDouble);Sets the size of matrix.
3TMtx *Size(const int ARows, const int ACols, const bool AComplex);Sets the size of matrix.
4TMtx *Size(const int ARows, const int ACols);Sets the size of matrix.
5TMtx *Size(int ARows, int ACols, TMtxFloatPrecision aFloatPrecision);Sets the size of matrix.
6TMtx *Size(int ARows, int ACols, TMtxVec *FloatPrecisionRef);Sets the size of matrix.
7TMtxVec *Size(TMtxVecBase *Src, bool AComplex);
8TMtxVec *Size(TMtxVecBase *Src, const TMtxFloatPrecision aFloatPrecision);

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

Size the object.

#NameTypeDescription
1SrcTMtxVecBase *
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 TMtx::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::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler

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

Sets the size of matrix.

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

Set the calling matrix properties:

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

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: TMtx::Rows, TMtx::Cols, TMtx::Complex
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler

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

Sets the size of matrix.

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

Set the calling matrix properties:

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

The existing floating point precision is preserved.

See Also: TMtx::Rows, TMtx::Cols, TMtx::Complex
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler

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

Sets the size of matrix.

#NameTypeDescription
1ARowsconst int
2AColsconst int
Remarks:

Set the calling matrix properties:

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

The existing floating point precision is preserved.

See Also: TMtx::Rows, TMtx::Cols, TMtx::Complex
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler

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

Sets the size of matrix.

#NameTypeDescription
1ARowsint
2AColsint
3aFloatPrecisionTMtxFloatPrecision
Remarks:

Set the calling matrix properties:

If the aFloatPrecision parameter is omitted, the default value mvDouble is used. Calling the Size method does not preserve the contents of the matrix. Use the Resize method, if you want to preserve existing values.

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.

Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler

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

Sets the size of matrix.

#NameTypeDescription
1ARowsint
2AColsint
3FloatPrecisionRefTMtxVec *
Remarks:

Set the calling matrix properties:

Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler

Overload 7: TMtxVec *Size(TMtxVecBase *Src, bool AComplex);

#NameTypeDescription
1SrcTMtxVecBase *
2AComplexbool
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler

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

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