// Adds term to the tree public void add(T term) { if (root != null) { root.add(term); } else { root = new BKNode <T>(term); } }
public void add(T term) { int score = Distance.calculate(term, this.term); BKNode child = null; children.TryGetValue(score, out child); if (child != null) { child.add(term); } else { children.Add(score, new BKNode(term)); } }