ArrayBuilder
Build a 1-dimensional array of columns or variables. More...
#include <xpress.hpp>
Public Member Functions |
|
ArrayBuilder (int dim) | |
Create a builder that will create a multi-dimensional array of columns or variables with the specified dimensions. |
|
auto | build (xpress::objects::XpressProblem *prob) -> std::vector< xpress::objects::Variable > |
Create variables as specified by this builder. |
|
auto | build (XPRSProblem *prob) -> std::vector< int > |
Create columns as specified by this builder. |
|
auto | withLB (double newLb) -> ArrayBuilder & |
Set a constant lower bound for all columns or variables. |
|
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,int>::type,double>::value>::type> | |
auto | withLB (Func0 newLb) -> ArrayBuilder & |
Set a lower bound that depends on the index. |
|
auto | withLimit (double newLimit) -> ArrayBuilder & |
Set a constant limit for all columns or variables. |
|
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,int>::type,double>::value>::type> | |
auto | withLimit (Func0 newLimit) -> ArrayBuilder & |
Set a limit that depends on the index. |
|
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,int>::type,std::optional<std::string>>::value>::type> | |
auto | withName (Func0 newName) -> ArrayBuilder & |
Set a name that depends on the index. |
|
auto | withName (std::optional< std::string > newName) -> ArrayBuilder & |
Set a constant name for all columns or variables. |
|
auto | withType (ColumnType newType) -> ArrayBuilder & |
Set the type for all columns or variables. |
|
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,int>::type,ColumnType>::value>::type> | |
auto | withType (Func0 newType) -> ArrayBuilder & |
Set a type that depends on the index. |
|
auto | withUB (double newUb) -> ArrayBuilder & |
Set a constant upper bound for all columns or variables. |
|
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,int>::type,double>::value>::type> | |
auto | withUB (Func0 newUb) -> ArrayBuilder & |
Set a upper bound that depends on the index. |
|
Detailed Description
Build a 1-dimensional array of columns or variables.
- Since
- 44.00
Constructor & Destructor Documentation
ArrayBuilder()
|
inline |
Create a builder that will create a multi-dimensional array of columns or variables with the specified dimensions.
- Parameters
-
dim Dimension.
- Since
- 44.00
Member Function Documentation
build() [1/2]
|
inline |
Create variables as specified by this builder.
- Parameters
-
prob The problem in which to create the variables.
- Returns
- The generated variables.
- Since
- 44.00
build() [2/2]
|
inline |
Create columns as specified by this builder.
- Parameters
-
prob The problem in which to create the columns.
- Returns
- Indices of the generated columns.
- Since
- 44.00
withLB() [1/2]
|
inline |
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
- 44.00
withLB() [2/2]
|
inline |
Set a lower bound that depends on the index.
- Parameters
-
newLb The lower bound for all columns or variables created by this builder.
- Template Parameters
-
Func0 auto (int) -> double
: Maps(int)
todouble
.
- Returns
- Always returns this instance.
- Since
- 44.00
withLimit() [1/2]
|
inline |
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
- 44.00
withLimit() [2/2]
|
inline |
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.
- Template Parameters
-
Func0 auto (int) -> double
: Maps(int)
todouble
.
- Returns
- Always returns this instance.
- Since
- 44.00
withName() [1/2]
|
inline |
Set a name that depends on the index.
- Parameters
-
newName The name for all columns or variables created by this builder.
- Template Parameters
-
Func0 auto (int) -> std::optional<std::string>
: Maps(int)
tostd::optional<std::string>
.
- Returns
- Always returns this instance.
- Since
- 44.00
withName() [2/2]
|
inline |
Set a constant name for all columns or variables.
- Parameters
-
newName The name for all columns or variables created by this builder. This must be std::nullopt
or a format string that will be invoked with the index as argument.
- Returns
- Always returns this instance.
- Since
- 44.00
withType() [1/2]
|
inline |
Set the 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
- 44.00
withType() [2/2]
|
inline |
Set a type that depends on the index.
- Parameters
-
newType The type for all columns or variables created by this builder.
- Template Parameters
-
Func0 auto (int) -> ColumnType
: Maps(int)
toColumnType
.
- Returns
- Always returns this instance.
- Since
- 44.00
withUB() [1/2]
|
inline |
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
- 44.00
withUB() [2/2]
|
inline |
Set a upper bound that depends on the index.
- Parameters
-
newUb The upper bound for all columns or variables created by this builder.
- Template Parameters
-
Func0 auto (int) -> double
: Maps(int)
todouble
.
- Returns
- Always returns this instance.
- Since
- 44.00
The documentation for this class was generated from the following file:
- xpress.hpp
© 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.