pub struct OptimizedFeatureExtractor { /* private fields */ }Expand description
Optimized feature extractor for neural networks
Implementations§
Source§impl OptimizedFeatureExtractor
impl OptimizedFeatureExtractor
Sourcepub fn new(domain: ExpertDomain, input_size: usize) -> Self
pub fn new(domain: ExpertDomain, input_size: usize) -> Self
Create new optimized feature extractor
Sourcepub fn extract_features(&mut self, text: &str) -> Vec<f32>
pub fn extract_features(&mut self, text: &str) -> Vec<f32>
Extract features with optimized performance (5-10x faster than original)
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear feature cache to manage memory
Sourcepub fn cache_stats(&self) -> (usize, usize)
pub fn cache_stats(&self) -> (usize, usize)
Get cache statistics
Trait Implementations§
Source§impl Clone for OptimizedFeatureExtractor
impl Clone for OptimizedFeatureExtractor
Source§fn clone(&self) -> OptimizedFeatureExtractor
fn clone(&self) -> OptimizedFeatureExtractor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OptimizedFeatureExtractor
impl RefUnwindSafe for OptimizedFeatureExtractor
impl Send for OptimizedFeatureExtractor
impl Sync for OptimizedFeatureExtractor
impl Unpin for OptimizedFeatureExtractor
impl UnsafeUnpin for OptimizedFeatureExtractor
impl UnwindSafe for OptimizedFeatureExtractor
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