Click or drag to resize

VectorMath

VectorMath section describes basic mathematical functions applied to elements of an array or elements of a vector:

VMElem

Each operation is available in three implementations:

  • For vector elements

  • For array elements

  • For a specified number of array elements starting from the specified offset:

    VMOffset

    In case of out-of-place implementation user may also set the offset in the resulting data set to place the result elements:

    VMRes Offset

    Example: Consider two vectors:

    VMExAB

    Consider we apply the following method:

    C#
    1Sqr(a,1,b,3,2);

    The resulting vector will be:

    VMEx Res

Operations

Operation

Description

Performance

VM 1

Computes second degree of vector(array) elements.

In place:

StaticSqrInPlace(Vector)

StaticSqrInPlace(Double)

StaticSqrInPlace(Double, Int32, Int32)

Out of place:

StaticSqr(Vector, Vector)

StaticSqr(Double, Double)

StaticSqr(Double, Int32, Double, Int32, Int32)

Result returning:

StaticSqr(Vector)

StaticSqr(Double)

StaticSqr(Double, Int32, Int32)

VM 2

Computes inverse of vector(array) elements.

In place:

StaticInvInPlace(Vector)

StaticInvInPlace(Double)

StaticInvInPlace(Double, Int32, Int32)

Out of place:

StaticInv(Vector, Vector)

StaticInv(Double, Double)

StaticInv(Double, Int32, Double, Int32, Int32)

Result returning:

StaticInv(Vector)

StaticInv(Double)

StaticInv(Double, Int32, Int32)

VM 3

Computes square root of vector(array) elements.

In place:

StaticSqrtInPlace(Vector)

StaticSqrtInPlace(Double)

StaticSqrtInPlace(Double, Int32, Int32)

Out of place:

StaticSqrt(Vector, Vector)

StaticSqrt(Double, Double)

StaticSqrt(Double, Int32, Double, Int32, Int32)

Result returning:

StaticSqrt(Vector)

StaticSqrt(Double)

StaticSqrt(Double, Int32, Int32)

VM 4

Computes inverse square root of vector(array) elements.

In place:

StaticInvSqrtInPlace(Vector)

StaticInvSqrtInPlace(Double)

StaticInvSqrtInPlace(Double, Int32, Int32)

Out of place:

StaticInvSqrt(Vector, Vector)

StaticInvSqrt(Double, Double)

StaticInvSqrt(Double, Int32, Double, Int32, Int32)

Result returning:

StaticInvSqrt(Vector)

StaticInvSqrt(Double)

StaticInvSqrt(Double, Int32, Int32)

VM 5

Computes cubic root of vector(array) elements.

In place:

StaticCbrtInPlace(Vector)

StaticCbrtInPlace(Double)

StaticCbrtInPlace(Double, Int32, Int32)

Out of place:

StaticCbrt(Vector, Vector)

StaticCbrt(Double, Double)

StaticCbrt(Double, Int32, Double, Int32, Int32)

Result returning:

StaticCbrt(Vector)

StaticCbrt(Double)

StaticCbrt(Double, Int32, Int32)

VM 6

Computes inverse cubic root of vector(array) elements.

In place:

StaticInvCbrtInPlace(Vector)

StaticInvCbrtInPlace(Double)

StaticInvCbrtInPlace(Double, Int32, Int32)

Out of place:

StaticInvCbrt(Vector, Vector)

StaticInvCbrt(Double, Double)

StaticInvCbrt(Double, Int32, Double, Int32, Int32)

Result returning:

StaticInvCbrt(Vector)

StaticInvCbrt(Double)

StaticInvCbrt(Double, Int32, Int32)

VM 7

Computes exponential of vector(array) elements.

In place:

StaticExpInPlace(Vector)

StaticExpInPlace(Double)

StaticExpInPlace(Double, Int32, Int32)

Out of place:

StaticExp(Vector, Vector)

StaticExp(Double, Double)

StaticExp(Double, Int32, Double, Int32, Int32)

Result returning:

StaticExp(Vector)

StaticExp(Double)

StaticExp(Double, Int32, Int32)

VM 8

Computes natural logarithm of vector(array) elements.

In place:

StaticLogInPlace(Vector)

StaticLogInPlace(Double)

StaticLogInPlace(Double, Int32, Int32)

Out of place:

