Documentation of 'org.encog.ml.prg.expvalue.EvaluateExpr' Java class
EvaluateExpr
org.encog.ml.prg.expvalue

Class EvaluateExpr



  • public final class EvaluateExpr
    extends java.lang.Object
    Simple utility class that performs some basic operations on ExpressionValue objects.
    • Method Detail

      • add

        public static ExpressionValue add(ExpressionValue a,
                                          ExpressionValue b)
        Perform an add on two expression values. a+b
        Parameters:
        a - The first argument.
        b - The second argument.
        Returns:
        The result of adding two numbers. Concat for strings. If one is a string, the other is converted to string. If no string, then if one is float, both are converted to int.
      • div

        public static ExpressionValue div(ExpressionValue a,
                                          ExpressionValue b)
        Perform a division on two expression values. a/b An Encog division by zero exception can occur. If one param is a float, the other is converted to a float.
        Parameters:
        a - The first argument, must be numeric.
        b - The second argument, must be numeric.
        Returns:
        The result of the operation.
      • equ

        public static ExpressionValue equ(ExpressionValue a,
                                          ExpressionValue b)
        Perform an equal on two expressions. Booleans, ints and strings must exactly equal. Floating point must be equal within the default Encog tolerance.
        Parameters:
        a - The first parameter to check.
        b - The second parameter to check.
        Returns:
        True/false.
      • mul

        public static ExpressionValue mul(ExpressionValue a,
                                          ExpressionValue b)
        Perform a multiply on two expression values. a*b If one param is a float, the other is converted to a float.
        Parameters:
        a - The first argument, must be numeric.
        b - The second argument, must be numeric.
        Returns:
        The result of the operation.
      • notequ

        public static ExpressionValue notequ(ExpressionValue a,
                                             ExpressionValue b)
        Perform a non-equal on two expressions. Booleans, ints and strings must exactly non-equal. Floating point must be non-equal within the default Encog tolerance.
        Parameters:
        a - The first parameter to check.
        b - The second parameter to check.
        Returns:
        True/false.
      • pow

        public static ExpressionValue pow(ExpressionValue a,
                                          ExpressionValue b)
        Perform a protected div on two expression values. a/b If one param is a float, the other is converted to a float.
        Parameters:
        a - The first argument, must be numeric.
        b - The second argument, must be numeric.
        Returns:
        The result of the operation.
      • protectedDiv

        public static ExpressionValue protectedDiv(ExpressionValue a,
                                                   ExpressionValue b)
        Perform a protected div on two expression values. a/b Division by zero results in 1.
        Parameters:
        a - The first argument, must be numeric.
        b - The second argument, must be numeric.
        Returns:
        The result of the operation.
      • sub

        public static ExpressionValue sub(ExpressionValue a,
                                          ExpressionValue b)
        Perform a subtract on two expression values. a-b If one param is a float, the other is converted to a float.
        Parameters:
        a - The first argument, must be numeric.
        b - The second argument, must be numeric.
        Returns:
        The result of the operation.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.