ConstantExpression
- java.lang.Object
-
- com.dashoptimization.objects.Expression
-
- com.dashoptimization.objects.AbstractExpression
-
- com.dashoptimization.objects.ConstantExpression
-
public final class ConstantExpression extends AbstractExpression
A constant value.- Since:
- 43.00
-
-
Constructor Summary
Constructor Description ConstantExpression(double value)Create a new constant expression.
-
Method Summary
Modifier and Type Method Description static ConstantExpressionconstant(double cnst)Utility function to create a constant expression.ConstantExpressiondiv(double arg)Create a new expression that represents the quotient ofthisandarg.ConstantExpressiondiv(ConstantExpression arg)Create a new expression that represents the quotient ofthisandarg.Expressiondiv(Expression arg)Create a new expression that represents the quotient ofthisandarg.doubleevaluate(double[] solution)Compute the value of this expression with respect to the given solution vector (which is not required to be feasible).doublegetValue()ConstantExpressionminus(double arg)Create a new expression that represents the difference ofthisandarg.ConstantExpressionminus(ConstantExpression arg)Create a new expression that represents the difference ofthisandarg.Expressionminus(Expression arg)Create a new expression that represents the difference ofthisandarg.ConstantExpressionmul(double arg)Create a new expression that represents the product ofthisandarg.ConstantExpressionmul(ConstantExpression arg)Create a new expression that represents the product ofthisandarg.Expressionmul(Expression arg)Create a new expression that represents the product ofthisandarg.LinTermmul(LinTerm arg)Create a new expression that represents the product ofthisandarg.QuadTermmul(QuadTerm arg)Create a new expression that represents the product ofthisandarg.LinTermmul(Variable arg)Create a new expression that represents the product ofthisandarg.ConstantExpressionplus(double arg)Create a new expression that represents the sum ofthisandarg.ConstantExpressionplus(ConstantExpression arg)Create a new expression that represents the sum ofthisandarg.Expressionplus(Expression arg)Create a new expression that represents the sum ofthisandarg.java.lang.StringtoString()ConstantExpressionuminus()Create a new expression that represents the unary minus of this one.
-
-
-
Method Detail
-
getValue
public double getValue()
-
constant
public static ConstantExpression constant(double cnst)
Utility function to create a constant expression.Examples using
constant:- Parameters:
-
cnst- Constant value for new expression. - Returns:
- The new expression.
- Since:
- 43.00
-
evaluate
public double evaluate(double[] solution)
Compute the value of this expression with respect to the given solution vector (which is not required to be feasible).Examples using
evaluate:- Specified by:
-
evaluatein classExpression - Parameters:
-
solution- Solution values for which the expression is evaluated. - Returns:
-
The value of this expression evaluated at
solution. - Since:
- 43.00
-
toString
public java.lang.String toString()
- Overrides:
-
toStringin classjava.lang.Object - Returns:
- Since:
- 43.00
-
uminus
public ConstantExpression uminus()
Create a new expression that represents the unary minus of this one.- Overrides:
-
uminusin classExpression - Returns:
-
Expression representing
-this. - Since:
- 43.00
-
plus
public Expression plus(Expression arg)
Create a new expression that represents the sum ofthisandarg.Examples using
plus:- Overrides:
-
plusin classExpression - Parameters:
-
arg- Addend. - Returns:
-
Sum of
thisandarg. - Since:
- 43.00
-
plus
public ConstantExpression plus(ConstantExpression arg)
Create a new expression that represents the sum ofthisandarg.Examples using
plus:- Parameters:
-
arg- Addend - Returns:
- The new expression.
- Since:
- 43.00
-
plus
public ConstantExpression plus(double arg)
Create a new expression that represents the sum ofthisandarg.Examples using
plus:- Overrides:
-
plusin classExpression - Parameters:
-
arg- Addend. - Returns:
-
Sum of
thisandarg. - Since:
- 43.00
-
minus
public Expression minus(Expression arg)
Create a new expression that represents the difference ofthisandarg.Examples using
minus:- Overrides:
-
minusin classExpression - Parameters:
-
arg- Minuend. - Returns:
-
Difference of
thisandarg. - Since:
- 43.00
-
minus
public ConstantExpression minus(ConstantExpression arg)
Create a new expression that represents the difference ofthisandarg.Examples using
minus:- Parameters:
-
arg- Minuend. - Returns:
- The new expression.
- Since:
- 43.00
-
minus
public ConstantExpression minus(double arg)
Create a new expression that represents the difference ofthisandarg.Examples using
minus:- Overrides:
-
minusin classExpression - Parameters:
-
arg- Minuend. - Returns:
-
Difference of
thisandarg. - Since:
- 43.00
-
mul
public Expression mul(Expression arg)
Create a new expression that represents the product ofthisandarg.Examples using
mul:- Boxes02.java
- Capbgt2l.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioIIS.java
- FolioMipIIS.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Overrides:
-
mulin classExpression - Parameters:
-
arg- Factor. - Returns:
-
Product of
thisandarg. - Since:
- 43.00
-
mul
public ConstantExpression mul(ConstantExpression arg)
Create a new expression that represents the product ofthisandarg.Examples using
mul:- Boxes02.java
- Capbgt2l.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioIIS.java
- FolioMipIIS.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Parameters:
-
arg- Factor. - Returns:
- The new expression.
- Since:
- 43.00
-
mul
public ConstantExpression mul(double arg)
Create a new expression that represents the product ofthisandarg.Examples using
mul:- Boxes02.java
- Capbgt2l.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioIIS.java
- FolioMipIIS.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Overrides:
-
mulin classExpression - Parameters:
-
arg- Factor. - Returns:
-
Product of
thisandarg. - Since:
- 43.00
-
mul
public LinTerm mul(Variable arg)
Create a new expression that represents the product ofthisandarg.Examples using
mul:- Boxes02.java
- Capbgt2l.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioIIS.java
- FolioMipIIS.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Parameters:
-
arg- Factor. - Returns:
- The new expression.
- Since:
- 43.00
-
mul
public LinTerm mul(LinTerm arg)
Create a new expression that represents the product ofthisandarg.Examples using
mul:- Boxes02.java
- Capbgt2l.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioIIS.java
- FolioMipIIS.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Parameters:
-
arg- Factor. - Returns:
- The new expression.
- Since:
- 43.00
-
mul
public QuadTerm mul(QuadTerm arg)
Create a new expression that represents the product ofthisandarg.Examples using
mul:- Boxes02.java
- Capbgt2l.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioIIS.java
- FolioMipIIS.java
- GeneralConstraints.java
- Glidert.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Parameters:
-
arg- Factor. - Returns:
- The new expression.
- Since:
- 43.00
-
div
public Expression div(Expression arg)
Create a new expression that represents the quotient ofthisandarg.Examples using
div:- Overrides:
-
divin classExpression - Parameters:
-
arg- Divisor. - Returns:
-
Quotient of
thisandarg. - Since:
- 43.00
-
div
public ConstantExpression div(ConstantExpression arg)
Create a new expression that represents the quotient ofthisandarg.Examples using
div:- Parameters:
-
arg- Divisor. - Returns:
- The new expression.
- Since:
- 43.00
-
div
public ConstantExpression div(double arg)
Create a new expression that represents the quotient ofthisandarg.Examples using
div:- Overrides:
-
divin classExpression - Parameters:
-
arg- Divisor. - Returns:
-
Quotient of
thisandarg. - Since:
- 43.00
-
-
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
