Vector.Normalize Method

Overload List

#SignatureDescription
1TMtxVec Normalize(TCplx SubOffset, TCplx DivFactor)Normalize by subtracting a complex constant SubOffset from Vec elements and dividing the result by complex constant DivFactor.
└ indexed: TMtxVec Normalize(TCplx SubOffset, TCplx DivFactor, Int32 Index, Int32 Len)
2TMtxVec Normalize(TCplx SubOffset, Double DivFactor)Normalize object by subtracting a complex constant SubOffset from elements and dividing the result by real constant DivFactor.
└ indexed: TMtxVec Normalize(TCplx SubOffset, Double DivFactor, Int32 Index, Int32 Len)
3TMtxVec Normalize(TMtxVec Vec, TCplx SubOffset, TCplx DivFactor)Normalize Vec object by subtracting a complex constant SubOffset from Vec elements and dividing the result by complex constant DivFactor.
└ indexed: TMtxVec Normalize(TMtxVec Vec, TCplx SubOffset, TCplx DivFactor, Int32 VecIndex, Int32 Index, Int32 Len)
4TMtxVec Normalize(TMtxVec 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: TMtxVec Normalize(TMtxVec Vec, TCplx SubOffset, Double DivFactor, Int32 VecIndex, Int32 Index, Int32 Len)
5TMtxVec Normalize(TMtxVec Vec, Double SubOffset, Double DivFactor)Normalize object.
└ indexed: TMtxVec Normalize(TMtxVec Vec, Double SubOffset, Double DivFactor, Int32 VecIndex, Int32 Index, Int32 Len)
6TMtxVec Normalize(Double SubOffset, Double DivFactor)Normalize data.
└ indexed: TMtxVec Normalize(Double SubOffset, Double DivFactor, Int32 Index, Int32 Len)

Overload 1: TMtxVec Normalize(TCplx SubOffset, TCplx DivFactor)

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

#NameTypeDescription
1SubOffsetTCplxscalar
2DivFactorTCplxscalar

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

Remarks:

Size and Dew.Math.Vector.Complex property of calling object are adjusted automatically. An exception is raised, if object is complex.

Indexed: TMtxVec Normalize(TCplx SubOffset, TCplx DivFactor, Int32 Index, Int32 Len)

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

#NameTypeDescription
1SubOffsetTCplxscalar
2DivFactorTCplxscalar
3IndexInt32start index
4LenInt32element count

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

Remarks:

An exception is raised, if object is not complex or array borders are overrun/underrun.

Overload 2: TMtxVec Normalize(TCplx SubOffset, Double DivFactor)

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

#NameTypeDescription
1SubOffsetTCplxscalar
2DivFactorDoublescalar

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

Remarks:

An exception is raised, if object is not complex.

Indexed: TMtxVec Normalize(TCplx SubOffset, Double DivFactor, Int32 Index, Int32 Len)

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

#NameTypeDescription
1SubOffsetTCplxscalar
2DivFactorDoublescalar
3IndexInt32start index
4LenInt32element 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 raised, if the calling object is not complex or array borders are overrun/underrun.

Overload 3: TMtxVec Normalize(TMtxVec Vec, TCplx SubOffset, TCplx DivFactor)

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

#NameTypeDescription
1VecTMtxVecsource TVec or TMtx
2SubOffsetTCplxscalar
3DivFactorTCplxscalar

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

Remarks:

Size and Dew.Math.Vector.Complex property of calling object are adjusted automatically. An exception is raised if Vec is complex.

Indexed: TMtxVec Normalize(TMtxVec Vec, TCplx SubOffset, TCplx 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 complex constant DivFactor.

#NameTypeDescription
1VecTMtxVecsource TVec or TMtx
2SubOffsetTCplxscalar
3DivFactorTCplxscalar
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 raised if Vec or calling object is not complex or array borders are overrun/underrun.

Overload 4: TMtxVec Normalize(TMtxVec 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
1VecTMtxVecsource TVec or TMtx
2SubOffsetTCplxscalar
3DivFactorDoublescalar

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

Remarks:

Size and Dew.Math.Vector.Complex property of calling object are adjusted automatically. An exception is raised if Vec is complex.

Indexed: TMtxVec Normalize(TMtxVec 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
1VecTMtxVecsource TVec or TMtx
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 raised if Vec or calling object is not complex or array borders are overrun/underrun.

Overload 5: TMtxVec Normalize(TMtxVec Vec, Double SubOffset, Double DivFactor)

Normalize object.

#NameTypeDescription
1VecTMtxVecsource TVec or TMtx
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
Vector a;
Vector b;
a.SetIt(false,new double[] {1,2,3,4});
b.Normalize(a,2,3);
See Also: Vector.Offset, Vector.Scale

Indexed: TMtxVec Normalize(TMtxVec 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
1VecTMtxVecsource TVec or TMtx
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.

Overload 6: TMtxVec Normalize(Double SubOffset, Double DivFactor)

Normalize data.

#NameTypeDescription
1SubOffsetDoublescalar
2DivFactorDoublescalar

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

Remarks:

Normalizes values in the calling object by subtracting a constant Offset from 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
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TVec a;
        MtxVec.CreateIt(out a);
        try
        {
            a.SetIt(false,new double[] {1,2,3,4});  // a = [1,2,3,4]
            a.Normalize(2,3);
        }
        finally
        {
            MtxVec.FreeIt(ref a);
        }
    }
}
See Also: TDenseMtxVec.Offset, Vector.Scale

Indexed: TMtxVec Normalize(Double SubOffset, Double DivFactor, Int32 Index, Int32 Len)

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

#NameTypeDescription
1SubOffsetDoublescalar
2DivFactorDoublescalar
3IndexInt32start index
4LenInt32element 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.