21 #ifndef TESSERACT_CLASSIFY_INTFEATUREMAP_H_ 22 #define TESSERACT_CLASSIFY_INTFEATUREMAP_H_ 33 static const int kNumOffsetMaps = 2;
55 return feature_space_.
Size();
61 return feature_space_;
117 return feature_map_.
MapFeatures(index_features, map_features);
138 int ComputeOffsetFeature(
int index_feature,
int dir)
const;
141 bool mapping_changed_;
153 int* offset_plus_[kNumOffsetMaps];
154 int* offset_minus_[kNumOffsetMaps];
163 #endif // TESSERACT_CLASSIFY_INTFEATUREMAP_H_
const IntFeatureSpace & feature_space() const
int FindNZFeatureMapping(SampleIterator *it)
void DeleteMapFeature(int map_feature)
bool IsMapFeatureDeleted(int map_feature) const
void Init(const IntFeatureSpace &feature_space)
int MapIndexFeature(int index_feature) const
int FinalizeMapping(SampleIterator *it)
int MapFeatures(const GenericVector< int > &sparse, GenericVector< int > *compact) const
void DebugMapFeatures(const GenericVector< int > &map_features) const
const IndexMapBiDi & feature_map() const
INT_FEATURE_STRUCT InverseIndexFeature(int index_feature) const
void IndexAndSortFeatures(const INT_FEATURE_STRUCT *features, int num_features, GenericVector< int > *sorted_features) const
INT_FEATURE_STRUCT InverseMapFeature(int map_feature) const
int MapFeature(const INT_FEATURE_STRUCT &f) const
int IndexFeature(const INT_FEATURE_STRUCT &f) const
void IndexAndSortFeatures(const INT_FEATURE_STRUCT *features, int num_features, GenericVector< int > *sorted_features) const
int MapIndexedFeatures(const GenericVector< int > &index_features, GenericVector< int > *map_features) const
int OffsetFeature(int index_feature, int dir) const