Example #1
0
 public Sparse2DBlockDeflateArray(int width, int height, T emptyValue, bool eraseEmptyBlocksDynamically, bool deflateBlocksDynamically)
     : base(width, height, emptyValue, eraseEmptyBlocksDynamically)
 {
     mIsBlockConstant = new BitArray64(mNumXBlocks * mNumYBlocks);
     mIsBlockConstant.setAll(false);
     mBlockConstantValue       = new T[mNumXBlocks * mNumYBlocks];
     mDeflateBlocksDynamically = deflateBlocksDynamically;
 }
Example #2
0
        //--------------------------------
        public void copyTo(BitArray64 arr)
        {
            if (arr.mNumElements != mNumElements || mNumBlocks != arr.mNumBlocks)
            {
                throw new Exception("Error, cannot copy BitArray64 to target: Target does not have the same number of elements");
            }

            for (int i = 0; i < mNumBlocks; i++)
            {
                arr.mBitArrayBlocks[i] = mBitArrayBlocks[i];
            }
        }
Example #3
0
 public override void destroy()
 {
     mIsBlockConstant    = null;
     mBlockConstantValue = null;
     base.destroy();
 }