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

    Fields
    Modifier and Type Field Description
    static int EQ
    "Equal To" Relation
    static int GTE
    "Greater Than Or Equal To" Relation
    static int LTE
    "Lesser Than Or Equal To" Relation
  • 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 Variables
    java.util.Map<java.lang.String,​java.lang.Double> coefficientMap()
    Retrieve the LHS Coefficient Map
    double comparison()
    Retrieve the Comparison
    double rhs()
    Retrieve the RHS
    java.util.Set<java.lang.String> variableSet()
    Retrieve the Variable Set

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • LinearRelation

      public LinearRelation​(java.util.Map<java.lang.String,​java.lang.Double> coefficientMap, double rhs, int comparison) throws java.lang.Exception
      LinearRelation Constructor
      Parameters:
      coefficientMap - LHS Coefficient Map
      rhs - RHS
      comparison - 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

      public LinearEquality canonicalize​(java.util.Set<java.lang.String> unrestrictedVariableSet)
      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