Package org.drip.optimization.lp
Class LinearRelation
java.lang.Object
org.drip.optimization.lp.LinearRelation
public class LinearRelation
extends java.lang.Object
LinearRelation holds the Coefficients, the Relationship, and the RHS of an LP Relation. 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
-
Field Summary
-
Constructor Summary
Constructors Constructor Description LinearRelation(java.util.Map<java.lang.String,java.lang.Double> coefficientMap, double rhs, int comparison)
LinearRelation Constructor -
Method Summary
Modifier and Type Method Description LinearEquality
canonicalize(java.util.Set<java.lang.String> unrestrictedVariableSet)
Generate the Canonical Linear Equality From the Set of Unrestricted Variablesjava.util.Map<java.lang.String,java.lang.Double>
coefficientMap()
Retrieve the LHS Coefficient Mapdouble
comparison()
Retrieve the Comparisondouble
rhs()
Retrieve the RHSjava.util.Set<java.lang.String>
variableSet()
Retrieve the Variable SetMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
LTE
public static final int LTE"Lesser Than Or Equal To" Relation- See Also:
- Constant Field Values
-
EQ
public static final int EQ"Equal To" Relation- See Also:
- Constant Field Values
-
GTE
public static final int GTE"Greater Than Or Equal To" Relation- See Also:
- Constant Field Values
-
-
Constructor Details
-
LinearRelation
public LinearRelation(java.util.Map<java.lang.String,java.lang.Double> coefficientMap, double rhs, int comparison) throws java.lang.ExceptionLinearRelation Constructor- Parameters:
coefficientMap
- LHS Coefficient Maprhs
- RHScomparison
- LTE, EQ, or GTE- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Details
-
coefficientMap
public java.util.Map<java.lang.String,java.lang.Double> coefficientMap()Retrieve the LHS Coefficient Map- Returns:
- The LHS Coefficient Map
-
rhs
public double rhs()Retrieve the RHS- Returns:
- The RHS
-
comparison
public double comparison()Retrieve the Comparison- Returns:
- The Comparison
-
variableSet
public java.util.Set<java.lang.String> variableSet()Retrieve the Variable Set- Returns:
- The Variable Set
-
canonicalize
Generate the Canonical Linear Equality From the Set of Unrestricted Variables- Parameters:
unrestrictedVariableSet
- Set of Unrestricted Variables- Returns:
- The Canonical Linear Equality From the Set of Unrestricted Variables
-