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 | |
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.
| 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()) |