Stores the info on currently selected features, enables generating permutations, etc. More...
#include <subset.hpp>
Public Member Functions | |
Subset (const DIMTYPE n) | |
n - max possible no. of features = allocation size | |
Subset (const Subset< BINTYPE, DIMTYPE > &sub) | |
copy constructor | |
void | stateless_copy (Subset< BINTYPE, DIMTYPE > &sub) |
bool | equivalent (const Subset< BINTYPE, DIMTYPE > &sub) |
tests whether sub represents the same subset (ignoring internal state) | |
void | select (const DIMTYPE i) |
mark i-th feature as selected | |
void | select (const DIMTYPE _from, const DIMTYPE _to) |
mark features _from,..,_to as selected | |
void | select_all () |
void | deselect (const DIMTYPE i) |
mark all features as deselected | |
void | deselect (const DIMTYPE _from, const DIMTYPE _to) |
mark features _from,..,_to as deselected | |
void | deselect_all () |
DIMTYPE | get_n () const |
mark all features as deselected | |
DIMTYPE | get_d () const |
void | select_raw (const DIMTYPE i) |
mark i-th feature as selected | |
void | select_all_raw () |
void | deselect_raw (const DIMTYPE i) |
mark all features as deselected | |
void | deselect_all_raw () |
DIMTYPE | get_n_raw () const |
mark all features as deselected | |
DIMTYPE | get_d_raw () const |
bool | selected_raw (const DIMTYPE i) const |
void | make_random_subset (const DIMTYPE d) |
void | make_random_subset (const DIMTYPE lo_d, const DIMTYPE hi_d) |
void | make_random_subset (const float d_prob) |
void | set_forward_mode (const bool forward=true) |
enables inverting the meaning of id_sel, id_desel etc. | |
bool | get_forward_mode () const |
void | set_frozen_mode (const bool freeze=false) |
bool | get_frozen_mode () const |
bool | getFirstFeature (DIMTYPE &feat, bool selected=true, const int looplevel=0) |
bool | getNextFeature (DIMTYPE &feat) |
bool | getFirstCandidateSubset (const DIMTYPE g, bool reverse=false) |
bool | getNextCandidateSubset () |
DIMTYPE | getNoOfCandidateSubsets (const DIMTYPE g, bool reverse=false) |
bool | getFirstTemporaryFeature (DIMTYPE &feat) |
bool | getNextTemporaryFeature (DIMTYPE &feat) |
DIMTYPE | getNoOfTemporaryFeatures () |
Private Member Functions | |
DIMTYPE | get_combinations (const DIMTYPE n, const DIMTYPE k) |
Private Attributes | |
const DIMTYPE | _n |
max. No. of features (full set size) | |
const boost::scoped_array < BINTYPE > | _bin |
default format to store subset info | |
BINTYPE | id_sel |
BINTYPE | id_desel |
BINTYPE | id_traverse |
BINTYPE | id_frozen |
BINTYPE | tmp_id_sel |
BINTYPE | tmp_id_desel |
BINTYPE | tmp_id_traverse |
bool | _forward_mode |
bool | _frozen_mode |
DIMTYPE | _gen_features |
DIMTYPE | _enum_temporary |
DIMTYPE | _enum_selected |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Subset< BINTYPE, DIMTYPE > &tdb) |
Stores the info on currently selected features, enables generating permutations, etc.
demo10.cpp, demo11.cpp, demo11t.cpp, demo12t.cpp, demo20.cpp, demo21.cpp, demo22.cpp, demo23.cpp, demo24.cpp, demo24t.cpp, demo25t.cpp, demo26.cpp, demo30.cpp, demo31.cpp, demo32t.cpp, demo33.cpp, demo33t.cpp, demo34.cpp, demo35t.cpp, demo40.cpp, demo40t.cpp, demo41.cpp, demo42.cpp, demo43.cpp, demo50.cpp, demo51.cpp, demo52t.cpp, demo53.cpp, demo54.cpp, demo55.cpp, demo56.cpp, demo60.cpp, demo61.cpp, demo62.cpp, and demo63.cpp.
void FST::Subset< BINTYPE, DIMTYPE >::deselect | ( | const DIMTYPE | i | ) | [inline] |
mark all features as deselected
mark i-th feature as deselected
References FST::Subset< BINTYPE, DIMTYPE >::_bin, and FST::Subset< BINTYPE, DIMTYPE >::get_n().
void FST::Subset< BINTYPE, DIMTYPE >::deselect_raw | ( | const DIMTYPE | i | ) | [inline] |
mark all features as deselected
mark i-th feature as deselected
References FST::Subset< BINTYPE, DIMTYPE >::_bin.