@gabrielrufino/cube 1.0.45 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/Graph/index.js
CHANGED
|
@@ -108,16 +108,15 @@ var Graph = /** @class */ (function () {
|
|
|
108
108
|
return node;
|
|
109
109
|
};
|
|
110
110
|
Graph.prototype.connect = function (node1, node2) {
|
|
111
|
-
var _a, _b;
|
|
112
111
|
if (!this._data.hasKey(node1)) {
|
|
113
112
|
throw new GraphNodeNotFoundError_1.default(node1);
|
|
114
113
|
}
|
|
115
114
|
if (!this._data.hasKey(node2)) {
|
|
116
115
|
throw new GraphNodeNotFoundError_1.default(node2);
|
|
117
116
|
}
|
|
118
|
-
|
|
117
|
+
this._data.get(node1).add(node2);
|
|
119
118
|
if (!this._isDirected) {
|
|
120
|
-
|
|
119
|
+
this._data.get(node2).add(node1);
|
|
121
120
|
}
|
|
122
121
|
return [node1, node2];
|
|
123
122
|
};
|
|
@@ -18,7 +18,7 @@ var HashTableLinearProbingElement_1 = __importDefault(require("./HashTableLinear
|
|
|
18
18
|
var HashTableLinearProbing = /** @class */ (function () {
|
|
19
19
|
function HashTableLinearProbing(inputs, _a) {
|
|
20
20
|
if (inputs === void 0) { inputs = {}; }
|
|
21
|
-
var _b = _a === void 0 ? {
|
|
21
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.maxSize, maxSize = _c === void 0 ? 100 : _c;
|
|
22
22
|
this._maxSize = 0;
|
|
23
23
|
this._data = [];
|
|
24
24
|
this._maxSize = maxSize;
|