Ignore:
Timestamp:
Mar 30, 2018, 10:36:24 AM (16 months ago)
Author:
cameron
Message:

Direct CC builder work

Location:
icGREP/icgrep-devel/icgrep/UCD
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/unicode_set.cpp

    r5909 r5935  
    321321    }
    322322    return UnicodeSet(runs, mRunLength, mRunLength, quads, mQuadLength, mQuadLength);
     323}
     324
     325/** ------------------------------------------------------------------------------------------------------------- *
     326 * @brief isolates
     327 ** ------------------------------------------------------------------------------------------------------------- */
     328UnicodeSet UnicodeSet::isolates() const noexcept {
     329    UnicodeSet theIsolates;
     330    for (auto range : *this) {
     331        if (range.first == range.second) {
     332            theIsolates.insert(range.first);
     333        }
     334    }
     335    return theIsolates;
    323336}
    324337
  • icGREP/icgrep-devel/icgrep/UCD/unicode_set.h

    r5759 r5935  
    137137    UnicodeSet operator-(const UnicodeSet & other) const noexcept;
    138138    UnicodeSet operator^(const UnicodeSet & other) const noexcept;
     139   
     140    // The subset of a UnicodeSet consisting of the isolated codepoints only, i.e.,
     141    // those codepoints cp such that neither cp-1 nor cp+1 is a member of the set.
     142    UnicodeSet isolates () const noexcept;
    139143
    140144    UnicodeSet & operator=(const UnicodeSet & other) noexcept;
Note: See TracChangeset for help on using the changeset viewer.