Class Pow


public class Pow extends PrimitiveFunction
Raises a number to a power.
  • Constructor Details

    • Pow

      public Pow()
  • Method Details

    • name

      public Name name()
      Gets the name of this primitive function.
      Specified by:
      name in class PrimitiveFunction
      Returns:
      the function name
    • type

      public TypeScheme type()
      Gets the type scheme for this function.
      Specified by:
      type in class PrimitiveFunction
      Returns:
      the type scheme
    • implementation

      protected Function<List<Term>,Flow<Graph,Term>> implementation()
      Provides the implementation of this function.
      Specified by:
      implementation in class PrimitiveFunction
      Returns:
      a function that maps terms to a flow of terms
    • apply

      public static Function<Double,Double> apply(Double x)
      Computes base^exponent.
      Parameters:
      x - the base
      Returns:
      the result
    • apply

      public static Double apply(Double x, Double y)
      Computes base^exponent.
      Parameters:
      x - the base
      y - the exponent
      Returns:
      the result