aboutsummaryrefslogtreecommitdiffstats
path: root/Hilbert/BigBitVec.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-08-04 19:58:27 +0200
committerDavid Robillard <d@drobilla.net>2018-08-07 20:01:12 +0200
commit7a9f0cef536dd257474ea64cd0df86bf5ed778b3 (patch)
tree8a34049c73cd8e275a787a61d5ea83ac24da17b2 /Hilbert/BigBitVec.hpp
parentc08a9f3cc4bca0558814ba9f0376051b3dc78306 (diff)
downloadchilbert-7a9f0cef536dd257474ea64cd0df86bf5ed778b3.tar.gz
chilbert-7a9f0cef536dd257474ea64cd0df86bf5ed778b3.tar.bz2
chilbert-7a9f0cef536dd257474ea64cd0df86bf5ed778b3.zip
Remove dead code
Diffstat (limited to 'Hilbert/BigBitVec.hpp')
-rw-r--r--Hilbert/BigBitVec.hpp121
1 files changed, 0 insertions, 121 deletions
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<void*>(pcRacks),
- static_cast<const void*>(m_pcRacks),
- sizeof(CFixBitVec)*i );
- }
-
- // zero the new values
- /*for ( ; i < iRacks; i++ )
- pcRacks[i].reset();*/
- if ( iRacks > i )
- memset( static_cast<void*>(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()