32 #ifndef __MEM_RUBY_COMMON_SET_HH__
33 #define __MEM_RUBY_COMMON_SET_HH__
50 std::bitset<NUMBER_BITS_PER_SET>
bits;
58 fatal(
"Number of bits(%d) < size specified(%d). "
59 "Increase the number of bits and recompile.\n",
161 std::bitset<NUMBER_BITS_PER_SET>
r =
bits & obj.
bits;
173 std::bitset<NUMBER_BITS_PER_SET>
r =
bits | test.
bits;
199 panic(
"No smallest element of an empty set.");
210 fatal(
"Number of bits(%d) < size specified(%d). "
211 "Increase the number of bits and recompile.\n",
219 out <<
"[Set (" <<
m_nSize <<
"): " <<
bits <<
"]";
231 #endif // __MEM_RUBY_COMMON_SET_HH__
void print(std::ostream &out) const
void removeSet(const Set &obj)
std::bitset< NUMBER_BITS_PER_SET > bits
std::ostream & operator<<(std::ostream &out, const Set &obj)
bool isSuperset(const Set &test) const
Set AND(const Set &obj) const
bool intersectionIsEmpty(const Set &obj) const
bool isSubset(const Set &test) const
bool elementAt(int index) const
void addSet(const Set &obj)
Set & operator=(const Set &obj)
bool isEqual(const Set &obj) const
const int NUMBER_BITS_PER_SET
NodeID smallestElement() const
Set OR(const Set &obj) const
bool isElement(NodeID element) const