All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
Classes | Namespaces | Functions
knapsack_0_1.hpp File Reference
#include "paal/utils/functors.hpp"
#include "paal/utils/knapsack_utils.hpp"
#include "paal/utils/less_pointees.hpp"
#include "paal/utils/irange.hpp"
#include "paal/dynamic/knapsack/fill_knapsack_dynamic_table.hpp"
#include "paal/dynamic/knapsack/knapsack_common.hpp"
#include "paal/greedy/knapsack_0_1_two_app.hpp"
#include <boost/range/adaptor/reversed.hpp>
#include <boost/function_output_iterator.hpp>
#include <boost/optional.hpp>
#include <vector>

Go to the source code of this file.

Classes

struct  paal::detail::Knapsack_0_1_get_position_range
 For 0/1 knapsack dynamic algorithm for given element the table has to be traversed from the highest to the lowest element. More...
 
class  paal::detail::Knapsack_0_1< Objects, ObjectSizeFunctor, ObjectValueFunctor, Comparator >
 This class helps solving 0/1 knapsack problem. Function solve returns the optimal value Function Retrieve solution returns chosen elements. More...
 

Namespaces

 paal
 global namespace of project.
 
 paal::detail
 Detail namespace.
 

Functions

template<typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor , typename Comparator >
Knapsack_0_1< Objects,
ObjectSizeFunctor,
ObjectValueFunctor, Comparator > 
paal::detail::make_knapsack_0_1 (ObjectSizeFunctor size, ObjectValueFunctor value, Comparator comp)
 
template<typename Knapsack , typename IndexType , typename ValueType , typename Objects , typename OutputIterator >
void paal::detail::retrieve_solution (const Knapsack &knapsack, ValueType maxValue, IndexType size, Objects &&objects, OutputIterator &out, retrieve_solution_tag)
 
template<typename Knapsack , typename IndexType , typename ValueType , typename Objects , typename OutputIterator >
void paal::detail::retrieve_solution (const Knapsack &knapsack, ValueType maxValue, IndexType size, Objects &&objects, OutputIterator &out, no_retrieve_solution_tag)
 
template<typename KnapsackData , typename retrieve_solution_tag >
auto paal::detail::knapsack (KnapsackData knap_data, zero_one_tag, integral_size_tag, retrieve_solution_tag retrieve_solutionTag)
 Solution to Knapsack 0/1 problem overload for integral Size case.
 
template<typename KnapsackData , typename retrieve_solution_tag >
auto paal::detail::knapsack (KnapsackData knap_data, zero_one_tag, integral_value_tag, retrieve_solution_tag retrieve_solutionTag)
 Solution to Knapsack 0/1 problem overload for integral Value case.
 
template<typename Objects , typename OutputIterator , typename ObjectSizeFunctor , typename ObjectValueFunctor = utils::return_one_functor>
auto paal::knapsack_0_1 (Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value=ObjectValueFunctor{})
 Solution to Knapsack 0/1 problem. More...
 
template<typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor = utils::return_one_functor>
auto paal::knapsack_0_1_no_output (Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, ObjectSizeFunctor size, ObjectValueFunctor value=ObjectValueFunctor{})
 Solution to Knapsack 0/1 problem, without retrieving the objects in the solution. More...
 

Detailed Description

Author
Piotr Wygocki
Version
1.0
Date
2013-09-30

Definition in file knapsack_0_1.hpp.