97 return *((
unsigned long *) entry) % size;
103 return *((
unsigned long *) e1) - *((
unsigned long *) e2);
129 const WordSet *larger, *smaller;
131 larger =
this; smaller = &rhs;
133 larger = &rhs; smaller =
this;
139 for (
WordSetIterator words(smaller); (word = words.Current()); words++) {
140 if (larger->
IsMember(*word))
return true;
173 for (; (word = words.
Current()); words++)
if (
IsMember(*word) == 0)
return 0;
182 for (
unsigned int i = 0; i < nentries; i++) {
201 const WordSet *larger, *smaller;
203 larger =
this; smaller = &rhs;
205 larger = &rhs; smaller =
this;
214 for (; (word = words.
Current()); words++) {
219 return (*
this = temp);
241 out << indent <<
"WordSet " << name <<
" " <<
this << std::endl;
242 int countThisLine = 0;
244 if (countThisLine == 0) {
245 out << indent <<
" ";
247 out << *(
long *) step.Current() << std::endl;
248 if (++countThisLine == 10) {
273 WSEntryCompare), current(0)
unsigned long * Current() const
int(* EntryCompareFunctPtr)(const void *, const void *)
WordSet & operator-=(const WordSet &rhs)
void Create(const uint entrySize, uint initialSize, HashFunctFunctPtr const HashFunctCallback, RehashFunctFunctPtr const RehashFunctCallback, EntryCompareFunctPtr const EntryCompareCallback, EntryCleanupFunctPtr const EntryCleanupCallback)
WordSet & operator|=(const WordSet &rhs)
int operator==(const WordSet &rhs) const
int IsMember(unsigned long entry) const
unsigned long * Current() const
WordSetIterator(const WordSet *theTable)
WordSet & operator &=(const WordSet &rhs)
void DeleteEntry(void *entry, DeleteEntryFunctPtr const DeleteEntryCallback=0,...)
void AddEntry(void *entry, AddEntryFunctPtr const AddEntryCallback=0,...)
void Add(unsigned long entry)
uint NumberOfEntries() const
WordSet & operator=(const WordSet &rhs)
WordSetSortedIterator(WordSet const *theTable, EntryCompareFunctPtr const EntryCompare)
int EntryCompare(const void *entry1, const void *entry2)
bool Intersects(const WordSet &rhs) const
void Delete(unsigned long entry)
unsigned long GetEntryByIndex(unsigned int indx) const
void * QueryEntry(const void *entry) const
uint HashFunct(const void *entry, const uint size)
void * GetEntryByIndex(const uint index) const