VariableBuilder.MapBuilder
- java.lang.Object
-
- com.dashoptimization.VariableBuilder.MapBuilder<K1>
-
- Enclosing class:
- VariableBuilder
public static class VariableBuilder.MapBuilder<K1> extends java.lang.Object
Build a 1-dimensional map of columns or variables.- Since:
- 43.00
-
-
Constructor Summary
Constructor Description MapBuilder(java.lang.Iterable<K1> iterable1)
Create a builder that will create a 1-dimensional map of columns or variables from the specified data.MapBuilder(java.util.Collection<K1> coll1)
Deprecated.since 44.00, use the equivalent overload that takes Iterable argumentsMapBuilder(java.util.stream.Stream<K1> strm)
Create a builder that will create a 1-dimensional map of columns or variables from the specified stream.MapBuilder(K1[] arr1)
Deprecated.since 44.00, use the equivalent overload that takes Iterable arguments
-
Method Summary
Modifier and Type Method Description java.util.HashMap<K1,Variable>
build(XpressProblem prob)
Create variables as specified by this builder.java.util.HashMap<K1,java.lang.Integer>
build(XPRSprob prob)
Create columns as specified by this builder.VariableBuilder.MapBuilder<K1>
withFilter(java.util.function.Function<K1,java.lang.Boolean> newFilter)
Set a filter that selects elements.VariableBuilder.MapBuilder<K1>
withLB(double newLb)
Set a constant lower bound for all columns or variables.VariableBuilder.MapBuilder<K1>
withLB(java.util.function.Function<K1,java.lang.Double> newLb)
Set a lower bound that depends on the index.VariableBuilder.MapBuilder<K1>
withLimit(double newLimit)
Set a constant limit for all columns or variables.VariableBuilder.MapBuilder<K1>
withLimit(java.util.function.Function<K1,java.lang.Double> newLimit)
Set a limit that depends on the index.VariableBuilder.MapBuilder<K1>
withName(java.lang.String newName)
Set a constant name for all columns or variables.VariableBuilder.MapBuilder<K1>
withName(java.util.function.Function<K1,java.lang.String> newName)
Set a name that depends on the index.VariableBuilder.MapBuilder<K1>
withType(ColumnType newType)
Set a constant type for all columns or variables.VariableBuilder.MapBuilder<K1>
withType(java.util.function.Function<K1,ColumnType> newType)
Set a type that depends on the index.VariableBuilder.MapBuilder<K1>
withUB(double newUb)
Set a constant upper bound for all columns or variables.VariableBuilder.MapBuilder<K1>
withUB(java.util.function.Function<K1,java.lang.Double> newUb)
Set a upper bound that depends on the index.
-
-
-
Constructor Detail
-
MapBuilder
@Deprecated public MapBuilder(java.util.Collection<K1> coll1)
Deprecated.since 44.00, use the equivalent overload that takes Iterable argumentsCreate a builder that will create a 1-dimensional map of columns or variables from the specified data.- Parameters:
-
coll1
- Data for the builder. - Since:
- 43.00
-
MapBuilder
public MapBuilder(java.lang.Iterable<K1> iterable1)
Create a builder that will create a 1-dimensional map of columns or variables from the specified data.- Parameters:
-
iterable1
- Data for the builder. - Since:
- 44.00
-
MapBuilder
@Deprecated public MapBuilder(K1[] arr1)
Deprecated.since 44.00, use the equivalent overload that takes Iterable argumentsCreate a builder that will create a 1-dimensional map of columns or variables from the specified arrays.- Parameters:
-
arr1
- Data for the builder. - Since:
- 43.00
-
MapBuilder
public MapBuilder(java.util.stream.Stream<K1> strm)
Create a builder that will create a 1-dimensional map of columns or variables from the specified stream.- Parameters:
-
strm
- Data for creating columns or variables. - Since:
- 43.00
-
-
Method Detail
-
withLB
public VariableBuilder.MapBuilder<K1> withLB(java.util.function.Function<K1,java.lang.Double> newLb)
Set a lower bound that depends on the index.- Parameters:
-
newLb
- The lower bound for all columns or variables created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withLB
public VariableBuilder.MapBuilder<K1> withLB(double newLb)
Set a constant lower bound for all columns or variables.- Parameters:
-
newLb
- The lower bound for all columns or variables created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withUB
public VariableBuilder.MapBuilder<K1> withUB(java.util.function.Function<K1,java.lang.Double> newUb)
Set a upper bound that depends on the index.- Parameters:
-
newUb
- The upper bound for all columns or variables created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withUB
public VariableBuilder.MapBuilder<K1> withUB(double newUb)
Set a constant upper bound for all columns or variables.- Parameters:
-
newUb
- The upper bound for all columns or variables created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withLimit
public VariableBuilder.MapBuilder<K1> withLimit(java.util.function.Function<K1,java.lang.Double> newLimit)
Set a limit that depends on the index. A limit specifies the bounds for semi-continuous/integer columns or variables and the limit for partial integer columns or variables. It does not apply to columns or variables of other types.- Parameters:
-
newLimit
- The limit for all columns or variables created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withLimit
public VariableBuilder.MapBuilder<K1> withLimit(double newLimit)
Set a constant limit for all columns or variables. A limit specifies the bounds for semi-continuous/integer columns or variables and the limit for partial integer columns or variables. It does not apply to columns or variables of other types.- Parameters:
-
newLimit
- The limit for all columns or variables created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withName
public VariableBuilder.MapBuilder<K1> withName(java.util.function.Function<K1,java.lang.String> newName)
Set a name that depends on the index.- Parameters:
-
newName
- The name for all columns or variables created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withName
public VariableBuilder.MapBuilder<K1> withName(java.lang.String newName)
Set a constant name for all columns or variables.- Parameters:
-
newName
- The name for all columns or variables 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.MapBuilder<K1> withType(java.util.function.Function<K1,ColumnType> newType)
Set a type that depends on the index.- Parameters:
-
newType
- The type for all columns or variables created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withType
public VariableBuilder.MapBuilder<K1> withType(ColumnType newType)
Set a constant type for all columns or variables.- Parameters:
-
newType
- The type for all columns or variables created by this builder. - Returns:
- Always returns this instance.
- Since:
- 43.00
-
withFilter
public VariableBuilder.MapBuilder<K1> withFilter(java.util.function.Function<K1,java.lang.Boolean> newFilter)
Set a filter that selects elements.- Parameters:
-
newFilter
- Element filter - Returns:
- Always returns this instance.
- Since:
- 43.00
-
build
public java.util.HashMap<K1,java.lang.Integer> build(XPRSprob prob)
Create columns as specified by this builder.- Parameters:
-
prob
- The problem in which to create the columns. - Returns:
- The generated columns.
- Since:
- 43.00
-
build
public java.util.HashMap<K1,Variable> build(XpressProblem prob)
Create variables as specified by this builder.- Parameters:
-
prob
- The problem in which to create the variables. - Returns:
- The generated variables.
- 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.