[][src]Module dinotree_alg::query

Module contains query related structs.

Structs

KnearestResult

The dinotree's Num does not inherit any kind of arithmetic traits. This showcases that the tree construction and pair finding collision algorithms do not involves any arithmetic. However, when finding the nearest neighbor, we need to do some calculations to compute distance between points. So instead of giving the Num arithmetic and thus add uneeded bounds for general use of this tree, the user must provide functions for arithmetic specifically for this function. The user can also specify what the minimum distance function is minizing based off of. For example minimizing based off the square distance will give you the same answer as minimizing based off of the distant. The callback function will be called on the closest object, then the second closest, and so on up until k. User can also this way choose whether to use manhatan distance or not. Its important to distinguish the fact that there is no danger of any of the references returned being the same. The closest is guarenteed to be distinct from the second closest. That is not to say they they don't overlap in 2d space. Returned by k_nearest_mut

MultiRectMut

If we have two non intersecting rectangles, it is safe to return to the user two sets of mutable references of the bots strictly inside each rectangle since it is impossible for a bot to belong to both sets.

RectIntersectErr

Indicates that the user supplied a rectangle that intersects with a another one previously queries in the session.

Traits

DividerDrawer

Trait user must implement.

Type Definitions

RayCastResult