Skip to main content

ConvergenceSignal

Struct ConvergenceSignal 

Source
pub struct ConvergenceSignal<U: StateUpdate> {
    pub actual_contribution: f64,
    pub surprise: f64,
    pub quality: f64,
    pub partial_update: U,
}
Expand description

Optional convergence signal — nodes can report quality metadata. Without the matrix layer, only partial_update is used (applied as a normal update). With the matrix layer, actual_contribution, surprise, and quality guide routing.

Fields§

§actual_contribution: f64

How much this node contributed to task completion (0.0 - 1.0)

§surprise: f64

How unexpected the result was (0.0 = expected, 1.0 = surprise)

§quality: f64

Output quality estimate for C value update

§partial_update: U

The state update to apply. Always used, regardless of matrix mode.

NOTE: #[serde(skip)] — same rationale as InterruptRequest::partial_update. Applied to state during the engine’s UPDATE phase, already in the checkpoint.

Trait Implementations§

Source§

impl<U: Clone + StateUpdate> Clone for ConvergenceSignal<U>

Source§

fn clone(&self) -> ConvergenceSignal<U>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<U: Debug + StateUpdate> Debug for ConvergenceSignal<U>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, U> Deserialize<'de> for ConvergenceSignal<U>
where U: Default + StateUpdate,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<U: StateUpdate> Serialize for ConvergenceSignal<U>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<U> Freeze for ConvergenceSignal<U>
where U: Freeze,

§

impl<U> RefUnwindSafe for ConvergenceSignal<U>
where U: RefUnwindSafe,

§

impl<U> Send for ConvergenceSignal<U>

§

impl<U> Sync for ConvergenceSignal<U>

§

impl<U> Unpin for ConvergenceSignal<U>
where U: Unpin,

§

impl<U> UnsafeUnpin for ConvergenceSignal<U>
where U: UnsafeUnpin,

§

impl<U> UnwindSafe for ConvergenceSignal<U>
where U: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,