Adiar 2.1.0
An External Memory Decision Diagram Library
|
The bridge between you and Adiar. More...
Function Objects | |
To bridge the gap between your algorithms and their data structures and the algorithms of Adiar, we use the abstract notion of predicate, consumer, and generator functions. | |
template<typename TypeSignature > | |
using | adiar::function = std::function< TypeSignature > |
General-purpose polymorphic function wrapper. | |
template<typename... Args> | |
using | adiar::predicate = function< bool(Args...)> |
Predicate function given value(s) of type(s) Args . | |
template<typename Arg > | |
using | adiar::consumer = function< void(Arg)> |
Consumer function of value(s) of type(s) Args . | |
template<typename VarType > | |
using | adiar::cost = function< double(VarType)> |
Cost function that assigns a cost to each variable. | |
template<typename RetType > | |
using | adiar::generator = function< optional< RetType >()> |
Generator function that produces a new value of RetType for each call. | |
template<typename ValueType , typename OutputIt > | |
consumer< ValueType > | adiar::make_consumer (OutputIt &iter) |
Wrap an iterator into a consumer function. | |
template<typename ValueType , typename OutputIt > | |
consumer< ValueType > | adiar::make_consumer (OutputIt &&iter) |
Wrap an iterator into a consumer function. | |
template<typename OutputIt > | |
consumer< typename OutputIt::container_type::value_type > | adiar::make_consumer (OutputIt &iter) |
Wrap an iterator into a consumer function. | |
template<typename OutputIt > | |
consumer< typename OutputIt::container_type::value_type > | adiar::make_consumer (OutputIt &&iter) |
Wrap an iterator into a consumer function. | |
template<typename ForwardIt > | |
consumer< typename ForwardIt::value_type > | adiar::make_consumer (ForwardIt &begin, ForwardIt &end) |
Wrap a begin and end iterator pair into a consumer function. | |
template<typename ForwardIt > | |
consumer< typename ForwardIt::value_type > | adiar::make_consumer (ForwardIt &&begin, ForwardIt &&end) |
Wrap a begin and end iterator pair into a consumer function. | |
template<typename ForwardIt > | |
generator< typename ForwardIt::value_type > | adiar::make_generator (ForwardIt &begin, ForwardIt &end) |
Wrap a begin and end iterator pair into a generator function. | |
template<typename ForwardIt > | |
generator< typename ForwardIt::value_type > | adiar::make_generator (ForwardIt &&begin, ForwardIt &&end) |
Wrap a begin and end iterator pair into a generator function. | |
template<typename Stream > | |
generator< typename Stream::value_type > | adiar::make_generator (Stream &s) |
Wrap an adiar::internal::file_stream into a generator function. | |
template<typename RetType > | |
generator< RetType > | adiar::make_generator (const RetType &r) |
Wrap a single value into a generator. | |
The bridge between you and Adiar.
Consumer function of value(s) of type(s) Args
.
Args | List of the argument's type in the order, they are supposed to be given. |
Cost function that assigns a cost to each variable.
VarType | Type of variable labels. |
using adiar::function = typedef std::function<TypeSignature> |
General-purpose polymorphic function wrapper.
TypeSignature | The type signature of the form ret_t (args_t...) . |
Generator function that produces a new value of RetType
for each call.
make_optional<T>()
.RetType | Type of each yielded value from the generator. |
using adiar::predicate = typedef function<bool(Args...)> |
Predicate function given value(s) of type(s) Args
.
Args | List of the argument's type in the order, they are supposed to be given. This list may be empty. |
|
inline |
Wrap a begin
and end
iterator pair into a consumer function.
out_of_range
if end
is reached but more values are to be added, i.e. if the given range is not large enough for all values to be consumed.
|
inline |
Wrap a begin
and end
iterator pair into a consumer function.
out_of_range
if end
is reached but more values are to be added, i.e. if the given range is not large enough for all values to be consumed.