VariableBuilder.ColumnMap2Builder
- java.lang.Object
-
- com.dashoptimization.VariableBuilder.ColumnMap2Builder<K1,K2>
-
- Enclosing class:
- VariableBuilder
public static class VariableBuilder.ColumnMap2Builder<K1,K2> extends java.lang.Object
Build a 2-dimensional map of columns.- Since:
- 43.00
-
-
Constructor Summary
Constructor Description ColumnMap2Builder(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, XPRSprob prob)
Create a builder that will create a 2-dimensional map of columns from the specified data.ColumnMap2Builder(java.util.Collection<K1> coll1, java.util.Collection<K2> coll2, XPRSprob prob)
Deprecated.since 44.00, use the equivalent overload that takes Iterable argumentsColumnMap2Builder(K1[] arr1, K2[] arr2, XPRSprob prob)
Deprecated.since 44.00, use the equivalent overload that takes Iterable arguments
-
Method Summary
Modifier and Type Method Description HashMap2<K1,K2,java.lang.Integer>
toMap()
Create the columns specified by this builder.<I> I
toMap(java.util.function.Supplier<I> makeResult, Action4<I,K1,K2,java.lang.Integer> addResult)
Create the columns specified by this builder.VariableBuilder.ColumnMap2Builder<K1,K2>
withFilter(java.util.function.BiFunction<K1,K2,java.lang.Boolean> newFilter)
Set a filter that selects elements.VariableBuilder.ColumnMap2Builder<K1,K2>
withLB(double newLb)
Set a constant lower bound for all columns.VariableBuilder.ColumnMap2Builder<K1,K2>
withLB(java.util.function.BiFunction<K1,K2,java.lang.Double> newLb)
Set a lower bound that depends on the index.VariableBuilder.ColumnMap2Builder<K1,K2>
withLimit(double newLimit)
Set a constant limit for all columns.VariableBuilder.ColumnMap2Builder<K1,K2>
withLimit(java.util.function.BiFunction<K1,K2,java.lang.Double> newLimit)
Set a limit that depends on the index.VariableBuilder.ColumnMap2Builder<K1,K2>
withName(java.lang.String newName)
Set a constant name for all columns.VariableBuilder.ColumnMap2Builder<K1,K2>
withName(java.util.function.BiFunction<K1,K2,java.lang.String> newName)
Set a name that depends on the index.VariableBuilder.ColumnMap2Builder<K1,K2>
withType(ColumnType newType)
Set a constant type for all columns.VariableBuilder.ColumnMap2Builder<K1,K2>
withType(java.util.function.BiFunction<K1,K2,ColumnType> newType)
Set a type that depends on the index.VariableBuilder.ColumnMap2Builder<K1,K2>
withUB(double newUb)
Set a constant upper bound for all columns.VariableBuilder.ColumnMap2Builder<K1,K2>
withUB(java.util.function.BiFunction<K1,K2,java.lang.Double> newUb)
Set a upper bound that depends on the index.
-
-
-
Constructor Detail
-
ColumnMap2Builder
@Deprecated public ColumnMap2Builder(java.util.Collection<K1> coll1, java.util.Collection<K2> coll2, XPRSprob prob)
Deprecated.since 44.00, use the equivalent overload that takes Iterable argumentsCreate a builder that will create a 2-dimensional map of columns from the specified data.- Parameters:
-
coll1
- Data for the builder. -
coll2
- Data for the builder. -
prob
- The problem for which to create columns. - Since:
- 43.00
-
ColumnMap2Builder
public ColumnMap2Builder(java.lang.Iterable<K1> iterable1, java.lang.Iterable<K2> iterable2, XPRSprob prob)
Create a builder that will create a 2-dimensional map of columns from the specified data.- Parameters:
-
iterable1
- Data for the builder. -
iterable2
- Data for the builder. -
prob
- The problem for which to create columns. - Since:
- 44.00
-
ColumnMap2Builder
@Deprecated public ColumnMap2Builder(K1[] arr1, K2[] arr2, XPRSprob prob)
Deprecated.since 44.00, use the equivalent overload that takes Iterable argumentsCreate a builder that will create a 2-dimensional map of columns from the specified arrays.- Parameters:
-
arr1
- Data for the builder. -
arr2
- Data for the builder. -
prob
- The problem for which to create columns. - Since:
- 43.00
-
-
Method Detail
-
withLB
public VariableBuilder.ColumnMap2Builder<K1,K2> withLB(java.util.function.BiFunction<K1,K2,java.lang.Double> newLb)
Set a lower bound that depends on the index.- Parameters:
-
newLb
- The lower bound for all columns created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withLB
public VariableBuilder.ColumnMap2Builder<K1,K2> withLB(double newLb)
Set a constant lower bound for all columns.- Parameters:
-
newLb
- The lower bound for all columns created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withUB
public VariableBuilder.ColumnMap2Builder<K1,K2> withUB(java.util.function.BiFunction<K1,K2,java.lang.Double> newUb)
Set a upper bound that depends on the index.- Parameters:
-
newUb
- The upper bound for all columns created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withUB
public VariableBuilder.ColumnMap2Builder<K1,K2> withUB(double newUb)
Set a constant upper bound for all columns.- Parameters:
-
newUb
- The upper bound for all columns created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withLimit
public VariableBuilder.ColumnMap2Builder<K1,K2> withLimit(java.util.function.BiFunction<K1,K2,java.lang.Double> newLimit)
Set a limit that depends on the index. A limit specifies the bounds for semi-continuous/integer columns and the limit for partial integer columns. It does not apply to columns of other types.- Parameters:
-
newLimit
- The limit for all columns created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withLimit
public VariableBuilder.ColumnMap2Builder<K1,K2> withLimit(double newLimit)
Set a constant limit for all columns. A limit specifies the bounds for semi-continuous/integer columns and the limit for partial integer columns. It does not apply to columns of other types.- Parameters:
-
newLimit
- The limit for all columns created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withName
public VariableBuilder.ColumnMap2Builder<K1,K2> withName(java.util.function.BiFunction<K1,K2,java.lang.String> newName)
Set a name that depends on the index.- Parameters:
-
newName
- The name for all columns created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withName
public VariableBuilder.ColumnMap2Builder<K1,K2> withName(java.lang.String newName)
Set a constant name for all columns.- Parameters:
-
newName
- The name for all columns created by this builder. This must benull
or a format string that will be invoked with the index as argument. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withType
public VariableBuilder.ColumnMap2Builder<K1,K2> withType(java.util.function.BiFunction<K1,K2,ColumnType> newType)
Set a type that depends on the index.- Parameters:
-
newType
- The type for all columns created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withType
public VariableBuilder.ColumnMap2Builder<K1,K2> withType(ColumnType newType)
Set a constant type for all columns.- Parameters:
-
newType
- The type for all columns created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withFilter
public VariableBuilder.ColumnMap2Builder<K1,K2> withFilter(java.util.function.BiFunction<K1,K2,java.lang.Boolean> newFilter)
Set a filter that selects elements.- Parameters:
-
newFilter
- Element filter - Returns:
- Always returns this instance.
- Since:
- 43.00
-
toMap
public HashMap2<K1,K2,java.lang.Integer> toMap()
Create the columns specified by this builder.- Returns:
- The created columns.
- Since:
- 43.00
-
toMap
public <I> I toMap(java.util.function.Supplier<I> makeResult, Action4<I,K1,K2,java.lang.Integer> addResult)
Create the columns specified by this builder.- Type Parameters:
-
I
- Type of result - Parameters:
-
makeResult
- Function to create an (empty) result. -
addResult
- Function to add an element to the result. - Returns:
- The created columns.
- 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.