Feature Selection Toolbox FST4
UTIA · Czech Academy of Sciences
Loading...
Searching...
No Matches
fst4_cli::Observer_Curve Class Reference
Inheritance diagram for fst4_cli::Observer_Curve:
FST::Search_Observer< RETURNTYPE, SUBSET >

Public Types

typedef std::shared_ptr< FST::Search_Observer< RETURNTYPE, SUBSET > > PInner
 the (possibly null) delegate observer wrapped by this recorder
Public Types inherited from FST::Search_Observer< RETURNTYPE, SUBSET >
typedef std::shared_ptr< SUBSET > PSubset
 shared pointer to a feature subset (not used by the interface itself; kept for observer implementations' convenience)

Public Member Functions

 Observer_Curve (PInner inner, std::ostream &os)
virtual void on_progress (const std::string &msg) override
 passes msg to the delegate, or prints it exactly as the no-observer path would
virtual void on_solution (const RETURNTYPE value, const SUBSET &sub, const std::string &msg) override
 records sub as the best solution of its size when value beats the recorded one, then passes the event on like on_progress()
const std::map< DIMTYPE, std::pair< RETURNTYPE, std::shared_ptr< SUBSET > > > & best_per_size () const
 the curve_over_d source: best (value, subset) recorded per subset size so far
Public Member Functions inherited from FST::Search_Observer< RETURNTYPE, SUBSET >
virtual void on_solution (const RETURNTYPE value, const SUBSET &sub, const std::string &msg)
 a new (sub-)solution has been reached (msg = its pre-formatted text form); copy sub if kept beyond the call

Private Attributes

PInner _inner
 the delegate observer, or null when there is none
std::ostream & _os
 fallback progress stream, used only when _inner is null
std::map< DIMTYPE, std::pair< RETURNTYPE, std::shared_ptr< SUBSET > > > _best
 best (value, subset) per subset size seen so far; ordered: writers emit ascending d

Detailed Description

--report detailed: records the best (value, subset) per subset size announced by the search (the curve_over_d source) while passing progress through unchanged — inner attached: everything is delegated; inner null: messages are printed exactly as they are without any observer (search.hpp report helpers), so attaching the recorder never changes the progress bytes. on_solution fires on the master thread only, so no synchronization is needed.

Constructor & Destructor Documentation

◆ Observer_Curve()

fst4_cli::Observer_Curve::Observer_Curve ( PInner inner,
std::ostream & os )
inline

wraps inner (null = no delegate) and falls back to writing os directly when it is

Member Function Documentation

◆ on_progress()

virtual void fst4_cli::Observer_Curve::on_progress ( const std::string & msg)
inlineoverridevirtual

passes msg to the delegate, or prints it exactly as the no-observer path would

Reimplemented from FST::Search_Observer< RETURNTYPE, SUBSET >.


The documentation for this class was generated from the following file:
Copyright © 2000–present ÚTIA, Institute of Information Theory and Automation of the Czech Academy of Sciences · Contacts · This site sets no cookies and uses no analytics.