Function (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.ml.maxent.quasinewton, interface: Function

# Interface Function

All Known Implementing Classes:
  `NegLogLikelihood, ParallelNegLogLikelihood, QNMinimizer.L2RegFunction`

public interface Function
Interface for a function.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getDimension()`
  `double[]`
  `gradientAt(double[] x)`
  Computes the gradient for `x`.
  `double`
  `valueAt(double[] x)`
  Computes the function value for `x`.

- ## Method Details

  - ### getDimension

    int getDimension()
    Returns:
      Retrieves the dimension value.

  - ### valueAt

    double valueAt(double[] x)
    Computes the function value for `x`.
    Parameters:
      `x` - The input vector.
    Returns:
      Returns the computed value for `x`.

  - ### gradientAt

    double[] gradientAt(double[] x)
    Computes the gradient for `x`.
    Parameters:
      `x` - The input vector.
    Returns:
      Returns the computed gradient for `x`.