|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.commons.math.optimization.linear.LinearConstraint
public class LinearConstraint
A linear constraint for a linear optimization problem.
A linear constraint has one of the forms:
| Field Summary | |
|---|---|
private RealVector |
coefficients
Coefficients of the constraint (left hand side). |
private Relationship |
relationship
Relationship between left and right hand sides (=, <=, >=). |
private static long |
serialVersionUID
Serializable version identifier. |
private double |
value
Value of the constraint (right hand side). |
| Constructor Summary | |
|---|---|
LinearConstraint(double[] lhsCoefficients,
double lhsConstant,
Relationship relationship,
double[] rhsCoefficients,
double rhsConstant)
Build a constraint involving two linear equations. |
|
LinearConstraint(double[] coefficients,
Relationship relationship,
double value)
Build a constraint involving a single linear equation. |
|
LinearConstraint(RealVector lhsCoefficients,
double lhsConstant,
Relationship relationship,
RealVector rhsCoefficients,
double rhsConstant)
Build a constraint involving two linear equations. |
|
LinearConstraint(RealVector coefficients,
Relationship relationship,
double value)
Build a constraint involving a single linear equation. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object other)
|
RealVector |
getCoefficients()
Get the coefficients of the constraint (left hand side). |
Relationship |
getRelationship()
Get the relationship between left and right hand sides. |
double |
getValue()
Get the value of the constraint (right hand side). |
int |
hashCode()
|
private void |
readObject(java.io.ObjectInputStream ois)
Deserialize the instance. |
private void |
writeObject(java.io.ObjectOutputStream oos)
Serialize the instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private final transient RealVector coefficients
private final Relationship relationship
private final double value
| Constructor Detail |
|---|
public LinearConstraint(double[] coefficients,
Relationship relationship,
double value)
A linear constraint with a single linear equation has one of the forms:
coefficients - The coefficients of the constraint (left hand side)relationship - The type of (in)equality used in the constraintvalue - The value of the constraint (right hand side)
public LinearConstraint(RealVector coefficients,
Relationship relationship,
double value)
A linear constraint with a single linear equation has one of the forms:
coefficients - The coefficients of the constraint (left hand side)relationship - The type of (in)equality used in the constraintvalue - The value of the constraint (right hand side)
public LinearConstraint(double[] lhsCoefficients,
double lhsConstant,
Relationship relationship,
double[] rhsCoefficients,
double rhsConstant)
A linear constraint with two linear equation has one of the forms:
lhsCoefficients - The coefficients of the linear expression on the left hand side of the constraintlhsConstant - The constant term of the linear expression on the left hand side of the constraintrelationship - The type of (in)equality used in the constraintrhsCoefficients - The coefficients of the linear expression on the right hand side of the constraintrhsConstant - The constant term of the linear expression on the right hand side of the constraint
public LinearConstraint(RealVector lhsCoefficients,
double lhsConstant,
Relationship relationship,
RealVector rhsCoefficients,
double rhsConstant)
A linear constraint with two linear equation has one of the forms:
lhsCoefficients - The coefficients of the linear expression on the left hand side of the constraintlhsConstant - The constant term of the linear expression on the left hand side of the constraintrelationship - The type of (in)equality used in the constraintrhsCoefficients - The coefficients of the linear expression on the right hand side of the constraintrhsConstant - The constant term of the linear expression on the right hand side of the constraint| Method Detail |
|---|
public RealVector getCoefficients()
public Relationship getRelationship()
public double getValue()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
private void writeObject(java.io.ObjectOutputStream oos)
throws java.io.IOException
oos - stream where object should be written
java.io.IOException - if object cannot be written to stream
private void readObject(java.io.ObjectInputStream ois)
throws java.lang.ClassNotFoundException,
java.io.IOException
ois - stream from which the object should be read
java.lang.ClassNotFoundException - if a class in the stream cannot be found
java.io.IOException - if object cannot be read from the stream
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||