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

Observer interface for search progress reporting. More...

#include <search.hpp>

Inheritance diagram for FST::Search_Observer< RETURNTYPE, SUBSET >:
fst4_cli::Observer_Curve fst4_cli::Observer_JSON

Public Types

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

virtual void on_progress (const std::string &msg)
 one pre-formatted progress message
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

Detailed Description

template<class RETURNTYPE, class SUBSET>
class FST::Search_Observer< RETURNTYPE, SUBSET >

Observer interface for search progress reporting.

Attach via Search::set_observer() to take over delivery of search progress: on_progress() receives each pre-formatted progress message, on_solution() additionally fires whenever a search announces a new (sub-)solution. With no observer attached the search prints the same messages as syncout text to its os stream. A default-constructed Search_Observer swallows everything (quiet mode).

Member Function Documentation

◆ on_progress()

template<class RETURNTYPE, class SUBSET>
virtual void FST::Search_Observer< RETURNTYPE, SUBSET >::on_progress ( const std::string & msg)
inlinevirtual

one pre-formatted progress message

Reimplemented in fst4_cli::Observer_Curve.


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.