NonNegativeConstraint (Apache Commons Math 3.3 API)

org.apache.commons.math3.optim.linear

## Class NonNegativeConstraint

- java.lang.Object
- - org.apache.commons.math3.optim.linear.NonNegativeConstraint

- All Implemented Interfaces:
    OptimizationData

      public class NonNegativeConstraint
      extends Object
      implements OptimizationData

  A constraint for a linear optimization problem indicating whether all variables must be restricted to non-negative values.
  Since:
    3.1
  Version:
    $Id: NonNegativeConstraint.java 1435539 2013-01-19 13:27:24Z tn $

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NonNegativeConstraint(boolean restricted)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isRestrictedToNonNegative()` Indicates whether all the variables must be restricted to non-negative values.

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

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

- - ### Constructor Detail

    - #### NonNegativeConstraint

          public NonNegativeConstraint(boolean restricted)

      Parameters:
        `restricted` - If `true`, all the variables must be positive.

  - ### Method Detail

    - #### isRestrictedToNonNegative

          public boolean isRestrictedToNonNegative()

      Indicates whether all the variables must be restricted to non-negative values.
      Returns:
        `true` if all the variables must be positive.

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.