com.datumbox.framework.core.mathematics.linearprogramming
Class LPSolver
- java.lang.Object
-
- com.datumbox.framework.core.mathematics.linearprogramming.LPSolver
-
public class LPSolver extends java.lang.ObjectThe LPSolver provides an easy way to formulate and solve Linear Programming problems.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classLPSolver.LPConstraintThe LP Constraint is an internal class which stores the the main body of the constraint, the sign and the right value.static classLPSolver.LPResultThe Result class of the LP problem.
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringEQEqual.static java.lang.StringGEQGreater or equal.static java.lang.StringLEQLess or equal
-
Constructor Summary
Constructors Constructor and Description LPSolver()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static LPSolver.LPResultsolve(double[] linearObjectiveFunction, java.util.List<LPSolver.LPConstraint> linearConstraintsList, boolean nonNegative, boolean maximize)Solves the LP problem and returns the result.
-
-
-
Field Detail
-
GEQ
public static java.lang.String GEQ
Greater or equal.
-
LEQ
public static java.lang.String LEQ
Less or equal
-
EQ
public static java.lang.String EQ
Equal.
-
-
Method Detail
-
solve
public static LPSolver.LPResult solve(double[] linearObjectiveFunction, java.util.List<LPSolver.LPConstraint> linearConstraintsList, boolean nonNegative, boolean maximize)
Solves the LP problem and returns the result.- Parameters:
linearObjectiveFunction-linearConstraintsList-nonNegative-maximize-- Returns:
-
-
DataMelt 3.0 © DataMelt by jWork.ORG