clMatrix.Normalize Method

Overload List

#SignatureDescription
1TOpenCLMtxVec Normalize(TOpenCLMtxVec Vec, TCplx SubOffset, Double DivFactor)Normalize Vec object by subtracting a complex constant SubOffset from Vec elements and dividing the result by real constant DivFactor.
└ indexed: TOpenCLMtxVec Normalize(TOpenCLMtxVec Vec, TCplx SubOffset, Double DivFactor, Int32 VecIndex, Int32 Index, Int32 Len)
2TOpenCLMtxVec Normalize(TOpenCLMtxVec Vec, Double SubOffset, Double DivFactor)Normalize object.
└ indexed: TOpenCLMtxVec Normalize(TOpenCLMtxVec Vec, Double SubOffset, Double DivFactor, Int32 VecIndex, Int32 Index, Int32 Len)

Overload 1: TOpenCLMtxVec Normalize(TOpenCLMtxVec Vec, TCplx SubOffset, Double DivFactor)

Normalize Vec object by subtracting a complex constant SubOffset from Vec elements and dividing the result by real constant DivFactor.

#NameTypeDescription
1VecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2SubOffsetTCplxscalar
3DivFactorDoublescalar

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

Remarks:

Size and Dew.Math.clMatrix.Complex property of calling object are adjusted automatically.

Indexed: TOpenCLMtxVec Normalize(TOpenCLMtxVec Vec, TCplx SubOffset, Double DivFactor, Int32 VecIndex, Int32 Index, Int32 Len)

Normalize Vec object complex values [VecIndex]..[VecIndex+Len-1] by subtracting a complex constant SubOffset from Vec elements and dividing the result by real constant DivFactor.

#NameTypeDescription
1VecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2SubOffsetTCplxscalar
3DivFactorDoublescalar
4VecIndexInt32
5IndexInt32start index
6LenInt32element count

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

Remarks:

Store the results in calling vector complex values [Index]..[Index+Len-1]. An exception is calling object is not complex or array borders are overrun/underrun.

Overload 2: TOpenCLMtxVec Normalize(TOpenCLMtxVec Vec, Double SubOffset, Double DivFactor)

Normalize object.

#NameTypeDescription
1VecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2SubOffsetDoublescalar
3DivFactorDoublescalar

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

Remarks:

Normalizes Vec object by subtracting a constant Offset from Vec elements and dividing the result by constant Factor:

V[k]=Vec[k]OffsetFactor\text{V}[k]=\frac{\text{Vec}[k]-\text{Offset}}{\text{Factor}}

The results are stored in calling object. Use this method if you want to do a multiply and add (scale and offset) operations in a single method call.

Examples
clMatrix a;
clMatrix b;
a.CopyFromArray(2,2,TSingleArray.Create(1,2,3,4));
b.Normalize(a,2,3);
See Also: clMatrix.Add, clMatrix.Scale

Indexed: TOpenCLMtxVec Normalize(TOpenCLMtxVec Vec, Double SubOffset, Double DivFactor, Int32 VecIndex, Int32 Index, Int32 Len)

Normalize Vec object values [VecIndex]..[VecIndex+Len-1] by subtracting a real constant SubOffset from Vec elements and dividing the result by complex constant DivFactor.

#NameTypeDescription
1VecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2SubOffsetDoublescalar
3DivFactorDoublescalar
4VecIndexInt32
5IndexInt32start index
6LenInt32element count

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

Remarks:

Store the results in calling vector values [Index]..[Index+Len-1]. An exception is raised if Vec or calling object is complex or array borders are overrun/underrun.