StaticLog(Vector, Vector)

StaticLog(Double, Double)

StaticLog(Double, Int32, Double, Int32, Int32)

Result returning:

StaticLog(Vector)

StaticLog(Double)

StaticLog(Double, Int32, Int32)

VM 9

Computes sine of vector(array) elements.

In place:

StaticSinInPlace(Vector)

StaticSinInPlace(Double)

StaticSinInPlace(Double, Int32, Int32)

Out of place:

StaticSin(Vector, Vector)

StaticSin(Double, Double)

StaticSin(Double, Int32, Double, Int32, Int32)

Result returning:

StaticSin(Vector)

StaticSin(Double)

StaticSin(Double, Int32, Int32)

VM 10

Computes cosine of vector(array) elements.

In place:

StaticCosInPlace(Vector)

StaticCosInPlace(Double)

StaticCosInPlace(Double, Int32, Int32)

Out of place:

StaticCos(Vector, Vector)

StaticCos(Double, Double)

StaticCos(Double, Int32, Double, Int32, Int32)

Result returning:

StaticCos(Vector)

StaticCos(Double)

StaticCos(Double, Int32, Int32)

VM 11

Computes tangent of vector(array) elements.

In place:

StaticTanInPlace(Vector)

StaticTanInPlace(Double)

StaticTanInPlace(Double, Int32, Int32)

Out of place:

StaticTan(Vector, Vector)

StaticTan(Double, Double)

StaticTan(Double, Int32, Double, Int32, Int32)

Result returning:

StaticTan(Vector)

StaticTan(Double)

StaticTan(Double, Int32, Int32)

VM 12

Computes arcsine of vector(array) elements.

In place:

StaticArcSinInPlace(Vector)

StaticArcSinInPlace(Double)

StaticArcSinInPlace(Double, Int32, Int32)

Out of place:

StaticArcSin(Vector, Vector)

StaticArcSin(Double, Double)

StaticArcSin(Double, Int32, Double, Int32, Int32)

Result returning:

StaticArcSin(Vector)

StaticArcSin(Double)

StaticArcSin(Double, Int32, Int32)

VM 13

Computes arccosine of vector(array) elements.

In place:

StaticArcCosInPlace(Vector)

StaticArcCosInPlace(Double)

StaticArcCosInPlace(Double, Int32, Int32)

Out of place:

StaticArcCos(Vector, Vector)

StaticArcCos(Double, Double)

StaticArcCos(Double, Int32, Double, Int32, Int32)

Result returning:

StaticArcCos(Vector)

StaticArcCos(Double)

StaticArcCos(Double, Int32, Int32)

VM 14

Computes arctangent of vector(array) elements.

In place:

StaticArcTanInPlace(Vector)

StaticArcTanInPlace(Double)

StaticArcTanInPlace(Double, Int32, Int32)

Out of place:

StaticArcTan(Vector, Vector)

StaticArcTan(Double, Double)

StaticArcTan(Double, Int32, Double, Int32, Int32)

Result returning:

StaticArcTan(Vector)

StaticArcTan(Double)

StaticArcTan(Double, Int32, Int32)

VM 15

Computes hyperbolic sine of vector(array) elements.

In place:

StaticSinhInPlace(Vector)

StaticSinhInPlace(Double)

StaticSinhInPlace(Double, Int32, Int32)

Out of place:

StaticSinh(Vector, Vector)

StaticSinh(Double, Double)

StaticSinh(Double, Int32, Double, Int32, Int32)

Result returning:

StaticSinh(Vector)

StaticSinh(Double)

StaticSinh(Double, Int32, Int32)

VM 16

Computes hyperbolic cosine of vector(array) elements.

In place:

StaticCoshInPlace(Vector)

StaticCoshInPlace(Double)

StaticCoshInPlace(Double, Int32, Int32)

Out of place:

StaticCosh(Vector, Vector)

StaticCosh(Double, Double)

StaticCosh(Double, Int32, Double, Int32, Int32)

Result returning:

StaticCosh(Vector)

StaticCosh(Double)

StaticCosh(Double, Int32, Int32)

VM 17

Computes hyperbolic tangent of vector(array) elements.

In place:

StaticTanhInPlace(Vector)

StaticTanhInPlace(Double)

StaticTanhInPlace(Double, Int32, Int32)

Out of place:

StaticTanh(Vector, Vector)

StaticTanh(Double, Double)

StaticTanh(Double, Int32, Double, Int32, Int32)

Result returning:

StaticTanh(Vector)

StaticTanh(Double)

StaticTanh(Double, Int32, Int32)

VM 18

Computes hyperbolic arcsine of vector(array) elements.

In place:

StaticArcSinhInPlace(Vector)

StaticArcSinhInPlace(Double)

StaticArcSinhInPlace(Double, Int32, Int32)

Out of place:

StaticArcSinh(Vector, Vector)

StaticArcSinh(Double, Double)

StaticArcSinh(Double, Int32, Double, Int32, Int32)

Result returning:

StaticArcSinh(Vector)

StaticArcSinh(Double)

StaticArcSinh(Double, Int32, Int32)

VM 19

Computes hyperbolic arccosine of vector(array) elements.

In place:

StaticArcCoshInPlace(Vector)

StaticArcCoshInPlace(Double)

StaticArcCoshInPlace(Double, Int32, Int32)

Out of place:

StaticArcCosh(Vector, Vector)

StaticArcCosh(Double, Double)

StaticArcCosh(Double, Int32, Double, Int32, Int32)

Result returning:

StaticArcCosh(Vector)

StaticArcCosh(Double)

StaticArcCosh(Double, Int32, Int32)

VM 20

Computes hyperbolic arctangent of vector(array) elements.

In place:

StaticArcTanhInPlace(Vector)

StaticArcTanhInPlace(Double)

StaticArcTanhInPlace(Double, Int32, Int32)

Out of place:

StaticArcTanh(Vector, Vector)

StaticArcTanh(Double, Double)

StaticArcTanh(Double, Int32, Double, Int32, Int32)

Result returning:

StaticArcTanh(Vector)

StaticArcTanh(Double)

StaticArcTanh(Double, Int32, Int32)

VM 21

Computes rounding-up of vector(array) elements.

In place:

StaticCeilingInPlace(Vector)

StaticCeilingInPlace(Double)

StaticCeilingInPlace(Double, Int32, Int32)

Out of place:

StaticCeiling(Vector, Vector)

StaticCeiling(Double, Double)

StaticCeiling(Double, Int32, Double, Int32, Int32)

Result returning:

StaticCeiling(Vector)

StaticCeiling(Double)

StaticCeiling(Double, Int32, Int32)

VM 22

Computes rounding-down of vector(array) elements.

In place:

StaticFloorInPlace(Vector)

StaticFloorInPlace(Double)

StaticFloorInPlace(Double, Int32, Int32)

Out of place:

StaticFloor(Vector, Vector)

StaticFloor(Double, Double)

StaticFloor(Double, Int32, Double, Int32, Int32)

Result returning:

StaticFloor(Vector)

StaticFloor(Double)

StaticFloor(Double, Int32, Int32)

VM 23

Computes rounding nearest integer of vector(array) elements.

In place:

StaticRoundInPlace(Vector)

StaticRoundInPlace(Double)

StaticRoundInPlace(Double, Int32, Int32)

Out of place:

StaticRound(Vector, Vector)

StaticRound(Double, Double)

StaticRound(Double, Int32, Double, Int32, Int32)

Result returning:

StaticRound(Vector)

StaticRound(Double)

StaticRound(Double, Int32, Int32)

VM 24

Computes truncating of fractional part of vector(array) elements.

In place:

StaticTruncateInPlace(Vector)

StaticTruncateInPlace(Double)

StaticTruncateInPlace(Double, Int32, Int32)

Out of place:

StaticTruncate(Vector, Vector)

StaticTruncate(Double, Double)

StaticTruncate(Double, Int32, Double, Int32, Int32)

Result returning:

StaticTruncate(Vector)

StaticTruncate(Double)

StaticTruncate(Double, Int32, Int32)

VM 25

Computes error function of vector(array) elements.

VMErf

In place:

StaticErfInPlace(Vector)

StaticErfInPlace(Double)

StaticErfInPlace(Double, Int32, Int32)

Out of place:

StaticErf(Vector, Vector)

StaticErf(Double, Double)

StaticErf(Double, Int32, Double, Int32, Int32)

Result returning:

StaticErf(Vector)

StaticErf(Double)

StaticErf(Double, Int32, Int32)

