Text 0.6.0 bktree addrange - CyrilB1531/lodestar GitHub Wiki
Lodestar.Text 0.6.0. This page is frozen at that release. Read the current documentation for what
mainsays now. A link to a decision or a migration page followsmain, and leaves the archive.
Adds every item in a sequence, skipping duplicates.
public void AddRange(IEnumerable<string> items)Parameters — items is the sequence to index. It is enumerated once.
Returns — nothing. Read Count to see how many were distinct.
Example — one duplicate among five.
using Lodestar.Text.Indexing;
BkTree tree = BkTree.OverLevenshtein();
tree.AddRange(["book", "books", "boo", "cook", "book"]);
int count = tree.Count; // => 4Remarks — exactly Add in a loop, which is what makes the tree incremental:
there is no build step, so a dictionary can take a new word without a rebuild. That is the
difference from a VP-tree, which takes its whole array up front.
Applies to — net10.0, netstandard2.0.
See also — BkTree.Add, BkTree.Count.