TMtxVec *PowerVec(TMtxVec *Base, TMtxVec *Exponent) const;
Raises Base object elements to Exponent object elements power.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Base | TMtxVec * | |
| 2 | Exponent | TMtxVec * |
Remarks:
Raises Base elements to Exponent elements power. Only positive exponents can be handled if exponent object Vector::Complex property is True.
Examples
#include "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Vector a, b, c;
a.SetIt(true, DewArray<double>{1, 2, 3, 4});
b.SetIt(true, DewArray<double>{3, 3, 2, 2});
c.PowerVec(a, b); // c = [1,8,9,16]
}
See Also: Vector::Power
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler