# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.qp.lp.problem

## Class LPCanonicalProblem2

• All Implemented Interfaces:
LPProblem, ConstrainedOptimProblem, OptimProblem

public class LPCanonicalProblem2
extends LPProblemImpl1
This is a linear programming problem in the 2nd canonical form (following the convention in the wiki):
min c'x
s.t.

A * x ≤ b,
x ≥ 0

b ≥ 0 if the problem is feasible
Wikipedia: Standard form
• ### Constructor Summary

Constructors
Constructor and Description
LPCanonicalProblem2(LPCanonicalProblem1 problem)
Convert a linear programming problem from the 1st canonical form to the 2nd canonical form.
LPCanonicalProblem2(Vector cost, LinearLessThanConstraints less)
Construct a linear programming problem in the canonical form.
LPCanonicalProblem2(Vector c, Matrix A, Vector b)
Construct a linear programming problem in the canonical form.

• ### Methods inherited from class com.numericalmethod.suanshu.optimization.multivariate.constrained.convex.sdp.socp.qp.lp.problem.LPProblemImpl1

A, Aeq, b, beq, c, dimension, f, getEqualityConstraints, getLessThanConstraints, isFree, nEqualities, nGreaterThanInequalities, toString
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
• ### Constructor Detail

• #### LPCanonicalProblem2

public LPCanonicalProblem2(Vector c,
Matrix A,
Vector b)
Construct a linear programming problem in the canonical form.
Parameters:
c - c'x is the linear objective function to be minimized
A - the less-than inequality constraints A * x &le; b
b - the less-than inequality values A * x &le; b
• #### LPCanonicalProblem2

public LPCanonicalProblem2(Vector cost,
LinearLessThanConstraints less)
Construct a linear programming problem in the canonical form.
Parameters:
cost - the objective function
less - a collection of less-than-or-equal-to constraints
• #### LPCanonicalProblem2

public LPCanonicalProblem2(LPCanonicalProblem1 problem)
Convert a linear programming problem from the 1st canonical form to the 2nd canonical form.
Parameters:
problem - a linear programming problem in the 1st canonical form