pub struct EnergyComponents {
pub v_syn: f32,
pub v_str: f32,
pub v_log: 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)
Implementations§
Source§impl EnergyComponents
impl EnergyComponents
Sourcepub fn total(&self, contract: &BehavioralContract) -> f32
pub fn total(&self, contract: &BehavioralContract) -> f32
Calculate total energy: V(x) = αV_syn + βV_str + γ*V_log
Trait Implementations§
Source§impl Clone for EnergyComponents
impl Clone for EnergyComponents
Source§fn clone(&self) -> EnergyComponents
fn clone(&self) -> EnergyComponents
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 Debug for EnergyComponents
impl Debug for EnergyComponents
Source§impl Default for EnergyComponents
impl Default for EnergyComponents
Source§fn default() -> EnergyComponents
fn default() -> EnergyComponents
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EnergyComponents
impl<'de> Deserialize<'de> for EnergyComponents
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 Freeze for EnergyComponents
impl RefUnwindSafe for EnergyComponents
impl Send for EnergyComponents
impl Sync for EnergyComponents
impl Unpin for EnergyComponents
impl UnwindSafe for EnergyComponents
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