summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2023-07-31 20:02:56 +0200
committerIvan Frade <ifrade@google.com>2023-11-07 16:10:06 -0800
commitac70632f51ce06c9a74fe680b8bff2f45e998bde (patch)
tree979bc2c42b663f0ca9e3c7e5598510a9ca96c4fa /org.eclipse.jgit
parentc46b54eeac1cb2aaf62d4394fb7f60c848eab7b1 (diff)
downloadjgit-ac70632f51ce06c9a74fe680b8bff2f45e998bde.tar.gz
jgit-ac70632f51ce06c9a74fe680b8bff2f45e998bde.zip
ComboBitset: Add Javadoc
Change-Id: I799991327cadf646329eacbac40d41cb1b3391ad
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
index 55c05ef78d..8d8c6a0455 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
@@ -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();