Initializing help system before first use

VariableMap2Builder

Build a 2-dimensional map of variables. More...

#include <xpress.hpp>

Public Member Functions

template<typename Iter0 , typename Iter1 , typename Iter0IsIterable = typename std::enable_if<xpress::is_iterable<Iter0>::value>::type, typename Iter1IsIterable = typename std::enable_if<xpress::is_iterable<Iter1>::value>::type>
  VariableMap2Builder (Iter0 const &iterable1, Iter1 const &iterable2, xpress::objects::XpressProblem *prob)
  Create a builder that will create a 2-dimensional map of variables from the specified data.
 
auto  toMap () -> xpress::maps::HashMap2< K1, K2, xpress::objects::Variable >
  Create the variables specified by this builder.
 
template<typename I , typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0>::type,I>::value>::type>
auto  toMap (Func0 makeResult, std::function< void(I &, K1, K2, xpress::objects::Variable)> addResult) -> I
  Create the variables specified by this builder.
 
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,bool>::value>::type>
auto  withFilter (Func0 newFilter) -> VariableMap2Builder< K1, K2 > &
  Set a filter that selects elements.
 
auto  withLB (double newLb) -> VariableMap2Builder< K1, K2 > &
  Set a constant lower bound for all variables.
 
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,double>::value>::type>
auto  withLB (Func0 newLb) -> VariableMap2Builder< K1, K2 > &
  Set a lower bound that depends on the index.
 
auto  withLimit (double newLimit) -> VariableMap2Builder< K1, K2 > &
  Set a constant limit for all variables.
 
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,double>::value>::type>
auto  withLimit (Func0 newLimit) -> VariableMap2Builder< K1, K2 > &
  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,K1,K2>::type,std::optional<std::string>>::value>::type>
auto  withName (Func0 newName) -> VariableMap2Builder< K1, K2 > &
  Set a name that depends on the index.
 
auto  withName (std::optional< std::string > newName) -> VariableMap2Builder< K1, K2 > &
  Set a constant name for all variables.
 
auto  withType (ColumnType newType) -> VariableMap2Builder< K1, K2 > &
  Set a constant type for all variables.
 
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,ColumnType>::value>::type>
auto  withType (Func0 newType) -> VariableMap2Builder< K1, K2 > &
  Set a type that depends on the index.
 
auto  withUB (double newUb) -> VariableMap2Builder< K1, K2 > &
  Set a constant upper bound for all variables.
 
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,double>::value>::type>
auto  withUB (Func0 newUb) -> VariableMap2Builder< K1, K2 > &
  Set a upper bound that depends on the index.
 

Detailed Description

template<typename K1, typename K2>
class xpress::VariableBuilder::VariableMap2Builder< K1, K2 >

Build a 2-dimensional map of variables.

Since
44.00

Constructor & Destructor Documentation

VariableMap2Builder()

template<typename K1 , typename K2 >
template<typename Iter0 , typename Iter1 , typename Iter0IsIterable = typename std::enable_if<xpress::is_iterable<Iter0>::value>::type, typename Iter1IsIterable = typename std::enable_if<xpress::is_iterable<Iter1>::value>::type>
xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::VariableMap2Builder ( Iter0 const & iterable1,
Iter1 const & iterable2,
xpress::objects::XpressProblem * prob )
inline

Create a builder that will create a 2-dimensional map of variables from the specified data.

Parameters
iterable1 Data for the builder.
iterable2 Data for the builder.
prob The problem for which to create variables.
Template Parameters
Iter0 Something that supports begin() and end() and contains values of type K1.
Iter1 Something that supports begin() and end() and contains values of type K2.
Since
44.00

Member Function Documentation

toMap() [1/2]

template<typename K1 , typename K2 >
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::toMap ( ) -> xpress::maps::HashMap2<K1 ,K2,xpress::objects::Variable>
inline

Create the variables specified by this builder.

Returns
The created variables.
Since
44.00

toMap() [2/2]

template<typename K1 , typename K2 >
template<typename I , typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0>::type,I>::value>::type>
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::toMap ( Func0 makeResult,
std::function< void(I &, K1, K2, xpress::objects::Variable)> addResult ) -> I
inline

Create the variables specified by this builder.

Parameters
makeResult Function to create an (empty) result.
addResult Function to add an element to the result.
Template Parameters
I Type of result
Func0 auto () -> I: Maps () to I.
Returns
The created variables.
Since
44.00

withFilter()

