pub enum ClusteringMessage<F: Float> {
Show 14 variants
InitializeWorker {
workerid: usize,
partition_data: Array2<F>,
initial_centroids: Array2<F>,
},
UpdateCentroids {
round: usize,
centroids: Array2<F>,
},
ComputeLocal {
round: usize,
max_iterations: usize,
},
LocalResult {
workerid: usize,
round: usize,
local_centroids: Array2<F>,
local_labels: Array1<usize>,
local_inertia: f64,
computation_time_ms: u64,
},
Heartbeat {
workerid: usize,
timestamp: u64,
cpu_usage: f64,
memory_usage: f64,
},
SyncBarrier {
round: usize,
participant_count: usize,
},
ConvergenceCheck {
round: usize,
converged: bool,
max_centroid_movement: f64,
},
Terminate,
CreateCheckpoint {
round: usize,
},
CheckpointData {
workerid: usize,
round: usize,
centroids: Array2<F>,
labels: Array1<usize>,
},
RecoveryRequest {
failed_workerid: usize,
recovery_strategy: RecoveryStrategy,
},
LoadBalance {
target_worker_loads: HashMap<usize, f64>,
},
MigrateData {
source_worker: usize,
target_worker: usize,
data_subset: Array2<F>,
},
Acknowledgment {
workerid: usize,
message_id: u64,
},
}Expand description
Message types for distributed clustering coordination
Variants§
InitializeWorker
Initialize worker with partition data
UpdateCentroids
Update global centroids
ComputeLocal
Request local computation
LocalResult
Local computation result
Fields
Heartbeat
Heartbeat for health monitoring
SyncBarrier
Synchronization barrier
ConvergenceCheck
Convergence check result
Terminate
Terminate worker
CreateCheckpoint
Checkpoint creation request
CheckpointData
Checkpoint data
RecoveryRequest
Recovery request
LoadBalance
Load balancing request
MigrateData
Data migration for load balancing
Acknowledgment
Acknowledgment message
Trait Implementations§
Source§impl<F: Clone + Float> Clone for ClusteringMessage<F>
impl<F: Clone + Float> Clone for ClusteringMessage<F>
Source§fn clone(&self) -> ClusteringMessage<F>
fn clone(&self) -> ClusteringMessage<F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de, F> Deserialize<'de> for ClusteringMessage<F>where
F: Deserialize<'de> + Float,
impl<'de, F> Deserialize<'de> for ClusteringMessage<F>where
F: Deserialize<'de> + Float,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<F> Freeze for ClusteringMessage<F>
impl<F> RefUnwindSafe for ClusteringMessage<F>where
F: RefUnwindSafe,
impl<F> Send for ClusteringMessage<F>where
F: Send,
impl<F> Sync for ClusteringMessage<F>where
F: Sync,
impl<F> Unpin for ClusteringMessage<F>
impl<F> UnwindSafe for ClusteringMessage<F>where
F: RefUnwindSafe,
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<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.