Struct vpsearch::Tree [] [src]

pub struct Tree<Item: MetricSpace<Impl> + Copy, Impl = (), Ownership = Owned<()>> { /* fields omitted */ }

The VP-Tree.

Methods

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

[src]

Creates a new tree from items.

@see Tree::new_with_user_data_owned

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

[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<Impl> + Copy, Impl> Tree<Item, Impl, Owned<Item::UserData>>
[src]

[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<Impl> + Copy, Impl> Tree<Item, Impl, ()>
[src]

[src]

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

[src]

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

[src]

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

Trait Implementations

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

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<Item, Impl, Ownership> Send for Tree<Item, Impl, Ownership> where
    Item: Send,
    Ownership: Send,
    <Item as MetricSpace<Impl>>::Distance: Send

impl<Item, Impl, Ownership> Sync for Tree<Item, Impl, Ownership> where
    Item: Sync,
    Ownership: Sync,
    <Item as MetricSpace<Impl>>::Distance: Sync