org.apache.commons.math3.optim

## Class MaxEval

- java.lang.Object
- - org.apache.commons.math3.optim.MaxEval

- All Implemented Interfaces:
    OptimizationData

      public class MaxEval
      extends Object
      implements OptimizationData

  Maximum number of evaluations of the function to be optimized.
  Since:
    3.1
  Version:
    $Id$

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `maxEval` Allowed number of evalutations.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MaxEval(int max)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getMaxEval()` Gets the maximum number of evaluations.
    `static MaxEval` | `unlimited()` Factory method that creates instance of this class that represents a virtually unlimited number of evaluations.

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

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

- - ### Field Detail

    - #### maxEval

          private final int maxEval

      Allowed number of evalutations.

  - ### Constructor Detail

    - #### MaxEval

          public MaxEval(int max)

      Parameters:
        `max` - Allowed number of evalutations.
      Throws:
        `NotStrictlyPositiveException` - if `max <= 0`.

  - ### Method Detail

    - #### getMaxEval

          public int getMaxEval()

      Gets the maximum number of evaluations.
      Returns:
        the allowed number of evaluations.

    - #### unlimited

          public static MaxEval unlimited()

      Factory method that creates instance of this class that represents a virtually unlimited number of evaluations.
      Returns:
        a new instance suitable for allowing `Integer.MAX_VALUE` evaluations.

Copyright (c) 2003-2013 Apache Software Foundation