pa1 - CS307 Software Engineering PA1 BitVector Overview The...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS307 Software Engineering PA1 BitVector Overview The goal of the first project is to implement a robust and configurable bit vector in Java 1.2. A BitVector maps integers in the active range of the vector to boolean values. A typical use for the class is to set a bit and to test for an individual bit. Bit vectors have a rich set of logical operations on pairs of vectors that include and , or , and xor . The goal of this assignment is first and foremost to develop a correct im- plementation, but efficiency concerns can not be ignored as bit vectors may be used within efficiency critical portions of client programs. Context Although you are to implement a BitVector that is correct in all situations your clients are working on a project that has particular requirements and which are described in the two following use cases. You must strive to optimize your implementation for those cases. Small-sets This scenario is concerned with small bits vectors for which the test , or and and methods are speed critical. Furthermore, the size of data structures has to minimized. In the small-set scenario, expect large numbers of vectors (thousands) with ranges from 0 to 127. Big-sets This scenario has a number of large, sparse, bit vectors being used mostly for their set and test methods. In this scenario a space efficient representation of large vectors and speed of tests are critical. All other operations are used rather infrequently. Example of applications of BitVectors include prime sieves and garbage col- lection (GC). In a GC one may represent a map of the memory by a bit vector to describe which objects are live and which ones are not (note that this is a gross simplification – we will see a more realistic representation later)....
View Full Document

This note was uploaded on 02/23/2012 for the course CS 307 taught by Professor Staff during the Summer '08 term at Purdue.

Page1 / 3

pa1 - CS307 Software Engineering PA1 BitVector Overview The...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online