Feature Selection Toolbox FST4
UTIA · Czech Academy of Sciences
Loading...
Searching...
No Matches
FST::Subset< BINTYPE, DIMTYPE >::Feature_Range Class Reference

Read-only forward range over feature indices. More...

#include <subset.hpp>

Classes

class  iterator
 Forward iterator over raw feature indices matching a Kind, skipping non-matching ones. More...

Public Types

enum  Kind { SELECTED , TEMPORARY }
 Which raw features a Feature_Range/iterator matches. More...

Public Member Functions

 Feature_Range (const Subset *s, const Kind k)
 Constructs a range over s's features of the given k (SELECTED or TEMPORARY).
iterator begin () const
 an iterator positioned at the first matching feature, or already at end() if there are none
iterator end () const
 the sentinel end iterator

Private Attributes

const Subset * _s
 the subset iterated
Kind _k
 which kind of feature this range selects

Detailed Description

template<class BINTYPE, typename DIMTYPE>
class FST::Subset< BINTYPE, DIMTYPE >::Feature_Range

Read-only forward range over feature indices.

Returned by selected_features()/temporary_features(). Unlike the deprecated get*Feature() cursor pairs the range owns its complete iteration state: nested and early-exited loops are safe and the Subset stays untouched. Usage: for(DIMTYPE f : sub->selected_features()) {...} The range holds a raw pointer to the Subset and reads its markers lazily, so it must not outlive the Subset, and the selection must not be modified while a range is being iterated.

Member Enumeration Documentation

◆ Kind

template<class BINTYPE, typename DIMTYPE>
enum FST::Subset::Feature_Range::Kind

Which raw features a Feature_Range/iterator matches.

Enumerator
SELECTED 

features with a positive raw marker (selected, frozen, or under traversal; matches get_d_raw(), not get_d() – see selected_features())

TEMPORARY 

features currently marked tmp_id_traverse by an in-progress getFirstCandidateSubset()/getNextCandidateSubset() traversal (see temporary_features())


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.