Skip to main content

GoverningEquation

Trait GoverningEquation 

Source
pub trait GoverningEquation {
    // Required methods
    fn latex(&self) -> &str;
    fn class(&self) -> EquationClass;
    fn citation(&self) -> Citation;
    fn variables(&self) -> Vec<EquationVariable>;
    fn description(&self) -> &str;
    fn name(&self) -> &'static str;
    fn validate_consistency(
        &self,
        values: &[(&str, f64)],
        tolerance: f64,
    ) -> Result<(), String>;
}
Expand description

Trait for governing equations that ground simulations.

Every simulation in the EDD framework must implement this trait to provide mathematical foundation and falsifiability.

Required Methods§

Source

fn latex(&self) -> &str

Get the LaTeX representation of the equation.

Source

fn class(&self) -> EquationClass

Get the equation’s classification.

Source

fn citation(&self) -> Citation

Get the primary citation for this equation.

Source

fn variables(&self) -> Vec<EquationVariable>

Get all variables in this equation.

Source

fn description(&self) -> &str

Get a human-readable description.

Source

fn name(&self) -> &'static str

Get the equation name.

Source

fn validate_consistency( &self, values: &[(&str, f64)], tolerance: f64, ) -> Result<(), String>

Validate that a set of values satisfies the equation within tolerance.

Returns Ok(()) if the equation holds, Err with explanation otherwise.

§Errors

Returns error message if the values don’t satisfy the equation within tolerance.

Implementors§