Vector.Erf Method

Overload List

#SignatureDescription
1function Erf: TMtxVec;Error function of self (in-place).
└ indexed: function Erf(Index: Integer; Len: Integer): TMtxVec;
2function Erf(const Src: TMtxVec): TMtxVec;Error function of Src; result stored in self.
└ indexed: function Erf(const Src: TMtxVec; SrcIndex: Integer; Index: Integer; Len: Integer): TMtxVec;

Overload 1: function Erf: TMtxVec;

Error function of self (in-place).

Result: stored in self (calling object), returns self for chaining

Examples
var
    a, expected: Vector;
begin
    a := [0.0, 0.5, 1.0, 2.0];
    a.Erf;
    expected := [0.0, 0.520499877813047, 0.842700792949715, 0.995322265018953];
    if not a.IsEqual(expected, 1e-10, TCompare.cmpAbsolute) then
        raise Exception.Create('Vector.Erf: mismatch');
end;

Indexed: function Erf(Index: Integer; Len: Integer): TMtxVec;

Error function on self elements [Index..Index+Len-1] in-place.

#NameTypeDescription
1IndexIntegerstart index
2LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Overload 2: function Erf(const Src: TMtxVec): TMtxVec;

Error function of Src; result stored in self.

#NameTypeDescription
1SrcTMtxVec

Result: stored in self (calling object), returns self for chaining

Examples
var
    a, x, expected: Vector;
begin
    x := [0.0, 0.5, 1.0, 2.0];
    a.Erf(x);
    expected := [0.0, 0.520499877813047, 0.842700792949715, 0.995322265018953];
    if not a.IsEqual(expected, 1e-10, TCompare.cmpAbsolute) then
        raise Exception.Create('Vector.Erf: mismatch');
end;

Indexed: function Erf(const Src: TMtxVec; SrcIndex: Integer; Index: Integer; Len: Integer): TMtxVec;

Error function of Src elements [SrcIndex..SrcIndex+Len-1] stored in self elements [Index..Index+Len-1].

#NameTypeDescription
1SrcTMtxVec
2SrcIndexIntegersource start index
3IndexIntegerstart index
4LenIntegerelement count

Result: stored in self (calling object), returns self for chaining