pub struct EnergyComponents {
pub v_syn: f32,
pub v_str: f32,
pub v_log: f32,
pub v_boot: f32,
pub v_sheaf: f32,
}Expand description
Energy components for Lyapunov calculation
Fields§
§v_syn: f32Syntactic energy (from LSP diagnostics)
v_str: f32Structural energy (from contract verification)
v_log: f32Logic energy (from test results)
v_boot: f32Bootstrapping energy (from command exit codes)
v_sheaf: f32Sheaf validation energy (cross-node consistency)
Implementations§
Source§impl EnergyComponents
impl EnergyComponents
Sourcepub fn total(&self) -> f32
pub fn total(&self) -> f32
Total energy V(x) = Σ_comp V_comp (PSP-8 System 2).
The five fields are the derived component rollups of the single
canonical quadratic energy V(x) = Σ_e w_e‖r_e(x)‖²: each already carries
its squared, weighted residual contribution (V_comp = Σ_{e∈comp} w_e‖r_e‖²),
so the total is their plain sum. There is no second α/β/γ weighting pass —
those per-component weights are folded into the residual weights w_e of
the crate’s energy model before the rollups are formed.
Sourcepub fn total_weighted(&self, _contract: &BehavioralContract) -> f32
👎Deprecated: weights are folded into the residual model; use total()
pub fn total_weighted(&self, _contract: &BehavioralContract) -> f32
weights are folded into the residual model; use total()
Deprecated alias for EnergyComponents::total. The component rollups are
already weighted, so the contract argument is ignored; retained only so
older call sites keep compiling during the migration.
Sourcepub fn total_simple(&self) -> f32
pub fn total_simple(&self) -> f32
Total energy for Solo Mode. Identical to EnergyComponents::total now
that aggregation carries no separate weights.
Trait Implementations§
Source§impl Clone for EnergyComponents
impl Clone for EnergyComponents
Source§fn clone(&self) -> EnergyComponents
fn clone(&self) -> EnergyComponents
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EnergyComponents
impl Debug for EnergyComponents
Source§impl Default for EnergyComponents
impl Default for EnergyComponents
Source§fn default() -> EnergyComponents
fn default() -> EnergyComponents
Source§impl<'de> Deserialize<'de> for EnergyComponents
impl<'de> Deserialize<'de> for EnergyComponents
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EnergyComponents, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EnergyComponents, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for EnergyComponents
impl Serialize for EnergyComponents
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for EnergyComponents
impl RefUnwindSafe for EnergyComponents
impl Send for EnergyComponents
impl Sync for EnergyComponents
impl Unpin for EnergyComponents
impl UnsafeUnpin for EnergyComponents
impl UnwindSafe for EnergyComponents
Blanket Implementations§
impl<T> Allocation for T
impl<T> AsTypeStaticRegistered for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> HasTyVTable for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
impl<T> StarlarkAnyBound 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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.