remove node_modules and .gitignore them
This commit is contained in:
-115
@@ -1,115 +0,0 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __values = (this && this.__values) || function(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SetHashBuckets = void 0;
|
||||
//================================================================
|
||||
/**
|
||||
* @packageDocumentation
|
||||
* @module std.internal
|
||||
*/
|
||||
//================================================================
|
||||
var HashBuckets_1 = require("./HashBuckets");
|
||||
/**
|
||||
* Hash buckets for set containers
|
||||
*
|
||||
* @author Jeongho Nam - https://github.com/samchon
|
||||
*/
|
||||
var SetHashBuckets = /** @class */ (function (_super) {
|
||||
__extends(SetHashBuckets, _super);
|
||||
/* ---------------------------------------------------------
|
||||
CONSTRUCTORS
|
||||
--------------------------------------------------------- */
|
||||
/**
|
||||
* Initializer Constructor
|
||||
*
|
||||
* @param source Source set container
|
||||
* @param hasher Hash function
|
||||
* @param pred Equality function
|
||||
*/
|
||||
function SetHashBuckets(source, hasher, pred) {
|
||||
var _this = _super.call(this, fetcher, hasher) || this;
|
||||
_this.source_ = source;
|
||||
_this.key_eq_ = pred;
|
||||
return _this;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
SetHashBuckets._Swap_source = function (x, y) {
|
||||
var _a;
|
||||
_a = __read([y.source_, x.source_], 2), x.source_ = _a[0], y.source_ = _a[1];
|
||||
};
|
||||
/* ---------------------------------------------------------
|
||||
FINDERS
|
||||
--------------------------------------------------------- */
|
||||
SetHashBuckets.prototype.key_eq = function () {
|
||||
return this.key_eq_;
|
||||
};
|
||||
SetHashBuckets.prototype.find = function (val) {
|
||||
var e_1, _a;
|
||||
var index = this.hash_function()(val) % this.length();
|
||||
var bucket = this.at(index);
|
||||
try {
|
||||
for (var bucket_1 = __values(bucket), bucket_1_1 = bucket_1.next(); !bucket_1_1.done; bucket_1_1 = bucket_1.next()) {
|
||||
var it = bucket_1_1.value;
|
||||
if (this.key_eq_(it.value, val))
|
||||
return it;
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (bucket_1_1 && !bucket_1_1.done && (_a = bucket_1.return)) _a.call(bucket_1);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
return this.source_.end();
|
||||
};
|
||||
return SetHashBuckets;
|
||||
}(HashBuckets_1.HashBuckets));
|
||||
exports.SetHashBuckets = SetHashBuckets;
|
||||
function fetcher(elem) {
|
||||
return elem.value;
|
||||
}
|
||||
//# sourceMappingURL=SetHashBuckets.js.map
|
||||
Reference in New Issue
Block a user