IndexSet.h
Definition: IndexSet.h:170
bool operator==(const iterator &other) const
Definition: IndexSet.h:182
bool operator!=(const iterator &other) const
Definition: IndexSet.h:187
void writeTo(std::ostream &str) const
Write out the IndexSet object in binary format.
Definition: IndexSet.cpp:288
long first() const
Returns the first element, 0 if the set is empty.
Definition: IndexSet.h:68
bool isInterval() const
Is this set a contiguous interval?
Definition: IndexSet.h:121
long next(long j) const
Returns the next element after j, if any; otherwise j+1.
Definition: IndexSet.cpp:49
static IndexSet readFrom(std::istream &str)
Read from the stream the serialized IndexSet object in binary format.
Definition: IndexSet.cpp:299
long last() const
Returns the last element, -1 if the set is empty.
Definition: IndexSet.h:71
static const IndexSet & emptySet()
Read-only access to an empty set.
Definition: IndexSet.cpp:19
bool contains(long j) const
Returns true iff the set contains j.
Definition: IndexSet.cpp:77
bool disjointFrom(const IndexSet &s) const
Returns true iff the set is disjoint from s.
Definition: IndexSet.cpp:92
JsonWrapper writeToJSON() const
Write out the IndexSet object to a JsonWrapper.
Definition: IndexSet.cpp:319
void retain(const IndexSet &s)
Retains only those elements that are also in s (intersection)
Definition: IndexSet.cpp:215
static IndexSet readFromJSON(std::istream &str)
Read from the stream the serialized IndexSet object using JSON format.
Definition: IndexSet.cpp:332
Definition: apiAttributes.h:21
IndexSet operator/(const IndexSet &s, const IndexSet &t)
set minus
Definition: IndexSet.cpp:257
bool operator>=(const IndexSet &s1, const IndexSet &s2)
Is s2 subset or equal to s2.
Definition: IndexSet.cpp:278
IndexSet operator|(const IndexSet &s, const IndexSet &t)
union
Definition: IndexSet.cpp:233
bool disjoint(const IndexSet &s1, const IndexSet &s2)
Functional disjoint.
Definition: IndexSet.h:237
bool operator<=(const IndexSet &s1, const IndexSet &s2)
Is s1 subset or equal to s2.
Definition: IndexSet.cpp:268
bool operator>(const IndexSet &s1, const IndexSet &s2)
Is s2 strict subset of s1.
Definition: IndexSet.cpp:283
bool operator<(const IndexSet &s1, const IndexSet &s2)
Is s1 strict subset of s2.
Definition: IndexSet.cpp:273
std::ostream & operator<<(std::ostream &os, const ContextBuilder< SCHEME > &cb)
ostream operator for serializing the ContextBuilder object.
IndexSet operator&(const IndexSet &s, const IndexSet &t)
intersection
Definition: IndexSet.cpp:241
IndexSet operator^(const IndexSet &s, const IndexSet &t)
exclusive-or
Definition: IndexSet.cpp:249
Definition: JsonWrapper.h:9