Skip to content

Commit

Permalink
Merge pull request #249 from probmods/update-dependencies
Browse files Browse the repository at this point in the history
Update npm dependencies
  • Loading branch information
null-a committed Oct 15, 2015
2 parents eb6fe2f + 7af200f commit 4d08779
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 35 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@
"test": "tests"
},
"dependencies": {
"amdefine": "^0.1.0",
"ast-types": "^0.7.2",
"escodegen": "^1.6.1",
"amdefine": "^1.0.0",
"ast-types": "^0.8.13",
"escodegen": "^1.7.0",
"esmangle": "^1.0.1",
"esprima": "^2.1.0",
"esprima": "^2.6.0",
"estemplate": "^0.4.0",
"estraverse": "^4.1.0",
"esutils": "^2.0.2",
"git-rev-2": "^0.1.0",
"immutable": "^3.7.1",
"minimist": "^1.1.1",
"numeric": "~1.2.6",
"immutable": "^3.7.5",
"minimist": "^1.2.0",
"numeric": "^1.2.6",
"priorityqueuejs": "~1.0.0",
"sweet.js": "probmods/sweet.js#browserify",
"underscore": "^1.8.3"
},
"devDependencies": {
"brfs": "0.0.8",
"closure-linter-wrapper": "^0.2.11",
"closure-linter-wrapper": "^1.0.1",
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.11.1",
"grunt-contrib-jshint": "^0.11.3",
"grunt-contrib-nodeunit": "^0.4.1",
"grunt-gjslint": "^0.1.6",
"grunt-gjslint": "^0.2.0",
"nodeunit": "^0.9.1",
"open": "0.0.5",
"seedrandom": "^2.4.2",
Expand Down
4 changes: 2 additions & 2 deletions src/erp.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ ERP.prototype.print = function() {
console.log('ERP:');
var json = this.toJSON();
_.zip(json.probs, json.support)
.sort(function(a, b) { return b[0] - a[0]; })
.forEach(function(val) {
.sort(function(a, b) { return b[0] - a[0]; })
.forEach(function(val) {
console.log(' ' + util.serialize(val[1]) + ' : ' + val[0]);
});
} else {
Expand Down
46 changes: 23 additions & 23 deletions src/inference/incrementalmh.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,12 @@ module.exports = function(env) {

ArrayERPMasterList.prototype.size = function() { return this.erpNodes.length; }
ArrayERPMasterList.prototype.oldSize = function() {
return this.oldErpNodes === undefined ? undefined : this.oldErpNodes.length;
}
return this.oldErpNodes === undefined ? undefined : this.oldErpNodes.length;
}

ArrayERPMasterList.prototype.addERP = function(node) {
this.erpNodes.push(node);
};
ArrayERPMasterList.prototype.addERP = function(node) {
this.erpNodes.push(node);
};

ArrayERPMasterList.prototype.removeERP = function(node) {
// Set it up to be removed as a post-process
Expand Down Expand Up @@ -586,11 +586,11 @@ module.exports = function(env) {
HashtableERPMasterList.prototype.oldSize = function() { return this.oldNumErps; }

HashtableERPMasterList.prototype.addERP = function(node) {
this.erpNodeMap.put(node.address, node);
this.erpsAdded.push(node);
this.numErps++;
// this.checkConsistency("addERP");
};
this.erpNodeMap.put(node.address, node);
this.erpsAdded.push(node);
this.numErps++;
// this.checkConsistency("addERP");
};

HashtableERPMasterList.prototype.removeERP = function(node) {
this.erpNodeMap.remove(node.address);
Expand All @@ -610,19 +610,19 @@ module.exports = function(env) {
HashtableERPMasterList.prototype.getRandom = function() { return this.erpNodeMap.getRandom(); }

HashtableERPMasterList.prototype.restoreOnReject = function() {
// this.checkConsistency("restoreOnReject");
this.numErps = this.oldNumErps;
var n = this.erpsAdded.length;
while (n--) {
var node = this.erpsAdded[n];
this.erpNodeMap.remove(node.address);
}
n = this.erpsRemoved.length;
while (n--) {
var node = this.erpsRemoved[n];
this.erpNodeMap.put(node.address, node);
}
};
// this.checkConsistency("restoreOnReject");
this.numErps = this.oldNumErps;
var n = this.erpsAdded.length;
while (n--) {
var node = this.erpsAdded[n];
this.erpNodeMap.remove(node.address);
}
n = this.erpsRemoved.length;
while (n--) {
var node = this.erpsRemoved[n];
this.erpNodeMap.put(node.address, node);
}
};

// For debugging
HashtableERPMasterList.prototype.checkConsistency = function(tag) {
Expand Down

0 comments on commit 4d08779

Please sign in to comment.