Implements standard sequential selection step in sequential search type of methods. More...
#include <seq_step_straight.hpp>
Public Types | |
| typedef Sequential_Step< RETURNTYPE, DIMTYPE, SUBSET, CRITERION > | parent |
| base class alias | |
| 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 Candidate_Evaluator< RETURNTYPE, DIMTYPE, SUBSET, CRITERION > | EVALUATORENGINE |
| the injected evaluation-strategy interface (sequential in-line or thread-pooled) | |
| typedef std::shared_ptr< EVALUATORENGINE > | PEvaluatorEngine |
| Public Types inherited from FST::Sequential_Step< RETURNTYPE, DIMTYPE, SUBSET, CRITERION > | |
| typedef std::shared_ptr< CRITERION > | PCriterion |
| shared pointer to the criterion this step evaluates candidates against | |
| 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() | |
Public Member Functions | |
| Sequential_Step_Straight (PEvaluatorEngine engine=PEvaluatorEngine()) | |
engine defaults to sequential in-line evaluation (Candidate_Evaluator_Sequential) if not supplied; pass a Candidate_Evaluator_Threaded to have the candidates evaluated in a thread pool | |
| bool | evaluate_candidates (RETURNTYPE &result, const PSubset sub, const PCriterion crit, const DIMTYPE _generalization_level=1, std::ostream &os=std::cout) override |
evaluates every subset offered by sub->get*CandidateSubset() and leaves the highest-valued one in sub (see Sequential_Step::evaluate_candidates() for the full contract) | |
| virtual std::ostream & | print (std::ostream &os) const override |
| writes "Sequential_Step_Straight(threads=N)" if the injected engine is threaded, else "Sequential_Step_Straight()" | |
| Public Member Functions inherited from FST::Sequential_Step< RETURNTYPE, DIMTYPE, SUBSET, CRITERION > | |
| void | enable_result_tracking (PResultTracker tracker) |
| assigns a result tracker to this step, i.e., enables logging of all evaluated candidate 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 | |
Protected Attributes | |
| PEvaluatorEngine | _engine |
| injected evaluation strategy (sequential-inline or thread-pooled); defaulted in the constructor if not supplied | |
| Protected Attributes inherited from FST::Sequential_Step< RETURNTYPE, DIMTYPE, SUBSET, CRITERION > | |
| 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() | |
Implements standard sequential selection step in sequential search type of methods.
| typedef std::shared_ptr<EVALUATORENGINE> FST::Sequential_Step_Straight< RETURNTYPE, DIMTYPE, SUBSET, CRITERION >::PEvaluatorEngine |
shared pointer to an EVALUATORENGINE
|
inlineoverridevirtual |
evaluates every subset offered by sub->get*CandidateSubset() and leaves the highest-valued one in sub (see Sequential_Step::evaluate_candidates() for the full contract)
Implements FST::Sequential_Step< RETURNTYPE, DIMTYPE, SUBSET, CRITERION >.
|
inlineoverridevirtual |
writes "Sequential_Step_Straight(threads=N)" if the injected engine is threaded, else "Sequential_Step_Straight()"
Reimplemented from FST::Sequential_Step< RETURNTYPE, DIMTYPE, SUBSET, CRITERION >.