]> source.dussan.org Git - jgit.git/commitdiff
ComboBitset: Add Javadoc 43/203443/3
authorHan-Wen Nienhuys <hanwen@google.com>
Mon, 31 Jul 2023 18:02:56 +0000 (20:02 +0200)
committerIvan Frade <ifrade@google.com>
Wed, 8 Nov 2023 00:10:06 +0000 (16:10 -0800)
Change-Id: I799991327cadf646329eacbac40d41cb1b3391ad

org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java

index 55c05ef78d9255b037149ed9960afd735440f19c..8d8c6a0455f6ba36d499b347f73e664713b8cce1 100644 (file)
@@ -86,6 +86,11 @@ public class BitmapIndexImpl implements BitmapIndex {
                return position;
        }
 
+       /**
+        * A bitset for representing small changes (set/remove individual bits)
+        * relative to an existing EWAH bitmap. Executing bit-vector operations will
+        * materialize the changes into a fresh EWAH bitmap
+        */
        private static final class ComboBitset {
                private InflatingBitSet inflatingBitmap;
 
@@ -121,18 +126,21 @@ public class BitmapIndexImpl implements BitmapIndex {
                        return inflatingBitmap.getBitmap();
                }
 
+               /* In-place or operation */
                void or(EWAHCompressedBitmap inbits) {
                        if (toRemove != null)
                                combine();
                        inflatingBitmap = inflatingBitmap.or(inbits);
                }
 
+               /* In-place andNot operation */
                void andNot(EWAHCompressedBitmap inbits) {
                        if (toAdd != null || toRemove != null)
                                combine();
                        inflatingBitmap = inflatingBitmap.andNot(inbits);
                }
 
+               /* In-place xor operation. */
                void xor(EWAHCompressedBitmap inbits) {
                        if (toAdd != null || toRemove != null)
                                combine();