Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
Add more key worlds in package.json
  • Loading branch information
mvallim committed Jul 7, 2017
1 parent da2cfa1 commit 9a7278d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 26 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"queue",
"stack",
"hashset",
"heap"
"heap",
"bitarray"
],
"browser": "dist/javascript-collections.min.js",
"main": "dist/javascript-collections.min.js",
Expand Down
28 changes: 23 additions & 5 deletions src/main/bitarray.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
var BaseObject = require('./commons/baseobject');

/**
* @classdesc UNDERDEVELOPMENT
* @classdesc A bit array is a mapping from some domain (almost always a range
* of integers) to values in the set {0, 1}. The values can be
* interpreted as dark/light, absent/present, locked/unlocked,
* valid/invalid, etcetera. The point is that there are only two
* possible values, so they can be stored in one bit. As with other
* arrays, the access to a single bit can be managed by applying an
* index to the array. Assuming its size (or length) to be n bits,
* the array can be used to specify a subset of the domain (e.g. {0,
* 1, 2, ..., n−1}), where a 1-bit indicates the presence and a 0-bit
* the absence of a number in the set. This set data structure uses
* about n/w words of space, where w is the number of bits in each
* machine word. Whether the least significant bit (of the word) or
* the most significant bit indicates the smallest-index number is
* largely irrelevant, but the former tends to be preferred (on
* little-endian machines).
*
* @link https://en.wikipedia.org/wiki/Bit_array
*
* @constructor
*
* @augments BaseObject
*
* @param {Number}
* size
*/
Expand Down Expand Up @@ -96,7 +114,7 @@ BitArray.prototype = Object.create(BaseObject.prototype, {
configurable : false,
writable : false
},

/**
* @method
* @memberof BitArray.prototype
Expand Down Expand Up @@ -263,8 +281,8 @@ BitArray.prototype = Object.create(BaseObject.prototype, {
for (var i = 0; i < high.chunks; i++) {
result._dataStore[i] = (result._dataStore[i] & high._dataStore[i]) >>> 0;
}
return result;

return result;
},
enumerable : false,
configurable : false,
Expand Down Expand Up @@ -300,7 +318,7 @@ BitArray.prototype = Object.create(BaseObject.prototype, {
result._dataStore[i] = (result._dataStore[i] ^ high._dataStore[i]) >>> 0;
}

return result;
return result;
},
enumerable : false,
configurable : false,
Expand Down
40 changes: 20 additions & 20 deletions src/main/hashset.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var HashSet = function HashSet(hashCode) {
_size : 0,
_keys : [],
_values : [],
_hashCode : hashCode,
_hashCode : hashCode
});
};

Expand All @@ -43,7 +43,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
value : undefined,
enumerable : true,
configurable : false,
writable : true,
writable : true
},

/**
Expand All @@ -53,7 +53,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
value : undefined,
enumerable : false,
configurable : false,
writable : true,
writable : true
},

/**
Expand All @@ -63,7 +63,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
value : undefined,
enumerable : true,
configurable : false,
writable : true,
writable : true
},

/**
Expand All @@ -73,7 +73,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
value : undefined,
enumerable : true,
configurable : false,
writable : true,
writable : true
},

/**
Expand All @@ -83,7 +83,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
value : undefined,
enumerable : false,
configurable : false,
writable : true,
writable : true
},

/**
Expand Down Expand Up @@ -123,7 +123,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand All @@ -142,7 +142,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand All @@ -158,7 +158,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand All @@ -182,7 +182,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand All @@ -198,7 +198,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : true,
configurable : false,
writable : false,
writable : false
},

/**
Expand All @@ -214,7 +214,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : true,
configurable : false,
writable : false,
writable : false
},

/**
Expand All @@ -237,7 +237,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand Down Expand Up @@ -278,7 +278,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand Down Expand Up @@ -324,7 +324,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand Down Expand Up @@ -354,7 +354,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand All @@ -372,7 +372,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand Down Expand Up @@ -428,7 +428,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand Down Expand Up @@ -478,7 +478,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand Down Expand Up @@ -528,7 +528,7 @@ HashSet.prototype = Object.create(BaseCollection.prototype, {
},
enumerable : false,
configurable : false,
writable : false,
writable : false
},

/**
Expand Down

0 comments on commit 9a7278d

Please sign in to comment.