All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
Public Member Functions | List of all members
paal::subset_backtrack< Element > Class Template Reference

detail More...

#include <subset_backtrack.hpp>

Public Member Functions

template<class Elements >
 subset_backtrack (const Elements &elements)
 constructor
 
boost::iterator_range
< typename std::vector
< Element >::const_iterator > 
get_moves () const
 return range of all Elements that we will be trying to add to the current set
 
template<typename TryPush , typename OnPop , typename UpdateMoves = std::mem_fun_ref_t< typename std::vector<Element>::iterator, std::vector<int>>>
void solve (TryPush try_push, OnPop on_pop, UpdateMoves update_moves=UpdateMoves(&std::vector< Element >::end))
 

Detailed Description

template<typename Element>
class paal::subset_backtrack< Element >

detail

we go through all subsets of the input

Definition at line 36 of file subset_backtrack.hpp.

Member Function Documentation

template<typename Element >
template<typename TryPush , typename OnPop , typename UpdateMoves = std::mem_fun_ref_t< typename std::vector<Element>::iterator, std::vector<int>>>
void paal::subset_backtrack< Element >::solve ( TryPush  try_push,
OnPop  on_pop,
UpdateMoves  update_moves = UpdateMoves(&std::vector<Element>::end) 
)
inline
Parameters
try_pushtry add element to solution. return true iff it is successful.
on_pop
update_movesThis function allows user to change the order of moves. User can also remove moves. User gets range of possible elements and returns an iterator to the element that follows the last element not removed

Definition at line 75 of file subset_backtrack.hpp.


The documentation for this class was generated from the following file: