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)) |
detail
we go through all subsets of the input
Definition at line 36 of file subset_backtrack.hpp.
|
inline |
try_push | try add element to solution. return true iff it is successful. |
on_pop | |
update_moves | This 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.