26 return (
position == other.position) && (
value == other.value);
35 return std::lower_bound(
states.begin(),
states.end(), searchValue);
80 bool different =
true;
83 if (
static_cast<size_t>(
states.end() - low) == other.
states.size()) {
85 different = !std::equal(low,
states.end(), other.
states.begin());
92 typename stateVector::const_iterator startOther = other.
states.begin();
93 if (!
states.empty() && !other.
states.empty() &&
states.back().value == startOther->value)
95 if (startOther != other.
states.end()) {
stateVector::iterator Find(Sci_Position position)
bool Delete(Sci_Position position)
SparseState(Sci_Position positionFirst_=-1)
void Set(Sci_Position position, T value)
T ValueAt(Sci_Position position)
std::vector< State > stateVector
bool Merge(const SparseState< T > &other, Sci_Position ignoreAfter)
Sci_Position positionFirst
Styling buffer using one element for each run rather than using a filled buffer.
bool operator==(const State &other) const noexcept
constexpr State(Sci_Position position_, T value_) noexcept
bool operator<(const State &other) const noexcept