hfour / yads

An array-like data structure with a monoidal cache
8 stars 4 forks source link

Implement MArray.fastIndexOf #34

Closed justmv closed 3 years ago

justmv commented 3 years ago

Implements MArray.fastIndexOf() which finds an index of a leaf in log3(n) <= O(n) <= log2(n)

  1. Introduced _leafMap in MArray
  2. Modified insert<T>(..) to return the inserted leafs
  3. Added tests