Struct vpsearch::Tree [] [src]

pub struct Tree<Item: MetricSpace + Copy, Ownership> { /* fields omitted */ }

The VP-Tree.

Methods

impl<Item: MetricSpace<UserData=()> + Copy> Tree<Item, Owned<()>>
[src]

Creates a new tree from items.

@see Tree::new_with_user_data_owned

impl<U, Item: MetricSpace<UserData=U> + Copy> Tree<Item, Owned<U>>
[src]

Finds item closest to given needle (that can be any item) and Output index of the item in items array from new().

@param needle The query. @return Index of the nearest item found and the distance from the nearest item

impl<Item: MetricSpace + Copy> Tree<Item, Owned<Item::UserData>>
[src]

Create a Vantage Point tree for fast nearest neighbor search.

@param items Array of items that will be searched. @param user_data Reference to any object that is passed down to item.distance()

impl<Item: MetricSpace + Copy> Tree<Item, UserDataByRef>
[src]

The tree doesn't have to own the UserData. You can keep passing it to find_nearest().

impl<Item: MetricSpace + Copy, Ownership> Tree<Item, Ownership>
[src]

All the bells and whistles version. For best_candidate implement BestCandidate<Item> trait.

Trait Implementations

impl<Item: Debug + Copy + MetricSpace, Ownership> Debug for Tree<Item, Ownership>
[src]

Formats the value using the given formatter.