From 7a9f0cef536dd257474ea64cd0df86bf5ed778b3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 4 Aug 2018 19:58:27 +0200 Subject: Remove dead code --- Hilbert/BigBitVec.hpp | 121 -------------------------------------------------- 1 file changed, 121 deletions(-) (limited to 'Hilbert/BigBitVec.hpp') diff --git a/Hilbert/BigBitVec.hpp b/Hilbert/BigBitVec.hpp index 8f7c485..175a96a 100644 --- a/Hilbert/BigBitVec.hpp +++ b/Hilbert/BigBitVec.hpp @@ -124,53 +124,6 @@ public: } - // Resize function. Returns the number of bits - // we can accomodate after resizing. - CBigBitVec & - setSize( - int iBits - ) - { - int i; - - // How many racks do we need? - int iRacks = FBVS_NEEDED(iBits); - - // Same size? - if ( iRacks == m_iRacks ) - return (*this); - - // Allocate new racks. - CFixBitVec *pcRacks = new CFixBitVec[iRacks]; - - // Copy over the old values. - /*for ( i = 0; i < BBV_MIN(iRacks,m_iRacks); i++ ) - pcRacks[i] = m_pcRacks[i];*/ - i = BBV_MIN(iRacks,m_iRacks); - if (m_pcRacks) { - memcpy( static_cast(pcRacks), - static_cast(m_pcRacks), - sizeof(CFixBitVec)*i ); - } - - // zero the new values - /*for ( ; i < iRacks; i++ ) - pcRacks[i].reset();*/ - if ( iRacks > i ) - memset( static_cast(pcRacks + i), 0, - sizeof(CFixBitVec)*(iRacks-i) ); - - // Release the old stuff. - delete [] m_pcRacks; - - // Replace old with new. - m_iRacks = iRacks; - m_pcRacks = pcRacks; - - return (*this); - } - - // zeros the bit-vector. CBigBitVec & reset() @@ -670,19 +623,6 @@ public: } - // Right rotation. - CBigBitVec - rotrCopy( - int iBits, - int iWidth - ) const - { - CBigBitVec t( *this ); - t.rotr(iBits,iWidth); - return t; - } - - // Left rotation, in place. CBigBitVec & rotl( @@ -715,19 +655,6 @@ public: } - // Left rotation. - CBigBitVec - rotlCopy( - int iBits, - int iWidth - ) const - { - CBigBitVec t( *this ); - t.rotl(iBits,iWidth); - return t; - } - - // Returns true if the rack is zero valued. bool none() const @@ -739,41 +666,6 @@ public: } - // Returns the number of trailing set bits. - int - tsb() const - { - int c, i, j; - c = 0; - for ( i = 0; i < m_iRacks; i++ ) - { - j = m_pcRacks[i].tsb(); - c += j; - if ( j < FBV_BITS ) - break; - } - return c; - } - - // OB: - // Returns the index of the most significant bit (numbered - // 1 to n) - int - msb() const - { - int c, i, j = 0; - c = FBV_BITS * m_iRacks; - for ( i = m_iRacks - 1; i >= 0 && !j; i-- ) - { - j = m_pcRacks[i].msb(); - if (j) - return c - (FBV_BITS - j); - else - c -= FBV_BITS; - } - return 0; - } - // Returns the index of the first set bit. // (numbered 1 to n, with 0 meaning no bits were set) int @@ -793,19 +685,6 @@ public: } - // Prefix decrement. Returns true if there - // was a carry, false otherwise. - bool - operator--() - { - int i = 0; - bool b; - while ( i < m_iRacks && (b = --m_pcRacks[i]) ) i++; - - return b; - } - - // Gray Code CBigBitVec & grayCode() -- cgit v1.2.1