Package org.drip.optimization.canonical
Class LPConstraint
java.lang.Object
org.drip.optimization.canonical.LPConstraint
- All Implemented Interfaces:
LinearConstraint
public class LPConstraint extends java.lang.Object implements LinearConstraint
LPConstraint holds the Constraint Matrix LHS and Constraint Array RHS for an Linear Program Ax lte
B, where A is Rm x n, B is Rm, and x is R+n. The References
are:
- Nering, E. D., and A. W. Tucker (1993): Linear Programs and Related Problems Academic Press
- Murty, K. G. (1983): Linear Programming John Wiley and Sons New York
- Padberg, M. W. (1999): Linear Optimization and Extensions 2nd Edition Springer-Verlag
- van der Bei, R. J. (2008): Linear Programming: Foundations and Extensions 3rd Edition International Series in Operations Research and Management Science 114 Springer-Verlag
- Wikipedia (2020): Simplex Algorithm https://en.wikipedia.org/wiki/Simplex_algorithm
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description LPConstraint(double[][] aGrid, double[] bArray)
LPConstraint Constructor -
Method Summary
Modifier and Type Method Description double[][]
aGrid()
Retrieve "A" Griddouble[]
bArray()
Retrieve "b" Arrayint
constraintCount()
Retrieve the Constraint Countint
dimension()
Retrieve the Variate Dimensionboolean
validate(double[] variateArray)
Validate the Variate Inputboolean
verify(double[] variateArray)
Verify if the Variate Array satisfies the ConstraintMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
LPConstraint
public LPConstraint(double[][] aGrid, double[] bArray) throws java.lang.ExceptionLPConstraint Constructor- Parameters:
aGrid
- "A" Constraint GridbArray
- "b" Constraint Array- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Details
-
aGrid
public double[][] aGrid()Retrieve "A" Grid- Returns:
- A Grid
-
bArray
public double[] bArray()Retrieve "b" Array- Returns:
- b Array
-
constraintCount
public int constraintCount()Description copied from interface:LinearConstraint
Retrieve the Constraint Count- Specified by:
constraintCount
in interfaceLinearConstraint
- Returns:
- Constraint Count
-
dimension
public int dimension()Description copied from interface:LinearConstraint
Retrieve the Variate Dimension- Specified by:
dimension
in interfaceLinearConstraint
- Returns:
- Variate Dimension
-
validate
public boolean validate(double[] variateArray)Validate the Variate Input- Parameters:
variateArray
- The Input Variate Array- Returns:
- TRUE - The Input Variate successfully Validated
-
verify
public boolean verify(double[] variateArray) throws java.lang.ExceptionVerify if the Variate Array satisfies the Constraint- Parameters:
variateArray
- The Input Variate Array- Returns:
- TRUE - The Variate Array satisfies the Constraint
- Throws:
java.lang.Exception
- Thrown if the Verification cannot be done
-