Class GeneralConstraints
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.constraint.general.GeneralConstraints
-
- All Implemented Interfaces:
Constraints
- Direct Known Subclasses:
GeneralEqualityConstraints,GeneralGreaterThanConstraints,GeneralLessThanConstraints
public abstract class GeneralConstraints extends Object implements Constraints
The real-valued constraints define the domain (feasible regions) for a real-valued objective function in a constrained optimization problem. The type of constraints can be equality (=), greater-than-or-equal-to (≥), and less-than or equal-to (≤).
-
-
Constructor Summary
Constructors Constructor Description GeneralConstraints(RealScalarFunction... constraints)Construct an instance of constraints from an array of real-valued functions.GeneralConstraints(Collection<RealScalarFunction> constraints)Construct an instance of constraints from a collection of real-valued functions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdimension()Get the number of variables.List<RealScalarFunction>getConstraints()Get the constraints.intsize()Get the number of constraints.
-
-
-
Constructor Detail
-
GeneralConstraints
public GeneralConstraints(Collection<RealScalarFunction> constraints)
Construct an instance of constraints from a collection of real-valued functions.- Parameters:
constraints- the constraints
-
GeneralConstraints
public GeneralConstraints(RealScalarFunction... constraints)
Construct an instance of constraints from an array of real-valued functions.- Parameters:
constraints- the constraints
-
-
Method Detail
-
getConstraints
public List<RealScalarFunction> getConstraints()
Get the constraints.- Specified by:
getConstraintsin interfaceConstraints- Returns:
- the constraints
-
dimension
public int dimension()
Description copied from interface:ConstraintsGet the number of variables.- Specified by:
dimensionin interfaceConstraints- Returns:
- the number of variables
-
size
public int size()
Description copied from interface:ConstraintsGet the number of constraints.- Specified by:
sizein interfaceConstraints- Returns:
- the number of constraints
-
-