1 2 /* 3 * File IntegerSet.hpp. 4 * 5 * This file is part of the source code of the software program 6 * Vampire. It is protected by applicable 7 * copyright laws. 8 * 9 * This source code is distributed under the licence found here 10 * https://vprover.github.io/license.html 11 * and in the source directory 12 * 13 * In summary, you are allowed to use Vampire for non-commercial 14 * purposes but not allowed to distribute, modify, copy, create derivatives, 15 * or use in competitions. 16 * For other uses of Vampire please contact developers for a different 17 * licence, which we will make an effort to provide. 18 */ 19 /** 20 * @file IntegerSet.hpp 21 * Defines class IntegerSet for sets of nonnegative integers. 22 * 23 * @since 16/06/2005 Manchester 24 */ 25 26 #ifndef __IntegerSet__ 27 #define __IntegerSet__ 28 29 #define BITS_PER_INT (8*sizeof(unsigned int)) 30 31 namespace Lib { 32 33 /** 34 * Class IntegerSet for sets of nonnegative integers. 35 * 36 * @since 16/06/2005 Manchester 37 */ 38 class IntegerSet 39 { 40 public: IntegerSet()41 IntegerSet() : _words(0), _set(0) {} 42 ~IntegerSet(); 43 void insert(int n); 44 void remove(int n); 45 bool member(int n) const; 46 private: 47 /** the number of words used by this set */ 48 int _words; 49 /** the set itself coded as an array of unsigned integers */ 50 unsigned int* _set; 51 }; // class IntegerSet 52 53 } // namespace Lib 54 55 #endif 56