10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_VM_LIBADT_VECTSET_HPP 26 #define SHARE_VM_LIBADT_VECTSET_HPP 27 28 #include "libadt/set.hpp" 29 30 // Vector Sets - An Abstract Data Type 31 //INTERFACE 32 33 // These sets can grow or shrink, based on the initial size and the largest 34 // element currently in them. Slow and bulky for sparse sets, these sets 35 // are super for dense sets. They are fast and compact when dense. 36 37 // TIME: 38 // O(1) - Insert, Delete, Member, Sort 39 // O(max_element) - Create, Clear, Size, Copy, Union, Intersect, Difference, 40 // Equal, ChooseMember, Forall 41 42 // SPACE: (max_element)/(8*sizeof(int)) 43 44 45 //------------------------------VectorSet-------------------------------------- 46 class VectorSet : public Set { 47 friend class VectorSetI; // Friendly iterator class 48 protected: 49 uint size; // Size of data IN LONGWORDS (32bits) | 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_VM_LIBADT_VECTSET_HPP 26 #define SHARE_VM_LIBADT_VECTSET_HPP 27 28 #include "libadt/set.hpp" 29 30 #define BITS_IN_BYTE_ARRAY_SIZE 512 31 32 // Vector Sets - An Abstract Data Type 33 //INTERFACE 34 35 // These sets can grow or shrink, based on the initial size and the largest 36 // element currently in them. Slow and bulky for sparse sets, these sets 37 // are super for dense sets. They are fast and compact when dense. 38 39 // TIME: 40 // O(1) - Insert, Delete, Member, Sort 41 // O(max_element) - Create, Clear, Size, Copy, Union, Intersect, Difference, 42 // Equal, ChooseMember, Forall 43 44 // SPACE: (max_element)/(8*sizeof(int)) 45 46 47 //------------------------------VectorSet-------------------------------------- 48 class VectorSet : public Set { 49 friend class VectorSetI; // Friendly iterator class 50 protected: 51 uint size; // Size of data IN LONGWORDS (32bits) |