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§
Sourcefn class(&self) -> EquationClass
fn class(&self) -> EquationClass
Get the equation’s classification.
Sourcefn variables(&self) -> Vec<EquationVariable>
fn variables(&self) -> Vec<EquationVariable>
Get all variables in this equation.
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get a human-readable description.
Sourcefn validate_consistency(
&self,
values: &[(&str, f64)],
tolerance: f64,
) -> Result<(), String>
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.