TSparseMtx::TruncAndFrac Method

Overload List

#SignatureDescription
1void TruncAndFrac(TMtxVec *TruncDst, TDenseMtxVec *FracDst);Rounds a real number towards zero and returns the fractional part.
2void TruncAndFrac(TMtxVec *TruncDst, TDenseMtxVec *FracDst, int TruncIdx, int FracIdx, int Index, int Len);Truncate calling object elements [Index]..[Index+Len-1] and store the results to TruncDst object elements [TruncIdx]..[TruncIdx+Len-1].

Overload 1: void TruncAndFrac(TMtxVec *TruncDst, TDenseMtxVec *FracDst);

Rounds a real number towards zero and returns the fractional part.

#NameTypeDescription
1TruncDstTMtxVec *
2FracDstTDenseMtxVec *
Remarks:

Rounds all calling object elements towards zero to an integer and stores the result in the TruncDst object as floating point numbers. The fractional part is stored in the FracDst.

See Also: TSparseMtx::Frac, TSparseMtx::Round
Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler

Overload 2: void TruncAndFrac(TMtxVec *TruncDst, TDenseMtxVec *FracDst, int TruncIdx, int FracIdx, int Index, int Len);

Truncate calling object elements [Index]..[Index+Len-1] and store the results to TruncDst object elements [TruncIdx]..[TruncIdx+Len-1].

#NameTypeDescription
1TruncDstTMtxVec *
2FracDstTDenseMtxVec *
3TruncIdxint
4FracIdxint
5Indexint
6Lenint
Remarks:

The fractional parts are saved in FracDst elements [FracIdx]..[FracIdx+Len-1]. Size and TSparseMtx::Complex property of calling object must be set explicitly to match those of Src object. An exception is raised if array borders are overrun/underrun.

Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler