clVector::Inv Method

Overload List

#SignatureDescription
1TOpenCLMtxVec *Inv() const;Inverse elements.
2TOpenCLMtxVec *Inv(int Index, int Len) const;Calculate the inverse of calling object elements [Index]..[Index+Len-1] in-place.
3TOpenCLMtxVec *Inv(TOpenCLMtxVec *X) const;Calculate the inverse of all X object elements without limiting operating.
4TOpenCLMtxVec *Inv(TOpenCLMtxVec *X, int XIndex, int Index, int Len) const;Calculate the inverse of X object elements [XIndex]..[XIndex+Len-1] without limiting operating.

Overload 1: TOpenCLMtxVec *Inv() const;

Inverse elements.

Remarks:

Calculates the inverse of all calling object elements in-place without limiting inverse operation.

Examples
#include "clMtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    clVector a, b;

    a.CopyFromArray(DewArray<float>{1, 2, 3, 4}); // a = [1, 2, 3, 4]
    b.Inv(a); // b = [1.0, 0.5, 0.3333, 0.25]
}
See Also: clVector::Divide
Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 2: TOpenCLMtxVec *Inv(int Index, int Len) const;

Calculate the inverse of calling object elements [Index]..[Index+Len-1] in-place.

#NameTypeDescription
1Indexint
2Lenint
Remarks:

An exception is raised if array borders are overrun/underrun.

Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 3: TOpenCLMtxVec *Inv(TOpenCLMtxVec *X) const;

Calculate the inverse of all X object elements without limiting operating.

#NameTypeDescription
1XTOpenCLMtxVec *
Remarks:

Store the results in calling object. Size and clVector::Complex property of calling object are adjusted automatically.

Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 4: TOpenCLMtxVec *Inv(TOpenCLMtxVec *X, int XIndex, int Index, int Len) const;

Calculate the inverse of X object elements [XIndex]..[XIndex+Len-1] without limiting operating.

#NameTypeDescription
1XTOpenCLMtxVec *
2XIndexint
3Indexint
4Lenint
Remarks:

Store the results in calling object elements [Index]..[Index+Len-1]. An exception is raised if X and calling object clVector::Complex property does not match or array borders are overrun/underrun.

Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler