Returns the negative of another Criterion's result. More...
#include <criterion_negative.hpp>
Public Types | |
typedef boost::shared_ptr < CRITERION > | PCriterion |
typedef boost::shared_ptr< SUBSET > | PSubset |
Public Member Functions | |
Criterion_Negative (const PCriterion crit) | |
virtual bool | evaluate (RETURNTYPE &result, const PSubset sub) |
Criterion_Negative * | clone () const |
Criterion_Negative * | sharing_clone () const |
Criterion_Negative * | stateless_clone () const |
virtual std::ostream & | print (std::ostream &os) const |
Private Member Functions | |
Criterion_Negative (const Criterion_Negative &cn) | |
Private Attributes | |
PCriterion | _crit |
Returns the negative of another Criterion's result.
This trivial criterion can be used to turn maximization to minimization. Useful, e.g., in subset size minimizing scenarios (in conjunction with Criterion_Negative) or in feature acquisition weight minimization scenarios (in conjunction with Criterion_Sum_Of_Weights).
demo51.cpp, demo52t.cpp, and demo61.cpp.
Criterion_Negative< CRITERION, RETURNTYPE, SUBSET > * FST::Criterion_Negative< CRITERION, RETURNTYPE, SUBSET >::clone | ( | ) | const [inline, virtual] |
create 1:1 independent clone of the current object
Implements FST::Clonable.
Criterion_Negative* FST::Criterion_Negative< CRITERION, RETURNTYPE, SUBSET >::sharing_clone | ( | ) | const [inline, virtual] |
create equivalent clone of the current object, parmitting read-only access to structures in the source object (allows referencing instead of copying of large memory structures). may be faster and save space but requires more caution with respect to concurrency Use example: Data_Accessor memory data representation cloning
Implements FST::Clonable.
Criterion_Negative* FST::Criterion_Negative< CRITERION, RETURNTYPE, SUBSET >::stateless_clone | ( | ) | const [inline, virtual] |
create clone of the current object, ignoring internal temporary structures to save speed. Does not replicate exact object state. The clone must be used carefully in a way that ensures internal structure re-initialization Use example: Data_Splitter cloning or Classifier_SVM cloning due to inability to clone external structures defined in LibSVM
Implements FST::Clonable.