Class HashArrayUtil
Index
Constructors
Methods
Constructors
constructor
- new HashArrayUtil(): HashArrayUtil
Returns HashArrayUtil
Methods
Static
average
Static
difference
- difference<T extends object>(
source: HashArray<T>,
target: HashArray<T>,
output?: HashArray<T>,
): HashArray<T> Returns the difference of this HashArray and a target HashArray. If no output HashArray is provided the source is cloned.
Type Parameters
Parameters
Returns HashArray<T>
Returns a new HashArray that contains the difference between source (A) and target (B) HashArrays. Returns A - B.
Provides extra examples of how various additional operations can be added on top of HashArray. These operations are not included with HashArray to keep it lean and mean for TrieSearch. By all means though extend HashArray and add the operations that you need.
There are tests for all operations below in
./test/hash/HAExtra.test.ts
.