add comments

This commit is contained in:
bkmartinjr
2018-05-29 11:58:57 -07:00
parent 2f23e8675f
commit 20756764f9
+5
View File
@@ -37,10 +37,15 @@ class BitArray {
this.bitarray = new Int32Array(this.width * this.length); this.bitarray = new Int32Array(this.width * this.length);
} }
// Return the number of records that are selected, ie, have a one bit in
// all allocated dimensions.
//
get selectionCount() { get selectionCount() {
return this.countAllOnes(); return this.countAllOnes();
} }
// Count all records that have a 'one' bit in allocated dimensions.
//
countAllOnes() { countAllOnes() {
let count = 0; let count = 0;
for (let i = 0; i < this.width; i++) { for (let i = 0; i < this.width; i++) {