Dew MtxVec NET
TMtxVec.Power Methods
Summary
Raises base object elements to any power.

Class
TMtxVec

Declaration
Function Power(Base: TMtxVec; Exponent: TSample): TMtxVec;

Description
Raises each of the Base object elements to real Exponent power. Size and Complex properties of calling object are adjusted automatically.
Declaration
Function Power(Exponent: TCplx): TMtxVec;

Description
Raises all calling vector elements to complex power Exponent in-place. 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 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.
Declaration
Function Power(Exponent: TSample): TMtxVec;

Description
Raises Base calling object elements to any power. The IntPower is faster, if Exponent is an integer. Real valued power can handle only positive Exponent. 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 
IntPower 
PowerVec 

Example 1

var a: TVec; begin CreateIt(a); try a.SetIt(False,[1,2,3,4]); a.Power(1.2); finally FreeIt(a); end; end;


Declaration
Function Power(Base: TMtxVec; Exponent: TCplx): TMtxVec;

Description
Raises each of the Base object elements to complex Exponent power. Size and
Complex properties of calling object are adjusted automatically.
Declaration
Function Power(Base: TCplx; Exponent: TMtxVec): TMtxVec;

Description
Raises Base complex value to Exponent object values powers and store the results to calling object values. Size and Complex properties of calling object are adjusted automatically.
Declaration
Function Power(Base, Exponent: TMtxVec): TMtxVec;

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

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

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


Declaration
Function Power(Base: TSample; Exponent: TMtxVec): TMtxVec;
Summary
Raises base elements to exponent power.
Description
Raises Base value to Exponent object values powers and store the results to calling object values. Size and Complex properties of calling object are adjusted automatically.
 See Also 
PowerVec 

Copyright 2008 Dew Research
http://www.dewresearch.com