org.apache.commons.math3.optimization.linear
@Deprecated public class LinearConstraint extends Object implements Serializable
A linear constraint has one of the forms:
Modifier and Type | Field and Description |
---|---|
private RealVector |
coefficients
Deprecated.
Coefficients of the constraint (left hand side).
|
private Relationship |
relationship
Deprecated.
Relationship between left and right hand sides (=, <=, >=).
|
private static long |
serialVersionUID
Deprecated.
Serializable version identifier.
|
private double |
value
Deprecated.
Value of the constraint (right hand side).
|
Constructor and Description |
---|
LinearConstraint(double[] lhsCoefficients,
double lhsConstant,
Relationship relationship,
double[] rhsCoefficients,
double rhsConstant)
Deprecated.
Build a constraint involving two linear equations.
|
LinearConstraint(double[] coefficients,
Relationship relationship,
double value)
Deprecated.
Build a constraint involving a single linear equation.
|
LinearConstraint(RealVector lhsCoefficients,
double lhsConstant,
Relationship relationship,
RealVector rhsCoefficients,
double rhsConstant)
Deprecated.
Build a constraint involving two linear equations.
|
LinearConstraint(RealVector coefficients,
Relationship relationship,
double value)
Deprecated.
Build a constraint involving a single linear equation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Deprecated.
|
RealVector |
getCoefficients()
Deprecated.
Get the coefficients of the constraint (left hand side).
|
Relationship |
getRelationship()
Deprecated.
Get the relationship between left and right hand sides.
|
double |
getValue()
Deprecated.
Get the value of the constraint (right hand side).
|
int |
hashCode()
Deprecated.
|
private void |
readObject(ObjectInputStream ois)
Deprecated.
Deserialize the instance.
|
private void |
writeObject(ObjectOutputStream oos)
Deprecated.
Serialize the instance.
|
private static final long serialVersionUID
private final transient RealVector coefficients
private final Relationship relationship
private final double value
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 constraintpublic 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 constraintpublic RealVector getCoefficients()
public Relationship getRelationship()
public double getValue()
private void writeObject(ObjectOutputStream oos) throws IOException
oos
- stream where object should be writtenIOException
- if object cannot be written to streamprivate void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException
ois
- stream from which the object should be readClassNotFoundException
- if a class in the stream cannot be foundIOException
- if object cannot be read from the streamCopyright (c) 2003-2013 Apache Software Foundation