pub struct DistributedWorker { /* private fields */ }Expand description
Worker node for distributed computation
Implementations§
Source§impl DistributedWorker
impl DistributedWorker
Sourcepub fn new(id: usize, config: DistributedConfig) -> Self
pub fn new(id: usize, config: DistributedConfig) -> Self
Create a new distributed worker
Sourcepub fn cache_result(&self, key: String, values: Vec<Float>) -> Result<()>
pub fn cache_result(&self, key: String, values: Vec<Float>) -> Result<()>
Store a named result in the worker’s result cache.
Sourcepub fn get_cached_result(&self, key: &str) -> Result<Option<Vec<Float>>>
pub fn get_cached_result(&self, key: &str) -> Result<Option<Vec<Float>>>
Retrieve a cached result by key. Returns None when the key is absent.
Sourcepub fn all_cached_results(&self) -> Result<HashMap<String, Vec<Float>>>
pub fn all_cached_results(&self) -> Result<HashMap<String, Vec<Float>>>
Return a snapshot of all cached results for this worker.
Sourcepub fn assign_partition(&mut self, partition: DataPartition) -> Result<()>
pub fn assign_partition(&mut self, partition: DataPartition) -> Result<()>
Assign data partition to this worker
Sourcepub fn compute_local_pca(&self, n_components: usize) -> Result<LocalPCAResult>
pub fn compute_local_pca(&self, n_components: usize) -> Result<LocalPCAResult>
Compute local PCA for assigned partitions
Sourcepub fn compute_local_svd(&self, n_components: usize) -> Result<LocalSVDResult>
pub fn compute_local_svd(&self, n_components: usize) -> Result<LocalSVDResult>
Compute local SVD for assigned partitions
Auto Trait Implementations§
impl Freeze for DistributedWorker
impl RefUnwindSafe for DistributedWorker
impl Send for DistributedWorker
impl Sync for DistributedWorker
impl Unpin for DistributedWorker
impl UnsafeUnpin for DistributedWorker
impl UnwindSafe for DistributedWorker
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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