*/ size_t getApproximateNumberOfNewRanges(const FMDIndexView& view, const FMDPosition& old); /** * Get the TextPositions selected under the given view. */ std::set<TextPosition> getTextPositions(const FMDIndexView& view) const; /** * Get the new TextPositions selected under the given view, relative to the * given old FMDPosition. Some of them may have already been selected in the * old FMDPosition.s */ std::set<TextPosition> getNewTextPositions(const FMDIndexView& view, const FMDPosition& old) const; protected: int64_t forward_start; int64_t reverse_start; // Offset 0 = only the entry at start/end. -1 = empty. int64_t end_offset; }; const FMDPosition EMPTY_FMD_POSITION = FMDPosition(0, 0, -1); #endif
FMDPosition FMDPosition::flip() const { // Swap the two intervals of the bi-interval return FMDPosition(reverse_start, forward_start, end_offset); }