VM 26

Computes complementary error function of vector(array) elements.

VMErfc

In place:

StaticErfcInPlace(Vector)

StaticErfcInPlace(Double)

StaticErfcInPlace(Double, Int32, Int32)

Out of place:

StaticErfc(Vector, Vector)

StaticErfc(Double, Double)

StaticErfc(Double, Int32, Double, Int32, Int32)

Result returning:

StaticErfc(Vector)

StaticErfc(Double)

StaticErfc(Double, Int32, Int32)

VM 27

Computes inverse error function of vector(array) elements.

In place:

StaticErfInvInPlace(Vector)

StaticErfInvInPlace(Double)

StaticErfInvInPlace(Double, Int32, Int32)

Out of place:

StaticErfInv(Vector, Vector)

StaticErfInv(Double, Double)

StaticErfInv(Double, Int32, Double, Int32, Int32)

Result returning:

StaticErfInv(Vector)

StaticErfInv(Double)

StaticErfInv(Double, Int32, Int32)

VM 28

Computes inverse complementary error function of vector(array) elements.

In place:

StaticErfcInvInPlace(Vector)

StaticErfcInvInPlace(Double)

StaticErfcInvInPlace(Double, Int32, Int32)

Out of place:

StaticErfcInv(Vector, Vector)

StaticErfcInv(Double, Double)

StaticErfcInv(Double, Int32, Double, Int32, Int32)

Result returning:

StaticErfcInv(Vector)

StaticErfcInv(Double)

StaticErfcInv(Double, Int32, Int32)

VM 29

Computes normal cummulative distribution function of vector(array) elements.

VMNormal Cdf

In place:

StaticNormalCdfInPlace(Vector)

StaticNormalCdfInPlace(Double)

StaticNormalCdfInPlace(Double, Int32, Int32)

Out of place:

StaticNormalCdf(Vector, Vector)

StaticNormalCdf(Double, Double)

StaticNormalCdf(Double, Int32, Double, Int32, Int32)

Result returning:

StaticNormalCdf(Vector)

StaticNormalCdf(Double)

StaticNormalCdf(Double, Int32, Int32)

VM 30

Computes inverse normal cummulative distribution function of vector(array) elements.

In place:

StaticNormalCdfInvInPlace(Vector)

StaticNormalCdfInvInPlace(Double)

StaticNormalCdfInvInPlace(Double, Int32, Int32)

Out of place:

StaticNormalCdfInv(Vector, Vector)

StaticNormalCdfInv(Double, Double)

StaticNormalCdfInv(Double, Int32, Double, Int32, Int32)

Result returning:

StaticNormalCdfInv(Vector)

StaticNormalCdfInv(Double)

StaticNormalCdfInv(Double, Int32, Int32)

VM 31

Computes gamma function of vector(array) elements.

VMGamma

In place:

StaticGammaInPlace(Vector)

StaticGammaInPlace(Double)

StaticGammaInPlace(Double, Int32, Int32)

Out of place:

StaticGamma(Vector, Vector)

StaticGamma(Double, Double)

StaticGamma(Double, Int32, Double, Int32, Int32)

Result returning:

StaticGamma(Vector)

StaticGamma(Double)

StaticGamma(Double, Int32, Int32)

VM 32

Computes log gamma function of vector(array) elements.

VMGamma Ln

In place:

StaticGammaLnInPlace(Vector)

StaticGammaLnInPlace(Double)

StaticGammaLnInPlace(Double, Int32, Int32)

Out of place:

StaticGammaLn(Vector, Vector)

StaticGammaLn(Double, Double)

StaticGammaLn(Double, Int32, Double, Int32, Int32)

Result returning:

StaticGammaLn(Vector)

StaticGammaLn(Double)

StaticGammaLn(Double, Int32, Int32)

VM 33

Raises each element of a vector to the constant power.

In place:

StaticPowInPlace(Vector, Double)

StaticPowInPlace(Double, Double)

StaticPowInPlace(Double, Int32, Int32, Double)

Out of place:

StaticPow(Vector, Double, Vector)

StaticPow(Double, Double, Double)

StaticPow(Double, Int32, Double, Double, Int32, Int32)

Result returning:

StaticPow(Vector, Double)

StaticPow(Double, Double)

StaticPow(Double, Int32, Int32, Double)