move BitArray in its namerspace
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { create as createBitArray } from "../bitarray/index.js";
|
||||
import { BitArray } from "../bitarray/types.js";
|
||||
import { BitArray } from "../bitarray/index.js";
|
||||
import { asArray } from "../utils.js";
|
||||
import { AsyncRandomOptions, ElementPredicate, ElementWeight, RandomGenerator, RandomOptions } from "./types.js";
|
||||
|
||||
@@ -121,7 +120,7 @@ export class RandomPicker<T> {
|
||||
|
||||
public constructor(elements: Iterable<T>, length: number, options?: RandomOptions<T>) {
|
||||
this.#elements = elements;
|
||||
this.#flags = createBitArray(length);
|
||||
this.#flags = BitArray.create(length);
|
||||
this.#options = withDefaultOptions(mergeOptions({ predicate: i => this.#flags.get(i) }, options));
|
||||
|
||||
this.reset();
|
||||
|
||||
Reference in New Issue
Block a user