ArrayMath (Apache OpenNLP Tools 1.9.5 API)
Date: 2026-06-18

opennlp.tools.ml.maxent.quasinewton

## Class ArrayMath

- java.lang.Object
- - opennlp.tools.ml.ArrayMath
  - - opennlp.tools.ml.maxent.quasinewton.ArrayMath

- Deprecated.

      @Deprecated
      public class ArrayMath
      extends ArrayMath

  Utility class for simple vector arithmetic.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ArrayMath()` Deprecated.

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `maxIdx(double[] x)` Deprecated. Find index of maximum element in the vector x

    - ### Methods inherited from class opennlp.tools.ml.ArrayMath

      `argmax, innerProduct, invL2norm, l1norm, l2norm, logSumOfExps, max, sumFeatures, toDoubleArray, toIntArray`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ArrayMath

          public ArrayMath()

      Deprecated.

  - ### Method Detail

    - #### maxIdx

          public static int maxIdx(double[] x)

      Deprecated.
      Find index of maximum element in the vector x
      Parameters:
        `x` - input vector
      Returns:
        index of the maximum element. Index of the first maximum element is returned if multiple maximums are found.

Copyright © 2026 The Apache Software Foundation. All rights reserved.