Class LinearObjectiveFunction
- java.lang.Object
-
- org.apache.commons.math3.optimization.linear.LinearObjectiveFunction
-
- All Implemented Interfaces:
java.io.Serializable
@Deprecated public class LinearObjectiveFunction extends java.lang.Object implements java.io.SerializableDeprecated.As of 3.1 (to be removed in 4.0).An objective function for a linear optimization problem.A linear objective function has one the form:
c1x1 + ... cnxn + d
The ci and d are the coefficients of the equation, the xi are the coordinates of the current point.- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private RealVectorcoefficientsDeprecated.Coefficients of the constraint (ci).private doubleconstantTermDeprecated.Constant term of the linear equation.private static longserialVersionUIDDeprecated.Serializable version identifier.
-
Constructor Summary
Constructors Constructor Description LinearObjectiveFunction(double[] coefficients, double constantTerm)Deprecated.LinearObjectiveFunction(RealVector coefficients, double constantTerm)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object other)Deprecated.RealVectorgetCoefficients()Deprecated.Get the coefficients of the linear equation being optimized.doublegetConstantTerm()Deprecated.Get the constant of the linear equation being optimized.doublegetValue(double[] point)Deprecated.Compute the value of the linear equation at the current pointdoublegetValue(RealVector point)Deprecated.Compute the value of the linear equation at the current pointinthashCode()Deprecated.private voidreadObject(java.io.ObjectInputStream ois)Deprecated.Deserialize the instance.private voidwriteObject(java.io.ObjectOutputStream oos)Deprecated.Serialize the instance.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Deprecated.Serializable version identifier.- See Also:
- Constant Field Values
-
coefficients
private final transient RealVector coefficients
Deprecated.Coefficients of the constraint (ci).
-
constantTerm
private final double constantTerm
Deprecated.Constant term of the linear equation.
-
-
Constructor Detail
-
LinearObjectiveFunction
public LinearObjectiveFunction(double[] coefficients, double constantTerm)Deprecated.- Parameters:
coefficients- The coefficients for the linear equation being optimizedconstantTerm- The constant term of the linear equation
-
LinearObjectiveFunction
public LinearObjectiveFunction(RealVector coefficients, double constantTerm)
Deprecated.- Parameters:
coefficients- The coefficients for the linear equation being optimizedconstantTerm- The constant term of the linear equation
-
-
Method Detail
-
getCoefficients
public RealVector getCoefficients()
Deprecated.Get the coefficients of the linear equation being optimized.- Returns:
- coefficients of the linear equation being optimized
-
getConstantTerm
public double getConstantTerm()
Deprecated.Get the constant of the linear equation being optimized.- Returns:
- constant of the linear equation being optimized
-
getValue
public double getValue(double[] point)
Deprecated.Compute the value of the linear equation at the current point- Parameters:
point- point at which linear equation must be evaluated- Returns:
- value of the linear equation at the current point
-
getValue
public double getValue(RealVector point)
Deprecated.Compute the value of the linear equation at the current point- Parameters:
point- point at which linear equation must be evaluated- Returns:
- value of the linear equation at the current point
-
equals
public boolean equals(java.lang.Object other)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
writeObject
private void writeObject(java.io.ObjectOutputStream oos) throws java.io.IOExceptionDeprecated.Serialize the instance.- Parameters:
oos- stream where object should be written- Throws:
java.io.IOException- if object cannot be written to stream
-
readObject
private void readObject(java.io.ObjectInputStream ois) throws java.lang.ClassNotFoundException, java.io.IOExceptionDeprecated.Deserialize the instance.- Parameters:
ois- stream from which the object should be read- Throws:
java.lang.ClassNotFoundException- if a class in the stream cannot be foundjava.io.IOException- if object cannot be read from the stream
-
-