Libraries.Compute.Statistics.Distributions.ErrorAction Documentation

This class represents the mathematical concept of an Error Function. What the error function is is a complex topic and more information can be found on wikipedia: https://en.wikipedia.org/wiki/Error_function . Normally, users will not need this class, unless conducting a calculation requiring it. The user should note that we changed all of the names in this class. First, traditionally in mathematics, esoteric names are used like erf or erfi, but we changed these to better reflect the result of the operation. In each case, we document the name in math for clarity. All of this work was ported from Apache Commons.

Example Code

use Libraries.Compute.Statistics.Distributions.ErrorAction
    ErrorAction errors
    output errors:Error(

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
ComplementaryError(number x)* Returns the complementary error function or 1 - erf(x).
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
Error(number x)Returns the error function, in math erf(x).
Error(number x1, number x2)Returns the difference between Error(x1) and Error(x2).
GetHashCode()This action gets the hash code for an object.
InverseError(number x)This action comes from the ERV utility class in apache commons.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

ComplementaryError(number x)

* Returns the complementary error function or 1 - erf(x). This was ported from the Apache Commons Erf class.

Parameters

Return

number: the complementary error function erfc(

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Error(number x)

Returns the error function, in math erf(x). This was ported from the Apache Commons Erf class.

Parameters

Return

number: the complementary error function erfc(

Error(number x1, number x2)

Returns the difference between Error(x1) and Error(x2). The implementation uses either Error(double) or ComplementaryError(double) depending on which provides the most precise result.

Parameters

Return

number: erf(x2) - erf(x

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode

Return

integer: The integer hash code of the object.

InverseError(number x)

This action comes from the ERV utility class in apache commons. Notably, the erfInv action. The comment from that paper is as follows: Returns the inverse erf.

This implementation is described in the paper: Approximating the erfinv function by Mike Giles, Oxford-Man Institute of Quantitative Finance, which was published in GPU Computing Gems, volume 2, 2010. The source code is available here.

Comments from this class come from Apache commons directl

Parameters

Return

number: