TVec::IntPower Method

Overload List

#SignatureDescription
1TMtxVec *IntPower(int Exponent);Power (integer exponent).
2TMtxVec *IntPower(TMtxVec *Base, int Exponent);Calculate the power Base^(Exponent) for all Base object elements.

Overload 1: TMtxVec *IntPower(int Exponent);

Power (integer exponent).

#NameTypeDescription
1Exponentint
Remarks:

Calculate the power ^(Exponent) for all caling object elements using the integer parameter Exponent. For non integer exponents, the TVec::Power and TVec::PowerVec methods can be used.

Examples
#include "MtxVec.h"
#include "Units.MtxVec.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVec;

void Example()
{
    TVec* a;

    CreateIt(a);
    a->SetIt(false, DewArray<double>{1, 2, 3, 4});
    a->IntPower(3);
    FreeIt(a);
}
See Also: TVec::Power, TVec::PowerVec
Declared in Dew::Math::TMtxVec · Dew.Math/AbstractMtxVec.h · Cross-compiler

Overload 2: TMtxVec *IntPower(TMtxVec *Base, int Exponent);

Calculate the power Base^(Exponent) for all Base object elements.

#NameTypeDescription
1BaseTMtxVec *
2Exponentint
Remarks:

Calclation uses the integer Exponent value and stores the results in calling object. Size and TVec::Complex properties of calling object are adjusted automatically.

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