TSparseMtx.Size Method

Overload List

#SignatureDescription
1TMtxVec Size(TMtxVecBase Src, TMtxFloatPrecision aFloatPrecision)Sets sparse matrix size to match Src with new aFloatPrecision.
2TMtxVec Size(TMtxVecBase Src, Boolean AComplex)The size of sparse matrix.
3void Size(Int32 RowCount, Int32 ColCount, Int32 NonZeroCount, TMtxFloatPrecision aFloatPrecision)Define sparse matrix size in single pass.
4TMtxVec Size(TMtxVecBase Src)Size the object.

Overload 1: TMtxVec Size(TMtxVecBase Src, TMtxFloatPrecision aFloatPrecision)

Sets sparse matrix size to match Src with new aFloatPrecision.

#NameTypeDescription
1SrcTMtxVecBasesource TVec, TMtx, TVecInt or TMtxInt
2aFloatPrecisionTMtxFloatPrecision

Result: stored in self (calling object), returns self for chaining

Overload 2: TMtxVec Size(TMtxVecBase Src, Boolean AComplex)

The size of sparse matrix.

#NameTypeDescription
1SrcTMtxVecBasesource TVec, TMtx, TVecInt or TMtxInt
2AComplexBoolean

Result: stored in self (calling object), returns self for chaining

Remarks:

Defines the calling matrix size to match those of the AMtxVec objects. If AComplex is true, calling sparse matrix Dew.Math.TMtxVec.Complex property is set to true.

Examples
SparseA.Size(3,4,5,false);
// is the same as calling this sequence
SparseA.Complex = false;
SparseA.Rows = 3;
SparseA.Cols = 4;
SparseA.NonZeros = 5;

Overload 3: void Size(Int32 RowCount, Int32 ColCount, Int32 NonZeroCount, TMtxFloatPrecision aFloatPrecision)

Define sparse matrix size in single pass.

#NameTypeDescription
1RowCountInt32
2ColCountInt32
3NonZeroCountInt32
4aFloatPrecisionTMtxFloatPrecision

Result: stored in self (calling object)

Remarks:

Define the sparse matrix size to RowCount Dew.Math.TSparseMtx.Rows, ColCount Dew.Math.TSparseMtx.Cols, NonZeroCount non-zero elements (the Dew.Math.TSparseMtx.NonZeros property) and define the matrix to be complex if IsComplex is true.

Overload 4: TMtxVec Size(TMtxVecBase Src)

Size the object.

#NameTypeDescription
1SrcTMtxVecBasesource TVec, TMtx, TVecInt or TMtxInt

Result: stored in self (calling object), returns self for chaining

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 Dew.Math.TMtxVecBase.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.