cleanup
This commit is contained in:
9
graph.js
9
graph.js
@@ -77,6 +77,8 @@ Node = class Node {
|
||||
let visited = {}
|
||||
let toVisit = [this]
|
||||
|
||||
let i = 0
|
||||
|
||||
while (toVisit.length) {
|
||||
let toVisitNew = []
|
||||
|
||||
@@ -92,13 +94,16 @@ Node = class Node {
|
||||
})
|
||||
|
||||
toVisit = toVisitNew
|
||||
console.log(toVisit.length)
|
||||
|
||||
if (++i % 100 == 0) {
|
||||
console.log(toVisit.length)
|
||||
}
|
||||
}
|
||||
|
||||
console.timeEnd("heap gen")
|
||||
console.time("search")
|
||||
|
||||
let i = 0
|
||||
i = 0
|
||||
|
||||
while (heap.data.length) {
|
||||
let min = heap.extract()
|
||||
|
||||
Reference in New Issue
Block a user