Package smile.math

Interface IntFunction

All Superinterfaces:
Serializable

public interface IntFunction extends Serializable
An interface representing a univariate int function.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    apply(int x)
    Computes the value of the function at x.
    int
    f(int x)
    Computes the value of the function at x.
  • Method Details

    • f

      int f(int x)
      Computes the value of the function at x.
      Parameters:
      x - an integer value.
      Returns:
      the function value.
    • apply

      default int apply(int x)
      Computes the value of the function at x. It delegates the computation to f(). This is simply for Scala convenience.
      Parameters:
      x - an integer value.
      Returns:
      the function value.