Implements threaded version of exhaustive (optimal) search yielding optimal feature subset with respect to chosen criterion. More...
#include <search_exhaustive_threaded.hpp>
Classes | |
struct | ThreadLocal |
thread-local storage of current subset candidate, criterion clone, and tracker clone More... | |
Public Types | |
typedef Search< RETURNTYPE, DIMTYPE, SUBSET, CRITERION > | parent |
typedef boost::shared_ptr < CRITERION > | PCriterion |
typedef boost::shared_ptr< SUBSET > | PSubset |
Public Member Functions | |
virtual bool | search (const DIMTYPE target_d, RETURNTYPE &result, const PSubset sub, const PCriterion crit, std::ostream &os=std::cout) |
returns found subset of target_d features (optimizes cardinality if target_d==0) + criterion value | |
virtual std::ostream & | print (std::ostream &os) const |
Protected Member Functions | |
void | evaluator_thread (unsigned int idx) |
bool | get_candidate (PSubset &sub) |
generates next candidate, then copies it to sub | |
Protected Attributes | |
PCriterion | template_crit |
ThreadLocal | tlocal [max_threads] |
boost::mutex | mutex_candidate_generator |
PSubset | _candidate_generator |
DIMTYPE | _cardinality |
DIMTYPE | _target_d |
bool | _generate_first |
for current cardinality determines whether to call getFirstCandidateSubset or getNextCandidateSubset | |
boost::shared_ptr< StopWatch > | swatch |
Implements threaded version of exhaustive (optimal) search yielding optimal feature subset with respect to chosen criterion.
Concurrently evaluates each subset candidate using clones of the supplied criterion and returns the one subset that yielded highest criterion value
PCriterion FST::Search_Exhaustive_Threaded< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, max_threads >::template_crit [protected] |
to detect change of criterion inbetween search() calls
Referenced by FST::Search_Exhaustive_Threaded< RETURNTYPE, DIMTYPE, SUBSET, CRITERION, max_threads >::search().