pub struct AutoBackendProfile {
pub brute_force_pair_limit: usize,
pub kd_target_minimum: usize,
pub kd_query_ratio: usize,
}Expand description
Tunable decisions used when SpatialBackend::Auto is requested.
Fields§
§brute_force_pair_limit: usizeLargest Cartesian product evaluated directly.
kd_target_minimum: usizeSmallest target set for which a k-d tree may be selected.
kd_query_ratio: usizeRequired target-to-query size ratio for selecting a k-d tree.
Implementations§
Source§impl AutoBackendProfile
impl AutoBackendProfile
Sourcepub fn validate(self) -> Result<(), SpatialError>
pub fn validate(self) -> Result<(), SpatialError>
Validates that every threshold defines an unambiguous plan.
§Errors
Returns the first invalid automatic-planning field.
Sourcepub fn resolve(
self,
left_count: usize,
right_count: usize,
) -> Result<SpatialBackend, SpatialError>
pub fn resolve( self, left_count: usize, right_count: usize, ) -> Result<SpatialBackend, SpatialError>
Resolves one workload after validating the profile.
The same cost ladder holds for periodic workloads: a k-d tree keeps wrapped targets and queries lattice images, a cell list builds the fractional-coordinate grid, and brute force stays the small-workload choice. Selection is never pinned by periodicity alone.
§Errors
Returns an error when the profile is invalid.
Trait Implementations§
Source§impl Clone for AutoBackendProfile
impl Clone for AutoBackendProfile
impl Copy for AutoBackendProfile
Source§impl Debug for AutoBackendProfile
impl Debug for AutoBackendProfile
Source§impl Default for AutoBackendProfile
impl Default for AutoBackendProfile
impl Eq for AutoBackendProfile
Source§impl PartialEq for AutoBackendProfile
impl PartialEq for AutoBackendProfile
impl StructuralPartialEq for AutoBackendProfile
Auto Trait Implementations§
impl Freeze for AutoBackendProfile
impl RefUnwindSafe for AutoBackendProfile
impl Send for AutoBackendProfile
impl Sync for AutoBackendProfile
impl Unpin for AutoBackendProfile
impl UnsafeUnpin for AutoBackendProfile
impl UnwindSafe for AutoBackendProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more