Utils
- java.lang.Object
-
- com.dashoptimization.objects.Utils
-
public abstract class Utils extends java.lang.Object
Utilities for modeling.- Since:
- 43.00
-
-
Constructor Summary
Constructor Description Utils()
-
Method Summary
Modifier and Type Method Description static InternalFunctionExpression
abs(Expression value)
Create an expression forabs(value)
.static InternalFunctionExpression
arccos(Expression value)
Create an expression forarccos(value)
.static InternalFunctionExpression
arcsin(Expression value)
Create an expression forarcsin(value)
.static InternalFunctionExpression
arctan(Expression value)
Create an expression forarctan(value)
.static InternalFunctionExpression
cos(Expression value)
Create an expression forcos(value)
.static Expression
div(double dividend, Expression divisor)
Create an expression fordividend + divisor
.static Expression
div(Expression dividend, double divisor)
Create an expression fordividend + divisor
.static Expression
div(Expression dividend, Expression divisor)
Create an expression fordividend / divisor
.static InternalFunctionExpression
exp(Expression value)
Create an expression forexp(value)
.static InternalFunctionExpression
ln(Expression value)
Create an expression forln(value)
.static InternalFunctionExpression
log10(Expression value)
Create an expression forlog10(value)
.static InternalFunctionExpression
max(Expression... value)
Create an expression formax(value, ...)
.static InternalFunctionExpression
min(Expression... value)
Create an expression formin(value, ...)
.static Expression
minus(double minuend, Expression subtrahend)
Create an expression forminuend + subtrahend
.static Expression
minus(Expression minuend, double subtrahend)
Create an expression forminuend + subtrahend
.static Expression
minus(Expression minuend, Expression subtrahend)
Create an expression forminuend - subtrahend
.static Expression
mul(double factor1, Expression factor2)
Create an expression forfactor1 + factor2
.static Expression
mul(Expression factor1, double factor2)
Create an expression forfactor1 + factor2
.static Expression
mul(Expression factor1, Expression factor2)
Create an expression forfactor1 * factor2
.static Expression
plus(double augend, Expression addend)
Create an expression foraugend + addend
.static Expression
plus(Expression augend, double addend)
Create an expression foraugend + addend
.static Expression
plus(Expression augend, Expression addend)
Create an expression foraugend + addend
.static BinaryExpression
pow(double basis, Expression exp)
Create an expression forbase ^ exp
.static BinaryExpression
pow(Expression basis, double exp)
Create an expression forbase ^ exp
.static BinaryExpression
pow(Expression basis, Expression exp)
Create an expression forbase ^ exp
.static Expression
prod(Expression... value)
Create an expression forprod(value, ...)
.static LinExpression
scalarProduct(Variable[] variables, double[] coefs)
Compute the scalar product between a vector of variables and a vector of coefficients.static QuadExpression
scalarProduct(Variable[] variables1, Variable[] variables2, double[] coefs)
Compute the elementwise product between two vectors of variables and a vector of coefficients.static QuadExpression
scalarProduct(java.lang.Iterable<Variable> variables1, java.lang.Iterable<Variable> variables2, java.lang.Iterable<java.lang.Double> coefs)
Compute the elementwise product between two vectors of variables and a vector of coefficients.static LinExpression
scalarProduct(java.lang.Iterable<Variable> variables, java.lang.Iterable<java.lang.Double> coefs)
Compute the scalar product between a vector of variables and a vector of coefficients.static <K> LinExpression
scalarProduct(java.util.Map<K,Variable> variables, java.util.Map<K,java.lang.Double> coefs)
Compute the scalar product between a map of variables and a map of coefficients.static QuadExpression
scalarProduct(java.util.stream.Stream<Variable> variables1, java.util.stream.Stream<Variable> variables2, java.util.stream.Stream<java.lang.Double> coefs)
Compute the elementwise product between two vectors of variables and a vector of coefficients.static LinExpression
scalarProduct(java.util.stream.Stream<Variable> variables, java.util.stream.Stream<java.lang.Double> coefs)
Compute the scalar product between a vector of variables and a vector of coefficients.static InternalFunctionExpression
sign(Expression value)
Create an expression forsign(value)
.static InternalFunctionExpression
sin(Expression value)
Create an expression forsin(value)
.static InternalFunctionExpression
sqrt(Expression value)
Create an expression forsqrt(value)
.static <A extends Expression>
SumExpressionsum(int[] data1, int[] data2, int[] data3, int[] data4, int[] data5, IntFunction5<A> makeTerm)
Create a 5-dimensional sum of expressions.static <A extends Expression>
SumExpressionsum(int[] data1, int[] data2, int[] data3, int[] data4, IntFunction4<A> makeTerm)
Create a 4-dimensional sum of expressions.static <A extends Expression>
SumExpressionsum(int[] data1, int[] data2, int[] data3, IntFunction3<A> makeTerm)
Create a 3-dimensional sum of expressions.static <A extends Expression>
SumExpressionsum(int[] data1, int[] data2, IntFunction2<A> makeTerm)
Create a 2-dimensional sum of expressions.static <A extends Expression>
SumExpressionsum(int[] data, java.util.function.IntFunction<A> makeTerm)
Create a sum of expressions.static <A extends Expression>
SumExpressionsum(int count1, int count2, int count3, int count4, int count5, IntFunction5<A> makeTerm)
Create a 5-dimensional sum of expressions.static <A extends Expression>
SumExpressionsum(int count1, int count2, int count3, int count4, IntFunction4<A> makeTerm)
Create a 4-dimensional sum of expressions.static <A extends Expression>
SumExpressionsum(int count1, int count2, int count3, IntFunction3<A> makeTerm)
Create a 3-dimensional sum of expressions.static <A extends Expression>
SumExpressionsum(int count1, int count2, IntFunction2<A> makeTerm)
Create a 2-dimensional sum of expressions.static <A extends Expression>
SumExpressionsum(int count, java.util.function.IntFunction<A> makeTerm)
Create a sum of expressions.static SumExpression
sum(Expression firstTerm, Expression... moreTerms)
Create an expression from an array of other expressions.static <T extends Expression>
SumExpressionsum(java.lang.Iterable<T> terms)
Create an expression from a collection of other expressions.static <T,A extends Expression>
SumExpressionsum(java.lang.Iterable<T> data, java.util.function.Function<? super T,A> makeTerm)
Create a sum of expressions.static <T1,T2,T3,A extends Expression>
SumExpressionsum(java.lang.Iterable<T1> data1, java.lang.Iterable<T2> data2, java.lang.Iterable<T3> data3, Function3<? super T1,? super T2,? super T3,A> makeTerm)
Create a 3-dimensional sum of expressions.static <T1,T2,T3,T4,A extends Expression>
SumExpressionsum(java.lang.Iterable<T1> data1, java.lang.Iterable<T2> data2, java.lang.Iterable<T3> data3, java.lang.Iterable<T4> data4, Function4<? super T1,? super T2,? super T3,? super T4,A> makeTerm)
Create a 4-dimensional sum of expressions.static <T1,T2,T3,T4,T5,A extends Expression>
SumExpressionsum(java.lang.Iterable<T1> data1, java.lang.Iterable<T2> data2, java.lang.Iterable<T3> data3, java.lang.Iterable<T4> data4, java.lang.Iterable<T5> data5, Function5<? super T1,? super T2,? super T3,? super T4,? super T5,A> makeTerm)
Create a 5-dimensional sum of expressions.static <T1,T2,A extends Expression>
SumExpressionsum(java.lang.Iterable<T1> data1, java.lang.Iterable<T2> data2, java.util.function.BiFunction<? super T1,? super T2,A> makeTerm)
Create a 2-dimensional sum of expressions.static <T,A extends Expression>
SumExpressionsum(java.util.stream.IntStream data, java.util.function.IntFunction<A> makeTerm)
Create a sum of expressions.static <T extends Expression>
SumExpressionsum(java.util.stream.Stream<T> terms)
Create an expression from a stream of other expressions.static <T,A extends Expression>
SumExpressionsum(java.util.stream.Stream<T> data, java.util.function.Function<? super T,A> makeTerm)
Create a sum of expressions.static <T extends Expression>
SumExpressionsum(T[] terms)
Create a sum of expressions.static <T,A extends Expression>
SumExpressionsum(T[] data, java.util.function.Function<? super T,A> makeTerm)
Create a sum of expressions.static <T1,T2,A extends Expression>
SumExpressionsum(T1[] data1, T2[] data2, java.util.function.BiFunction<? super T1,? super T2,A> makeTerm)
Create a 2-dimensional sum of expressions.static <T1,T2,T3,A extends Expression>
SumExpressionsum(T1[] data1, T2[] data2, T3[] data3, Function3<? super T1,? super T2,? super T3,A> makeTerm)
Create a 3-dimensional sum of expressions.static <T1,T2,T3,T4,A extends Expression>
SumExpressionsum(T1[] data1, T2[] data2, T3[] data3, T4[] data4, Function4<? super T1,? super T2,? super T3,? super T4,A> makeTerm)
Create a 4-dimensional sum of expressions.static <T1,T2,T3,T4,T5,A extends Expression>
SumExpressionsum(T1[] data1, T2[] data2, T3[] data3, T4[] data4, T5[] data5, Function5<? super T1,? super T2,? super T3,? super T4,? super T5,A> makeTerm)
Create a 5-dimensional sum of expressions.static InternalFunctionExpression
tan(Expression value)
Create an expression fortan(value)
.static Expression
uminus(Expression value)
Create an expression for-value
.
-
-
-
Method Detail
-
sum
public static <A extends Expression> SumExpression sum(int count, java.util.function.IntFunction<A> makeTerm)
Create a sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
A
- Type of expressions that are summed up. - Parameters:
-
count
- Number of elements in the sum. -
makeTerm
- Function to produce an expression for each data element. - Returns:
- The sum.
- Since:
- 43.00
-
sum
public static <T,A extends Expression> SumExpression sum(java.util.stream.Stream<T> data, java.util.function.Function<? super T,A> makeTerm)
Create a sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T
- Type of data indata
. -
A
- Type of expressions summed up. - Parameters:
-
data
- Data to iterate. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <T,A extends Expression> SumExpression sum(java.lang.Iterable<T> data, java.util.function.Function<? super T,A> makeTerm)
Create a sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T
- Type of data indata
. -
A
- Type of expressions to be summed up. - Parameters:
-
data
- The data from which to build the sum. -
makeTerm
- Function to produce an expression for each data element. - Returns:
- The sum.
- Since:
- 43.00
-
sum
public static <T,A extends Expression> SumExpression sum(T[] data, java.util.function.Function<? super T,A> makeTerm)
Create a sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T
- Type of data indata
. -
A
- Type of expressions to be summed up. - Parameters:
-
data
- Data to iterate. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <A extends Expression> SumExpression sum(int[] data, java.util.function.IntFunction<A> makeTerm)
Create a sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
A
- Type of expressions to be summed up. - Parameters:
-
data
- Data to iterate. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <T,A extends Expression> SumExpression sum(java.util.stream.IntStream data, java.util.function.IntFunction<A> makeTerm)
Create a sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T
- Type of data indata
. -
A
- Type of expressions to be summed up. - Parameters:
-
data
- Data to iterate. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <T extends Expression> SumExpression sum(java.util.stream.Stream<T> terms)
Create an expression from a stream of other expressions. Note that the other expressions are copied by reference, so changing them later will affect the returned expression.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T
- The actual term type. - Parameters:
-
terms
- The expression to sum up. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <T extends Expression> SumExpression sum(java.lang.Iterable<T> terms)
Create an expression from a collection of other expressions. Note that the other expressions are copied by reference, so changing them later will affect the returned expression.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T
- The actual term type. - Parameters:
-
terms
- The expression to sum up. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <T extends Expression> SumExpression sum(T[] terms)
Create a sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T
- The actual term type. - Parameters:
-
terms
- Terms to sum up - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static SumExpression sum(Expression firstTerm, Expression... moreTerms)
Create an expression from an array of other expressions. Note that the other expressions are copied by reference, so changing them later will affect the returned expression.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Parameters:
-
firstTerm
- The first term to sum up. -
moreTerms
- The other terms to sum up. - Returns:
- The new expression.
- Since:
- 43.00
-
uminus
public static Expression uminus(Expression value)
Create an expression for-value
.- Parameters:
-
value
- The value to negate. - Returns:
-
An expression representing
-value
. - Since:
- 43.00
-
plus
public static Expression plus(Expression augend, Expression addend)
Create an expression foraugend + addend
. This is equivalent toaugend.plus(addend)
and is only provided for completeness.Examples using
plus
:- Parameters:
-
augend
- augend. -
addend
- addend. - Returns:
- sum of augend and addend.
- Since:
- 43.00
-
plus
public static Expression plus(double augend, Expression addend)
Create an expression foraugend + addend
. This is equivalent tonew ConstantExpression(augend).plus(addend)
and is only provided for completeness.Examples using
plus
:- Parameters:
-
augend
- augend. -
addend
- addend. - Returns:
- sum of augend and addend.
- Since:
- 43.00
-
plus
public static Expression plus(Expression augend, double addend)
Create an expression foraugend + addend
. This is equivalent toaugend.plus(addend)
and is only provided for completeness.Examples using
plus
:- Parameters:
-
augend
- augend. -
addend
- addend. - Returns:
- sum of augend and addend.
- Since:
- 43.00
-
minus
public static Expression minus(Expression minuend, Expression subtrahend)
Create an expression forminuend - subtrahend
. This is equivalent tominuend.minus(subtrahend)
and is only provided for completeness.Examples using
minus
:- Parameters:
-
minuend
- minuend. -
subtrahend
- subtrahend. - Returns:
- difference of minuend and subtrahend.
- Since:
- 43.00
-
minus
public static Expression minus(double minuend, Expression subtrahend)
Create an expression forminuend + subtrahend
. This is equivalent tonew ConstantExpression(minuend).minus(subtrahend)
and is only provided for completeness.Examples using
minus
:- Parameters:
-
minuend
- minuend. -
subtrahend
- subtrahend. - Returns:
- difference of minuend and subtrahend.
- Since:
- 43.00
-
minus
public static Expression minus(Expression minuend, double subtrahend)
Create an expression forminuend + subtrahend
. This is equivalent tominuend.minus(subtrahend)
and is only provided for completeness.Examples using
minus
:- Parameters:
-
minuend
- minuend. -
subtrahend
- subtrahend. - Returns:
- difference of minuend and subtrahend.
- Since:
- 43.00
-
div
public static Expression div(Expression dividend, Expression divisor)
Create an expression fordividend / divisor
. This is equivalent todividend.div(divisor)
and is only provided for completeness.Examples using
div
:- Parameters:
-
dividend
- dividend. -
divisor
- divisor. - Returns:
- quotient of dividend and divisor.
- Since:
- 43.00
-
div
public static Expression div(double dividend, Expression divisor)
Create an expression fordividend + divisor
. This is equivalent tonew ConstantExpression(dividend).div(divisor)
and is only provided for completeness.Examples using
div
:- Parameters:
-
dividend
- dividend. -
divisor
- divisor. - Returns:
- quotient of dividend and divisor.
- Since:
- 43.00
-
div
public static Expression div(Expression dividend, double divisor)
Create an expression fordividend + divisor
. This is equivalent todividend.div(divisor)
and is only provided for completeness.Examples using
div
:- Parameters:
-
dividend
- dividend. -
divisor
- divisor. - Returns:
- quotient of dividend and divisor.
- Since:
- 43.00
-
mul
public static Expression mul(Expression factor1, Expression factor2)
Create an expression forfactor1 * factor2
. This is equivalent tofactor1.mul(factor2)
and is only provided for completeness.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:
-
factor1
- factor1. -
factor2
- factor2. - Returns:
- product of factor1 and factor2.
- Since:
- 43.00
-
mul
public static Expression mul(double factor1, Expression factor2)
Create an expression forfactor1 + factor2
. This is equivalent tonew ConstantExpression(factor1).mul(factor2)
and is only provided for completeness.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:
-
factor1
- factor1. -
factor2
- factor2. - Returns:
- product of factor1 and factor2.
- Since:
- 43.00
-
mul
public static Expression mul(Expression factor1, double factor2)
Create an expression forfactor1 + factor2
. This is equivalent tofactor1.mul(factor2)
and is only provided for completeness.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:
-
factor1
- factor1. -
factor2
- factor2. - Returns:
- product of factor1 and factor2.
- Since:
- 43.00
-
pow
public static BinaryExpression pow(Expression basis, Expression exp)
Create an expression forbase ^ exp
. Note that adding the result ofpow
to your model in any way will turn the model into a non-linear model. In order to square a variable or linear expression, use one ofVariable.square()
,LinTerm.square()
, orLinExpression.square()
. They all create linear or quadratic expressions.Examples using
pow
:- Parameters:
-
basis
- Base. -
exp
- Exponent. - Returns:
-
basis
raised to the power ofexp
. - Since:
- 43.00
-
pow
public static BinaryExpression pow(double basis, Expression exp)
Create an expression forbase ^ exp
. Note that adding the result ofpow
to your model in any way will turn the model into a non-linear model. In order to square a variable or linear expression, use one ofVariable.square()
,LinTerm.square()
, orLinExpression.square()
. They all create linear or quadratic expressions.Examples using
pow
:- Parameters:
-
basis
- Base. -
exp
- Exponent. - Returns:
-
basis
raised to the power ofexp
. - Since:
- 43.00
-
pow
public static BinaryExpression pow(Expression basis, double exp)
Create an expression forbase ^ exp
. Note that adding the result ofpow
to your model in any way will turn the model into a non-linear model. In order to square a variable or linear expression, use one ofVariable.square()
,LinTerm.square()
, orLinExpression.square()
. They all create linear or quadratic expressions.Examples using
pow
:- Parameters:
-
basis
- Base. -
exp
- Exponent. - Returns:
-
basis
raised to the power ofexp
. - Since:
- 43.00
-
log10
public static InternalFunctionExpression log10(Expression value)
Create an expression forlog10(value)
.- Parameters:
-
value
- Function argument. - Returns:
-
log10(value)
. - Since:
- 43.00
-
ln
public static InternalFunctionExpression ln(Expression value)
Create an expression forln(value)
.- Parameters:
-
value
- Function argument. - Returns:
-
ln(value)
. - Since:
- 43.00
-
exp
public static InternalFunctionExpression exp(Expression value)
- Parameters:
-
value
- Function argument. - Returns:
-
exp(value)
. - Since:
- 43.00
-
abs
public static InternalFunctionExpression abs(Expression value)
Create an expression forabs(value)
.Examples using
abs
:- AddMipSol.java
- BinBurglar.java
- BoolVars.java
- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- FixBV.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- GlobalObjectiveParametrics.java
- GlobalRHSParametrics.java
- GoalProg.java
- Knapsack.java
- LoadLP.java
- MipSolPool.java
- MostViolated.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- PiecewiseLinear.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Repair.java
- Sangraalind.java
- SaveSol.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- Tableau.java
- Trimloss.java
- Wagon.java
- Parameters:
-
value
- Function argument. - Returns:
-
abs(value)
. - Since:
- 43.00
-
sqrt
public static InternalFunctionExpression sqrt(Expression value)
Create an expression forsqrt(value)
.Examples using
sqrt
:- Parameters:
-
value
- Function argument. - Returns:
-
sqrt(value)
. - Since:
- 43.00
-
sin
public static InternalFunctionExpression sin(Expression value)
Create an expression forsin(value)
.Examples using
sin
:- Parameters:
-
value
- Function argument. - Returns:
-
sin(value)
. - Since:
- 43.00
-
cos
public static InternalFunctionExpression cos(Expression value)
Create an expression forcos(value)
.Examples using
cos
:- Parameters:
-
value
- Function argument. - Returns:
-
cos(value)
. - Since:
- 43.00
-
tan
public static InternalFunctionExpression tan(Expression value)
Create an expression fortan(value)
.- Parameters:
-
value
- Function argument. - Returns:
-
tan(value)
. - Since:
- 43.00
-
arcsin
public static InternalFunctionExpression arcsin(Expression value)
Create an expression forarcsin(value)
.- Parameters:
-
value
- Function argument. - Returns:
-
arcsin(value)
. - Since:
- 43.00
-
arccos
public static InternalFunctionExpression arccos(Expression value)
Create an expression forarccos(value)
.- Parameters:
-
value
- Function argument. - Returns:
-
arccos(value)
. - Since:
- 43.00
-
arctan
public static InternalFunctionExpression arctan(Expression value)
- Parameters:
-
value
- Function argument. - Returns:
-
arctan(value)
. - Since:
- 43.00
-
sign
public static InternalFunctionExpression sign(Expression value)
Create an expression forsign(value)
.- Parameters:
-
value
- Function argument. - Returns:
-
sign(value)
. - Since:
- 43.00
-
min
public static InternalFunctionExpression min(Expression... value)
Create an expression formin(value, ...)
. Consider also usingVariable.minOf(...)
.Examples using
min
:- Parameters:
-
value
- Arguments. - Returns:
-
min(value...)
. - Since:
- 43.00
-
max
public static InternalFunctionExpression max(Expression... value)
Create an expression formax(value, ...)
. Consider also usingVariable.maxOf
.Examples using
max
:- Parameters:
-
value
- Arguments. - Returns:
-
max(value...)
. - Since:
- 43.00
-
prod
public static Expression prod(Expression... value)
Create an expression forprod(value, ...)
.- Parameters:
-
value
- Expressions to multiply. - Returns:
-
The product of the expression in
value
. - Since:
- 43.00
-
scalarProduct
public static LinExpression scalarProduct(java.util.stream.Stream<Variable> variables, java.util.stream.Stream<java.lang.Double> coefs)
Compute the scalar product between a vector of variables and a vector of coefficients. Both vectors are specified as streams of elements.Examples using
scalarProduct
:- BinBurglar.java
- CapitalBudgeting.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleProblems.java
- PurchaseSOS2.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- Parameters:
-
variables
- Variables in the scalar product. -
coefs
- Coefficients in the scalar product. - Returns:
- The sum of the specified terms.
- Since:
- 43.00
-
scalarProduct
public static LinExpression scalarProduct(Variable[] variables, double[] coefs)
Compute the scalar product between a vector of variables and a vector of coefficients. Both vectors are specified as arrays.Examples using
scalarProduct
:- BinBurglar.java
- CapitalBudgeting.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleProblems.java
- PurchaseSOS2.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- Parameters:
-
variables
- Variables in the scalar product. -
coefs
- Coefficients in the scalar product. - Returns:
- The sum of the specified terms.
- Since:
- 43.00
-
scalarProduct
public static LinExpression scalarProduct(java.lang.Iterable<Variable> variables, java.lang.Iterable<java.lang.Double> coefs)
Compute the scalar product between a vector of variables and a vector of coefficients. Both vectors are specified as iterables of elements.Examples using
scalarProduct
:- BinBurglar.java
- CapitalBudgeting.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleProblems.java
- PurchaseSOS2.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- Parameters:
-
variables
- Variables in the scalar product. -
coefs
- Coefficients in the scalar product. - Returns:
- The sum of the specified terms.
- Since:
- 43.00
-
scalarProduct
public static <K> LinExpression scalarProduct(java.util.Map<K,Variable> variables, java.util.Map<K,java.lang.Double> coefs)
Compute the scalar product between a map of variables and a map of coefficients. The function assumes thatvariables
andcoefs
have the same keys (missing keys incoefs
are treated as zero) and creates a new linear expression by iterating over the keys invariables
and adding up the variable/coefficient pair for each key.Examples using
scalarProduct
:- BinBurglar.java
- CapitalBudgeting.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleProblems.java
- PurchaseSOS2.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- Type Parameters:
-
K
- Key type. - Parameters:
-
variables
- Map of variables. -
coefs
- Map of coefficients for the variables invariables
. - Returns:
- The new linear expression.
- Since:
- 43.00
-
scalarProduct
public static QuadExpression scalarProduct(java.util.stream.Stream<Variable> variables1, java.util.stream.Stream<Variable> variables2, java.util.stream.Stream<java.lang.Double> coefs)
Compute the elementwise product between two vectors of variables and a vector of coefficients. All vectors are specified as streams of elements.Examples using
scalarProduct
:- BinBurglar.java
- CapitalBudgeting.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleProblems.java
- PurchaseSOS2.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- Parameters:
-
variables1
- First variables in the product. -
variables2
- Second variables in the product. -
coefs
- Coefficients in the product. - Returns:
- The sum of the specified terms.
- Since:
- 43.00
-
scalarProduct
public static QuadExpression scalarProduct(Variable[] variables1, Variable[] variables2, double[] coefs)
Compute the elementwise product between two vectors of variables and a vector of coefficients. All vectors are specified as arrays.Examples using
scalarProduct
:- BinBurglar.java
- CapitalBudgeting.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleProblems.java
- PurchaseSOS2.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- Parameters:
-
variables1
- First variables in the product. -
variables2
- Second variables in the product. -
coefs
- Coefficients in the product. - Returns:
- The sum of the specified terms.
- Since:
- 43.00
-
scalarProduct
public static QuadExpression scalarProduct(java.lang.Iterable<Variable> variables1, java.lang.Iterable<Variable> variables2, java.lang.Iterable<java.lang.Double> coefs)
Compute the elementwise product between two vectors of variables and a vector of coefficients. All vectors are specified as collection of elements.Examples using
scalarProduct
:- BinBurglar.java
- CapitalBudgeting.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- MultipleProblems.java
- PurchaseSOS2.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- Parameters:
-
variables1
- First variables in the product. -
variables2
- Second variables in the product. -
coefs
- Coefficients in the product. - Returns:
- The sum of the specified terms.
- Since:
- 43.00
-
sum
public static <A extends Expression> SumExpression sum(int count1, int count2, IntFunction2<A> makeTerm)
Create a 2-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
A
- Type of expressions that are summed up. - Parameters:
-
count1
- Count for dimension 1. -
count2
- Count for dimension 2. -
makeTerm
- Function to produce an expression for each data element. - Returns:
- The sum.
- Since:
- 43.00
-
sum
public static <T1,T2,A extends Expression> SumExpression sum(java.lang.Iterable<T1> data1, java.lang.Iterable<T2> data2, java.util.function.BiFunction<? super T1,? super T2,A> makeTerm)
Create a 2-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T1
- Type for dimension 1. -
T2
- Type for dimension 2. -
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
makeTerm
- Function to produce an expression for each data tuple. - Returns:
- The sum.
- Since:
- 43.00
-
sum
public static <T1,T2,A extends Expression> SumExpression sum(T1[] data1, T2[] data2, java.util.function.BiFunction<? super T1,? super T2,A> makeTerm)
Create a 2-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T1
- Data type for dimension 1. -
T2
- Data type for dimension 2. -
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <A extends Expression> SumExpression sum(int[] data1, int[] data2, IntFunction2<A> makeTerm)
Create a 2-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <A extends Expression> SumExpression sum(int count1, int count2, int count3, IntFunction3<A> makeTerm)
Create a 3-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
A
- Type of expressions that are summed up. - Parameters:
-
count1
- Count for dimension 1. -
count2
- Count for dimension 2. -
count3
- Count for dimension 3. -
makeTerm
- Function to produce an expression for each data element. - Returns:
- The sum.
- Since:
- 43.00
-
sum
public static <T1,T2,T3,A extends Expression> SumExpression sum(java.lang.Iterable<T1> data1, java.lang.Iterable<T2> data2, java.lang.Iterable<T3> data3, Function3<? super T1,? super T2,? super T3,A> makeTerm)
Create a 3-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T1
- Type for dimension 1. -
T2
- Type for dimension 2. -
T3
- Type for dimension 3. -
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
data3
- Data for dimension 3. -
makeTerm
- Function to produce an expression for each data tuple. - Returns:
- The sum.
- Since:
- 43.00
-
sum
public static <T1,T2,T3,A extends Expression> SumExpression sum(T1[] data1, T2[] data2, T3[] data3, Function3<? super T1,? super T2,? super T3,A> makeTerm)
Create a 3-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T1
- Data type for dimension 1. -
T2
- Data type for dimension 2. -
T3
- Data type for dimension 3. -
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
data3
- Data for dimension 3. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <A extends Expression> SumExpression sum(int[] data1, int[] data2, int[] data3, IntFunction3<A> makeTerm)
Create a 3-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
data3
- Data for dimension 3. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <A extends Expression> SumExpression sum(int count1, int count2, int count3, int count4, IntFunction4<A> makeTerm)
Create a 4-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
A
- Type of expressions that are summed up. - Parameters:
-
count1
- Count for dimension 1. -
count2
- Count for dimension 2. -
count3
- Count for dimension 3. -
count4
- Count for dimension 4. -
makeTerm
- Function to produce an expression for each data element. - Returns:
- The sum.
- Since:
- 43.00
-
sum
public static <T1,T2,T3,T4,A extends Expression> SumExpression sum(java.lang.Iterable<T1> data1, java.lang.Iterable<T2> data2, java.lang.Iterable<T3> data3, java.lang.Iterable<T4> data4, Function4<? super T1,? super T2,? super T3,? super T4,A> makeTerm)
Create a 4-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T1
- Type for dimension 1. -
T2
- Type for dimension 2. -
T3
- Type for dimension 3. -
T4
- Type for dimension 4. -
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
data3
- Data for dimension 3. -
data4
- Data for dimension 4. -
makeTerm
- Function to produce an expression for each data tuple. - Returns:
- The sum.
- Since:
- 43.00
-
sum
public static <T1,T2,T3,T4,A extends Expression> SumExpression sum(T1[] data1, T2[] data2, T3[] data3, T4[] data4, Function4<? super T1,? super T2,? super T3,? super T4,A> makeTerm)
Create a 4-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T1
- Data type for dimension 1. -
T2
- Data type for dimension 2. -
T3
- Data type for dimension 3. -
T4
- Data type for dimension 4. -
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
data3
- Data for dimension 3. -
data4
- Data for dimension 4. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <A extends Expression> SumExpression sum(int[] data1, int[] data2, int[] data3, int[] data4, IntFunction4<A> makeTerm)
Create a 4-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
data3
- Data for dimension 3. -
data4
- Data for dimension 4. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <A extends Expression> SumExpression sum(int count1, int count2, int count3, int count4, int count5, IntFunction5<A> makeTerm)
Create a 5-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
A
- Type of expressions that are summed up. - Parameters:
-
count1
- Count for dimension 1. -
count2
- Count for dimension 2. -
count3
- Count for dimension 3. -
count4
- Count for dimension 4. -
count5
- Count for dimension 5. -
makeTerm
- Function to produce an expression for each data element. - Returns:
- The sum.
- Since:
- 43.00
-
sum
public static <T1,T2,T3,T4,T5,A extends Expression> SumExpression sum(java.lang.Iterable<T1> data1, java.lang.Iterable<T2> data2, java.lang.Iterable<T3> data3, java.lang.Iterable<T4> data4, java.lang.Iterable<T5> data5, Function5<? super T1,? super T2,? super T3,? super T4,? super T5,A> makeTerm)
Create a 5-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the return sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T1
- Type for dimension 1. -
T2
- Type for dimension 2. -
T3
- Type for dimension 3. -
T4
- Type for dimension 4. -
T5
- Type for dimension 5. -
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
data3
- Data for dimension 3. -
data4
- Data for dimension 4. -
data5
- Data for dimension 5. -
makeTerm
- Function to produce an expression for each data tuple. - Returns:
- The sum.
- Since:
- 43.00
-
sum
public static <T1,T2,T3,T4,T5,A extends Expression> SumExpression sum(T1[] data1, T2[] data2, T3[] data3, T4[] data4, T5[] data5, Function5<? super T1,? super T2,? super T3,? super T4,? super T5,A> makeTerm)
Create a 5-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
T1
- Data type for dimension 1. -
T2
- Data type for dimension 2. -
T3
- Data type for dimension 3. -
T4
- Data type for dimension 4. -
T5
- Data type for dimension 5. -
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
data3
- Data for dimension 3. -
data4
- Data for dimension 4. -
data5
- Data for dimension 5. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- Since:
- 43.00
-
sum
public static <A extends Expression> SumExpression sum(int[] data1, int[] data2, int[] data3, int[] data4, int[] data5, IntFunction5<A> makeTerm)
Create a 5-dimensional sum of expressions. Note that the terms are captured by reference, i.e., changing those terms later will affect the returned sum.Examples using
sum
:- Boxes02.java
- Capbgt2l.java
- CapitalBudgeting.java
- Catenary.java
- ContractAllocation.java
- CuttingStock.java
- ELS.java
- ELSCut.java
- ELSManagedCuts.java
- FacilityLocationArray.java
- FacilityLocationCollection.java
- Folio.java
- FolioCB.java
- FolioHeuristic.java
- FolioIIS.java
- FolioInit.java
- FolioMip1.java
- FolioMip2.java
- FolioMipIIS.java
- FolioQC.java
- FolioQP.java
- GeneralConstraints.java
- MultipleKnapsack_Arrays.java
- MultipleKnapsack_Collections.java
- MultipleProblems.java
- PolygonObjects.java
- Pplan.java
- Pplan2.java
- ProductionPlanning_Index.java
- PurchasePWL.java
- PurchaseSOS2.java
- QuadraticProgramming.java
- RecursiveFinancialPlanning.java
- Sangraalind.java
- SpecialOrderedSets.java
- SpecialOrderedSetsQuadratic.java
- TravelingSalesPerson.java
- Wagon.java
- Type Parameters:
-
A
- Type of expressions to be summed up. - Parameters:
-
data1
- Data for dimension 1. -
data2
- Data for dimension 2. -
data3
- Data for dimension 3. -
data4
- Data for dimension 4. -
data5
- Data for dimension 5. -
makeTerm
- Function to create terms. - Returns:
- The new expression.
- 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.