All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
Classes | Typedefs | Functions | Variables
paal::greedy::detail Namespace Reference

Detail of Greedy namespace. More...

Classes

struct  sched_traits
 
class  compare
 
struct  set_data_type
 
class  selector
 
class  prefix_tree
 
class  shortest_superstring
 class to solve shortest superstring 3.5 aproximation, using greedy algorithm: contract pair of words with largest overlap until one word stays

#include <iostream>
#include <string>
int main() {
std::vector<std::string> words({ "ba", "ab", "aa", "bb" });
std::cout << paal::greedy::shortestSuperstring(words) << std::endl;
}
More...
 

Typedefs

template<typename SetReference , typename GetElementsOfSet , typename GetWeightOfElement >
using element_weight_t = pure_result_of_t< GetWeightOfElement(range_to_elem_t< pure_result_of_t< GetElementsOfSet(SetReference)>>)>
 
template<typename SetRange , typename GetCostOfSet >
using set_range_cost_t = pure_result_of_t< GetCostOfSet(typename boost::range_reference< SetRange >::type)>
 

Functions

template<class MachineIterator , class JobIterator , class GetSpeed , class GetLoad , class Traits = sched_traits< MachineIterator, JobIterator, GetSpeed, GetLoad>>
Traits::frac_t calculate_bound (const MachineIterator mfirst, const MachineIterator mlast, const JobIterator jfirst, const JobIterator jlast, GetSpeed get_speed, GetLoad get_load)
 
template<class MachineIterator , class JobIterator , class OutputIterator , class GetSpeed , class GetLoad , class RoundFun >
void schedule (MachineIterator mfirst, MachineIterator mlast, JobIterator jfirst, JobIterator jlast, OutputIterator result, GetSpeed get_speed, GetLoad get_load, RoundFun round)
 
template<class Budget , class SetCost , class SetIdToData , class ElementWeight , class SetIdToElements , class ElementIndex , class GetWeightOfElement , typename DecreseWeight >
auto make_selector (const Budget budget, SetCost &cost_of_solution, SetIdToData &sets_data, const ElementWeight &weight_of_bests_solution, ElementWeight &weight_of_covered_elements, SetIdToElements set_id_to_elements, std::vector< int > &covered_by, std::vector< std::vector< int >> &sets_covering_element, ElementIndex &get_el_index, GetWeightOfElement &element_to_weight, DecreseWeight decrese_weight)
 

Variables

const int UNCOVERED = -1
 

Detailed Description

Detail of Greedy namespace.