.
This commit is contained in:
18
out.js
18
out.js
@@ -170,8 +170,6 @@ class DLL {
|
||||
toString() { return this.toArray().toString() }
|
||||
}
|
||||
|
||||
window.DLL = DLL
|
||||
|
||||
class Point {
|
||||
constructor(x, y) {
|
||||
this.x = x
|
||||
@@ -231,7 +229,7 @@ class Point {
|
||||
toString() { return this.x + "," + this.y }
|
||||
}
|
||||
|
||||
window.Pt = window.Point = Point
|
||||
Pt = Point
|
||||
|
||||
class Grid {
|
||||
constructor(w, h, fill = 0) {
|
||||
@@ -411,8 +409,6 @@ class Grid {
|
||||
print(sep = "\t", ...pts) { console.log(this.toString(sep, pts)) }
|
||||
}
|
||||
|
||||
window.Grid = Grid
|
||||
|
||||
class BinHeap {
|
||||
constructor(cond = (p, c) => p < c) {
|
||||
this.cond = cond
|
||||
@@ -473,8 +469,6 @@ class BinHeap {
|
||||
}
|
||||
}
|
||||
|
||||
window.BinHeap = BinHeap
|
||||
|
||||
class Cxn {
|
||||
constructor(dest, weight = 1) {
|
||||
this.dest = dest
|
||||
@@ -482,8 +476,6 @@ class Cxn {
|
||||
}
|
||||
}
|
||||
|
||||
window.Cxn = Cxn
|
||||
|
||||
class SearchData {
|
||||
constructor(id, dist = Infinity, last = undefined, custom = {}) {
|
||||
this.id = id
|
||||
@@ -516,8 +508,6 @@ class SearchData {
|
||||
}
|
||||
}
|
||||
|
||||
window.SearchData = SearchData
|
||||
|
||||
class Node {
|
||||
static GLOBAL_ID = 0
|
||||
|
||||
@@ -611,8 +601,6 @@ class Node {
|
||||
}
|
||||
}
|
||||
|
||||
window.Node = Node
|
||||
|
||||
Object.defineProperty(Object.prototype, "copyDeep", {
|
||||
value: function() {
|
||||
return JSON.parse(JSON.stringify(this))
|
||||
@@ -715,7 +703,7 @@ class PointArray extends Array {
|
||||
}
|
||||
}
|
||||
|
||||
window.PtArray = window.PointArray = PointArray
|
||||
PtArray = PointArray
|
||||
|
||||
Object.defineProperty(Array.prototype, "pt", {
|
||||
get: function() {
|
||||
@@ -766,7 +754,7 @@ Object.defineProperties(PointArray.prototype, {
|
||||
}
|
||||
})
|
||||
|
||||
window.utils = {
|
||||
utils = {
|
||||
fetch: (url) => fetch(url).then(e => e.text()),
|
||||
fetchEval: (url) => utils.fetch(url).then(e => eval(e)),
|
||||
signAgnosticInclusiveRange: (a, b, s = Math.sign(a - b)) => Array((a - b) * s + 1).fill().map((_, i) => a - i * s),
|
||||
|
||||
Reference in New Issue
Block a user