Skip to main content

UpdateFunction

Trait UpdateFunction 

Source
pub trait UpdateFunction<H: TensorBase>: Send + Sync {
    // Required method
    fn update(&self, old_state: &H, new_message: &H) -> H;
}
Expand description

更新函数 trait:定义节点状态更新

Required Methods§

Source

fn update(&self, old_state: &H, new_message: &H) -> H

更新节点状态

§Arguments
  • old_state - 旧的节点状态
  • new_message - 新聚合的消息
§Returns

返回更新后的状态

Implementors§