15 #ifndef PAAL_KNAPSACK_UNBOUNDED_FPTAS_HPP
16 #define PAAL_KNAPSACK_UNBOUNDED_FPTAS_HPP
22 #include <boost/function_output_iterator.hpp>
26 template <
typename OutputIterator,
typename Objects,
27 typename ObjectSizeFunctor,
typename ObjectValueFunctor>
28 typename detail::knapsack_base<Objects, ObjectSizeFunctor,
29 ObjectValueFunctor>::return_type
30 knapsack_unbounded_on_value_fptas(
31 double epsilon, Objects && objects,
32 detail::FunctorOnRangePValue<ObjectSizeFunctor, Objects>
34 OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value) {
35 return detail::knapsack_general_on_value_fptas_retrieve(
36 epsilon, detail::make_knapsack_data(std::forward<Objects>(objects), capacity, size, value, out),
37 detail::unbounded_tag{});
40 template <
typename OutputIterator,
typename Objects,
41 typename ObjectSizeFunctor,
typename ObjectValueFunctor>
42 typename detail::knapsack_base<Objects, ObjectSizeFunctor,
43 ObjectValueFunctor>::return_type
44 knapsack_unbounded_on_size_fptas(
45 double epsilon, Objects && objects,
46 detail::FunctorOnRangePValue<ObjectSizeFunctor, Objects>
48 OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value) {
49 return detail::knapsack_general_on_size_fptas_retrieve(
50 epsilon, detail::make_knapsack_data(std::forward<Objects>(objects), capacity, size, value, out),
51 detail::unbounded_tag{});
56 #endif // PAAL_KNAPSACK_UNBOUNDED_FPTAS_HPP