TMtx::Power Method

Overload List

#SignatureDescription
1TMtxVec *Power(const double Exponent);Raises base object elements to any power.
2TMtxVec *Power(const TCplx &Exponent);Raises all calling vector elements to complex power Exponent in-place.
3TMtxVec *Power(const double Base, TMtxVec *Exponent);Raises base elements to exponent power.
4TMtxVec *Power(const TCplx &Base, TMtxVec *Exponent);Raises Base complex value to Exponent object values powers.
5TMtxVec *Power(TMtxVec *Base, TMtxVec *Exponent);Raises each of Base object elements to corresponding power, stored in Exponenet elements.
6TMtxVec *Power(TMtxVec *Base, const TCplx &Exponent);Raises each of the Base object elements to complex Exponent power.
7TMtxVec *Power(TMtxVec *Base, const double Exponent);Raises each of the Base object elements to real Exponent power.

Overload 1: TMtxVec *Power(const double Exponent);

Raises base object elements to any power.

#NameTypeDescription
1Exponentconst double
Remarks:

Raises Base calling object elements to any power. The TMtx::IntPower is faster, if Exponent is an integer. Real valued power can handle only positive Exponent. TMtx::IntPower can handle negative exponent also. To compute a power to the negative exponent in general case or when the base is negative, use the complex version of the function.

See Also: TMtx::IntPower, TMtx::PowerVec
Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler

Overload 2: TMtxVec *Power(const TCplx &Exponent);

Raises all calling vector elements to complex power Exponent in-place.

#NameTypeDescription
1Exponentconst TCplx &
Remarks:

If the calling vector is real and has negative elements, the result will be NAN at those entries. To obtain a valid result in this case, extend the calling vector to complex with TMtx::ExtendToComplex method. In all real/complex combinations, the Power method will not automatically assume that a number is complex to speed up the computation.

Alternatively the user can of course always convert the real numbers to complex before passing them to the Power routine.

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

Overload 3: TMtxVec *Power(const double Base, TMtxVec *Exponent);

Raises base elements to exponent power.

#NameTypeDescription
1Baseconst double
2ExponentTMtxVec *
Remarks:

Raises Base value to Exponent object values powers and store the results to calling object values. Size and TMtx::Complex properties of calling object are adjusted automatically.

See Also: TMtx::PowerVec
Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler

Overload 4: TMtxVec *Power(const TCplx &Base, TMtxVec *Exponent);

Raises Base complex value to Exponent object values powers.

#NameTypeDescription
1Baseconst TCplx &
2ExponentTMtxVec *
Remarks:

Store the results to calling object values. Size and TMtx::Complex properties of calling object are adjusted automatically.

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

Overload 5: TMtxVec *Power(TMtxVec *Base, TMtxVec *Exponent);

Raises each of Base object elements to corresponding power, stored in Exponenet elements.

#NameTypeDescription
1BaseTMtxVec *
2ExponentTMtxVec *
Remarks:

Power[i] = Base[i]^Exponent[i]

Size and TMtx::Complex property of calling object are adjusted automatically. An exception is raised if Base and Exponent sizes do not match.

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

Overload 6: TMtxVec *Power(TMtxVec *Base, const TCplx &Exponent);

Raises each of the Base object elements to complex Exponent power.

#NameTypeDescription
1BaseTMtxVec *
2Exponentconst TCplx &
Remarks:

Size and TMtx::Complex properties of calling object are adjusted automatically.

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

Overload 7: TMtxVec *Power(TMtxVec *Base, const double Exponent);

Raises each of the Base object elements to real Exponent power.

#NameTypeDescription
1BaseTMtxVec *
2Exponentconst double
Remarks:

Size and TMtx::Complex properties of calling object are adjusted automatically.

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