pub struct QuantumSpatialFramework { /* private fields */ }Expand description
Unified framework for quantum-inspired spatial algorithms
This structure provides a high-level interface to all quantum-inspired spatial algorithms, with shared configuration and optimization strategies.
§Example
use scirs2_spatial::quantum_inspired::{QuantumSpatialFramework, QuantumConfig};
use scirs2_core::ndarray::Array2;
let config = QuantumConfig::default();
let framework = QuantumSpatialFramework::new(config);
// Use framework for various quantum algorithms
let points: Array2<f64> = Array2::zeros((10, 3));
// framework.quantum_clustering(&points.view(), 3)?;
// framework.quantum_nearest_neighbor(&points.view())?;Implementations§
Source§impl QuantumSpatialFramework
impl QuantumSpatialFramework
Sourcepub fn new(config: QuantumConfig) -> Self
pub fn new(config: QuantumConfig) -> Self
Sourcepub fn quantum_config(&self) -> &QuantumConfig
pub fn quantum_config(&self) -> &QuantumConfig
Get quantum configuration
Sourcepub fn error_correction_config(&self) -> &ErrorCorrectionConfig
pub fn error_correction_config(&self) -> &ErrorCorrectionConfig
Get error correction configuration
Sourcepub fn optimization_config(&self) -> &OptimizationConfig
pub fn optimization_config(&self) -> &OptimizationConfig
Get optimization configuration
Sourcepub fn performance_metrics(&self) -> &PerformanceMetrics
pub fn performance_metrics(&self) -> &PerformanceMetrics
Get performance metrics
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear quantum state cache
Sourcepub fn cache_size(&self) -> usize
pub fn cache_size(&self) -> usize
Get cache size
Sourcepub fn update_quantum_config(&mut self, config: QuantumConfig)
pub fn update_quantum_config(&mut self, config: QuantumConfig)
Update quantum configuration
Sourcepub fn create_quantum_clusterer(&self, num_clusters: usize) -> QuantumClusterer
pub fn create_quantum_clusterer(&self, num_clusters: usize) -> QuantumClusterer
Create quantum clusterer with framework configuration
Sourcepub fn create_quantum_nn(
&self,
points: &ArrayView2<'_, f64>,
) -> SpatialResult<QuantumNearestNeighbor>
pub fn create_quantum_nn( &self, points: &ArrayView2<'_, f64>, ) -> SpatialResult<QuantumNearestNeighbor>
Create quantum nearest neighbor searcher with framework configuration
Sourcepub fn validate_config(&self) -> SpatialResult<()>
pub fn validate_config(&self) -> SpatialResult<()>
Validate quantum configuration
Sourcepub fn estimate_memory_usage(&self, num_points: usize, num_dims: usize) -> usize
pub fn estimate_memory_usage(&self, num_points: usize, num_dims: usize) -> usize
Estimate memory usage for given configuration
Trait Implementations§
Source§impl Debug for QuantumSpatialFramework
impl Debug for QuantumSpatialFramework
Auto Trait Implementations§
impl Freeze for QuantumSpatialFramework
impl RefUnwindSafe for QuantumSpatialFramework
impl Send for QuantumSpatialFramework
impl Sync for QuantumSpatialFramework
impl Unpin for QuantumSpatialFramework
impl UnwindSafe for QuantumSpatialFramework
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.