Skip to content

#458 CIF/BDD bit vectors: rename non-negative classes, move classes to sub-package, introduce common base classes

Dennis Hendriks requested to merge 458-cifbdd-bitvectors-rename-move-unify into develop
  • Next step in #458.
  • Best to review per commit.
  • No end-user visible changes.
  • Changes:
    • Renamed CifBddBitVector* to NonNegativeCifBddBitVector* and then to UnsignedCifBddBitVector*. Also adapted class JavaDocs where needed.
    • Moved bit vector classes and tests to new bitvectors sub-package.
    • Introduced common CifBddBitVector base class. It has the common fields and methods of all bit vectors. Moved them bit by bit over many commits.
    • Introduced common CifBddBitVectorAndCarry base class. It has the common fields and methods of all bit vector and carry classes. Moved them in one go.
    • Fixed TwosComplementCifBddBitVector constructor JavaDoc.
    • For UnsignedCifBddBitVector, the getInt and getLong methods now return Integer and Long values rather than int and long, with null being returned instead of -1 if the value is non-constant.
    • UnsignedCifBddBitVector now also implements abs.
    • UnsignedCifBddBitVector doesn't support negate.
    • Fixed UnsignedCifBddBitVectorTest.testResizeWithInvalidLength test: it failed on create rather than resize (it effectively tested the wrong method).
    • Added TwosComplementCifBddBitVector.createFromNonNegativeBitVector.
    • Renamed CifBddBitVector.setBits to CifBddBitVector.setBitsToValue.
    • Improved CifBddBitVector.replaceBy JavaDoc.
    • Improve bit vector 'createFromDomain'/'setDomain' methods: improved JavaDocs, improved consistency between the methods, and preconditions are now checked.
    • TwosComplementCifBddBitVector: improved createFrom* methods: improved JavaDoc/comments, improved parameter/variable names.
    • Extended the testCreateFromUnsignedBitVector test.

Addresses #458

Edited by Dennis Hendriks

Merge request reports

Loading