import { FixedPriorityQueue } from './fixed-priority-queue.js'
import { FixedQueue } from './fixed-queue.js'
-import { defaultBucketSize, type FixedQueueNode, type IFixedQueue, type PriorityQueueNode } from './utility-types.js'
+import {
+ defaultBucketSize,
+ type FixedQueueNode,
+ type IFixedQueue,
+ type PriorityQueueNode,
+} from './utility-types.js'
/**
* Priority queue.
this.priorityEnabled = enablePriority
let head: PriorityQueueNode<T>
let tail: PriorityQueueNode<T>
- let prevNode : PriorityQueueNode<T> | undefined
+ let prevNode: PriorityQueueNode<T> | undefined
let node: PriorityQueueNode<T> | undefined = this.tail
let buckets = 0
while (node != null) {
}
}
- private getPriorityQueueNode (nodeArray?: FixedQueueNode<T>[]): PriorityQueueNode<T> {
+ private getPriorityQueueNode (
+ nodeArray?: FixedQueueNode<T>[]
+ ): PriorityQueueNode<T> {
let fixedQueue: IFixedQueue<T>
if (this.priorityEnabled) {
fixedQueue = new FixedPriorityQueue(this.bucketSize)