template<typename K1 , typename K2 >
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,bool>::value>::type>
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withFilter ( Func0 newFilter ) -> VariableMap2Builder<K1,K2>&
inline

Set a filter that selects elements.

Parameters
newFilter Element filter
Template Parameters
Func0 auto (K1,K2) -> bool: Maps (K1,K2) to bool.
Returns
Always returns this instance.
Since
44.00

withLB() [1/2]

template<typename K1 , typename K2 >
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withLB ( double newLb ) -> VariableMap2Builder<K1,K2>&
inline

Set a constant lower bound for all variables.

Parameters
newLb The lower bound for all variables created by this builder.
Returns
Always returns this instance.
Since
44.00

withLB() [2/2]

template<typename K1 , typename K2 >
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,double>::value>::type>
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withLB ( Func0 newLb ) -> VariableMap2Builder<K1,K2>&
inline

Set a lower bound that depends on the index.

Parameters
newLb The lower bound for all variables created by this builder.
Template Parameters
Func0 auto (K1,K2) -> double: Maps (K1,K2) to double.
Returns
Always returns this instance.
Since
44.00

withLimit() [1/2]

template<typename K1 , typename K2 >
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withLimit ( double newLimit ) -> VariableMap2Builder<K1,K2>&
inline

Set a constant limit for all variables.

A limit specifies the bounds for semi-continuous/integer variables and the limit for partial integer variables. It does not apply to variables of other types.

Parameters
newLimit The limit for all variables created by this builder.
Returns
Always returns this instance.
Since
44.00

withLimit() [2/2]

template<typename K1 , typename K2 >
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,double>::value>::type>
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withLimit ( Func0 newLimit ) -> VariableMap2Builder<K1,K2>&
inline

Set a limit that depends on the index.

A limit specifies the bounds for semi-continuous/integer variables and the limit for partial integer variables. It does not apply to variables of other types.

Parameters
newLimit The limit for all variables created by this builder.
Template Parameters
Func0 auto (K1,K2) -> double: Maps (K1,K2) to double.
Returns
Always returns this instance.
Since
44.00

withName() [1/2]

template<typename K1 , typename K2 >
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,std::optional<std::string>>::value>::type>
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withName ( Func0 newName ) -> VariableMap2Builder<K1,K2>&
inline

Set a name that depends on the index.

Parameters
newName The name for all variables created by this builder.
Template Parameters
Func0 auto (K1,K2) -> std::optional<std::string>: Maps (K1,K2) to std::optional<std::string>.
Returns
Always returns this instance.
Since
44.00

withName() [2/2]

template<typename K1 , typename K2 >
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withName ( std::optional< std::string > newName ) -> VariableMap2Builder<K1,K2>&
inline

Set a constant name for all variables.

Parameters
newName The name for all 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]

template<typename K1 , typename K2 >
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withType ( ColumnType newType ) -> VariableMap2Builder<K1,K2>&
inline

Set a constant type for all variables.

Parameters
newType The type for all variables created by this builder.
Returns
Always returns this instance.
Since
44.00

withType() [2/2]

template<typename K1 , typename K2 >
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,ColumnType>::value>::type>
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withType ( Func0 newType ) -> VariableMap2Builder<K1,K2>&
inline

Set a type that depends on the index.

Parameters
newType The type for all variables created by this builder.
Template Parameters
Func0 auto (K1,K2) -> ColumnType: Maps (K1,K2) to ColumnType.
Returns
Always returns this instance.
Since
44.00

withUB() [1/2]

template<typename K1 , typename K2 >
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withUB ( double newUb ) -> VariableMap2Builder<K1,K2>&
inline

Set a constant upper bound for all variables.

Parameters
newUb The upper bound for all variables created by this builder.
Returns
Always returns this instance.
Since
44.00

withUB() [2/2]

template<typename K1 , typename K2 >
template<typename Func0 , typename Func0Invocable = typename std::enable_if<std::is_convertible<typename std::invoke_result<Func0,K1,K2>::type,double>::value>::type>
auto xpress::VariableBuilder::VariableMap2Builder< K1, K2 >::withUB ( Func0 newUb ) -> VariableMap2Builder<K1,K2>&
inline

Set a upper bound that depends on the index.

Parameters
newUb The upper bound for all variables created by this builder.
Template Parameters
Func0 auto (K1,K2) -> double: Maps (K1,K2) to double.
Returns
Always returns this instance.
Since
44.00

The documentation for this class was generated from the following file:
  • xpress.hpp

© 2001-2024 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.