8 #ifndef PAAL_AUCTION_TRAITS_HPP
9 #define PAAL_AUCTION_TRAITS_HPP
16 #include <boost/optional/optional.hpp>
19 #include <unordered_set>
30 template <
class Auction>
32 using bidders_universe_t =
33 decltype(std::declval<Auction>().
template get<bidders>());
34 using bidder_iterator_t =
35 typename boost::range_iterator<bidders_universe_t>::type;
38 using items_universe_t =
39 decltype(std::declval<Auction>().
template get<items>());
43 std::declval<Auction>().
template call<get_copies_num>(
44 std::declval<item_t>()
54 template <
class ValueQueryAuction>
59 using value_t =
puretype(std::declval<const ValueQueryAuction&>().
template call<value_query>(
60 std::declval<typename base::bidder_t>(),
61 std::unordered_set<typename base::item_val_t>()
70 template <
class DemandQueryAuction>
74 std::declval<DemandQueryAuction>().
template call<demand_query>(
81 using items_t =
typename result_t::first_type;
82 using value_t =
typename result_t::second_type;
90 template <
class GammaOracleAuction>
93 *std::declval<GammaOracleAuction>().
template call<gamma_oracle>(
103 using items_t =
typename temp_result_t::first_type;
104 using value_t =
typename temp_result_t::second_type::den_type;
106 using result_t = boost::optional<std::pair<items_t, frac_t>>;
111 #endif // PAAL_AUCTION_TRAITS_HPP
typename boost::range_value< Range >::type range_to_elem_t
for given range returns type of its element
auto make_dynamic_return_constant_functor(T t)
make function for dynamic_return_constant_functor
Types associated with value query auction.
#define puretype(t)
for given expression returns its type with removed const and reference
This file contains set of simple useful functors or functor adapters.
Types associated with all auctions.
Types associated with gamma oracle auction.
Implementation of fractions, which are used only for comparison purposes, and thus they can be used w...
Types associated with demand query auction.
typename boost::range_reference< Range >::type range_to_ref_t
for given range returns type of its reference
simple class to represent fraction