|
|
typedef Search_Exhaustive< RETURNTYPE, DIMTYPE, SUBSET, CRITERION > | parent |
| | base class: the merged exhaustive search this shim configures with a threaded engine
|
| typedef parent::PEvaluatorEngine | PEvaluatorEngine |
|
typedef Search< RETURNTYPE, DIMTYPE, SUBSET, CRITERION > | parent |
| | base class: the generic search interface
|
|
typedef std::shared_ptr< CRITERION > | PCriterion |
| | shared pointer to the criterion being optimized
|
|
typedef std::shared_ptr< SUBSET > | PSubset |
| | shared pointer to a feature subset
|
|
typedef Candidate_Evaluator< RETURNTYPE, DIMTYPE, SUBSET, CRITERION > | EVALUATORENGINE |
| | the candidate-evaluation engine type (sequential or threaded)
|
|
typedef std::shared_ptr< EVALUATORENGINE > | PEvaluatorEngine |
| | shared pointer to the evaluation engine
|
|
typedef std::shared_ptr< CRITERION > | PCriterion |
| | shared pointer to the criterion the search optimizes
|
|
typedef std::shared_ptr< SUBSET > | PSubset |
| | shared pointer to a feature subset
|
|
typedef std::shared_ptr< Result_Tracker< RETURNTYPE, SUBSET > > | PResultTracker |
| | shared pointer to the result tracker enabled via enable_result_tracking()
|
|
typedef Search_Observer< RETURNTYPE, SUBSET > | OBSERVER |
| | the observer interface type this search reports through (see Search_Observer)
|
|
typedef std::shared_ptr< OBSERVER > | PObserver |
| | shared pointer to an OBSERVER, as set via set_observer()
|
|
| | Search_Exhaustive_Threaded (const unsigned int max_threads=2) |
| | Constructs a Search_Exhaustive configured with a Candidate_Evaluator_Threaded engine of max_threads workers.
|
| | Search_Exhaustive (PEvaluatorEngine engine=PEvaluatorEngine()) |
| | Constructs the search with the given candidate-evaluation engine; a default-constructed engine falls back to Candidate_Evaluator_Sequential (in-line, unthreaded evaluation).
|
| virtual bool | search (const DIMTYPE target_d, RETURNTYPE &result, const PSubset sub, const PCriterion crit, std::ostream &os=std::cout) override |
| | evaluates every subset of the requested size (every subset of any size from 1 to n if target_d==0) and returns the best one + its criterion value; false if no candidate could be generated (n==0, or the subset object refused to enumerate) or a criterion evaluation failed
|
| virtual std::ostream & | print (std::ostream &os) const override |
| | writes a human-readable identification of the search and its configuration; base default writes nothing
|
|
void | enable_result_tracking (PResultTracker tracker) |
| | assigns a result tracker to the search process, i.e., enables logging of all evaluated subsets for future reuse (re-evaluation, etc.)
|
|
void | disable_result_tracking () |
| | detaches any result tracker (result_tracker_active() then returns false)
|
|
bool | result_tracker_active () const |
| | true if a result tracker was assigned via enable_result_tracking() and not since disabled
|
|
void | set_output_detail (OutputDetail detail) |
| | sets the amount of information that is logged to output stream throughout the course of search
|
|
OutputDetail | get_output_detail () const |
| | the currently configured output detail level
|
|
bool | output_normal () const |
| | true unless output detail is SILENT
|
|
bool | output_detailed () const |
| | true only at the DETAILED output level
|
|
void | set_observer (PObserver observer) |
| | redirects search progress reporting away from the default syncout text output to observer
|
|
|
void | report (std::ostream &os, const msgbuf &m) const |
| | delivers one pre-formatted progress message: to the observer if attached, otherwise as syncout text to os
|
|
void | report_solution (std::ostream &os, const RETURNTYPE value, const SUBSET &sub, const msgbuf &m) const |
| | like report(), for sites announcing a new (sub-)solution; fires on_solution instead
|
|
PEvaluatorEngine | _engine |
| | the injected candidate-evaluation engine (defaults to sequential)
|
|
PResultTracker | _tracker |
| | the assigned result tracker, or null (see enable_result_tracking()/result_tracker_active())
|
|
OutputDetail | _detail |
| | the output detail level set via set_output_detail(); read by output_normal()/output_detailed()
|
|
PObserver | _observer |
| | the attached progress observer, or null (see set_observer(), report(), report_solution())
|
template<class RETURNTYPE, typename DIMTYPE, class SUBSET, class CRITERION>
class FST::Search_Exhaustive_Threaded< RETURNTYPE, DIMTYPE, SUBSET, CRITERION >
DEPRECATED shim: threaded version of exhaustive (optimal) search.
- Deprecated
- Deprecated since FST4 4.0; scheduled for removal in the next major release — construct the merged class with a Candidate_Evaluator_Threaded engine instead.
Kept for source compatibility with earlier FST4 sources, written when the threaded and the sequential variant were separate classes. This class is now nothing but a Search_Exhaustive constructed with a Candidate_Evaluator_Threaded engine; prefer doing that directly in new code.