Top Description Fields Constructors Methods
org.apache.commons.math3.optim.linear

public Class NonNegativeConstraint

extends Object
implements OptimizationData
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.optim.OptimizationData
Imports
org.apache.commons.math3.optim.OptimizationData

A constraint for a linear optimization problem indicating whether all variables must be restricted to non-negative values.
Since
3.1

Field Summary

Modifier and TypeField and Description
private final boolean
isRestricted

Whether the variables are all positive.

Constructor Summary

AccessConstructor and Description
public
NonNegativeConstraint(boolean
If true, all the variables must be positive.
restricted
)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if all the variables must be positive.
isRestrictedToNonNegative
()

Indicates whether all the variables must be restricted to non-negative values.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isRestrictedback to summary
private final boolean isRestricted

Whether the variables are all positive.

Constructor Detail

NonNegativeConstraintback to summary
public NonNegativeConstraint(boolean restricted)
Parameters
restricted:boolean

If true, all the variables must be positive.

Method Detail

isRestrictedToNonNegativeback to summary
public boolean isRestrictedToNonNegative()

Indicates whether all the variables must be restricted to non-negative values.

Returns:boolean

true if all the variables must be positive.