15 #ifndef PAAL_KNAPSACK_0_1_FPTAS_HPP
16 #define PAAL_KNAPSACK_0_1_FPTAS_HPP
23 template <
typename OutputIterator,
typename Objects,
typename ObjectSizeFunctor,
24 typename ObjectValueFunctor>
25 typename detail::knapsack_base<Objects, ObjectSizeFunctor,
26 ObjectValueFunctor>::return_type
27 knapsack_0_1_on_value_fptas(
28 double epsilon, Objects &&objects,
29 detail::FunctorOnRangePValue<ObjectSizeFunctor, Objects>
31 OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value) {
32 return detail::knapsack_general_on_value_fptas_retrieve(
33 epsilon, detail::make_knapsack_data(std::forward<Objects>(objects),
34 capacity, size, value, out),
35 detail::zero_one_tag{});
38 template <
typename OutputIterator,
typename Objects,
typename ObjectSizeFunctor,
39 typename ObjectValueFunctor>
40 typename detail::knapsack_base<Objects, ObjectSizeFunctor,
41 ObjectValueFunctor>::return_type
42 knapsack_0_1_on_size_fptas(
43 double epsilon, Objects &&objects,
44 detail::FunctorOnRangePValue<ObjectSizeFunctor, Objects>
46 OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value) {
47 return detail::knapsack_general_on_size_fptas_retrieve(
48 epsilon, detail::make_knapsack_data(std::forward<Objects>(objects),
49 capacity, size, value, out),
50 detail::zero_one_tag{});
53 template <
typename Objects,
typename ObjectSizeFunctor,
54 typename ObjectValueFunctor>
55 typename detail::knapsack_base<Objects, ObjectSizeFunctor,
56 ObjectValueFunctor>::return_type
57 knapsack_0_1_no_output_on_value_fptas(
58 double epsilon, Objects &&objects,
59 detail::FunctorOnRangePValue<ObjectSizeFunctor, Objects>
61 ObjectSizeFunctor size, ObjectValueFunctor value) {
63 return detail::knapsack_general_on_value_fptas(
64 epsilon, detail::make_knapsack_data(std::forward<Objects>(objects),
65 capacity, size, value, out),
66 detail::zero_one_tag{}, detail::no_retrieve_solution_tag{});
69 template <
typename Objects,
typename ObjectSizeFunctor,
70 typename ObjectValueFunctor>
71 typename detail::knapsack_base<Objects, ObjectSizeFunctor,
72 ObjectValueFunctor>::return_type
73 knapsack_0_1_no_output_on_size_fptas(
74 double epsilon, Objects &&objects,
75 detail::FunctorOnRangePValue<ObjectSizeFunctor, Objects>
77 ObjectSizeFunctor size, ObjectValueFunctor value) {
79 return detail::knapsack_general_on_size_fptas(
80 epsilon, detail::make_knapsack_data(std::forward<Objects>(objects),
81 capacity, size, value, out),
82 detail::zero_one_tag{}, detail::no_retrieve_solution_tag{});
87 #endif // PAAL_KNAPSACK_0_1_FPTAS_HPP