pub trait Equations {
type Value: Variable;
// Required methods
fn count(&self) -> (usize, usize);
fn bound(&self, constraint: usize) -> Bound;
fn evaluate(
&self,
values: &[Self::Value],
which: &[Term],
) -> Vec<Option<Linearized>>;
}Expand description
The terms of a system: what an adapter — a sketch, a program — says of its constraints and preferences.
Required Associated Types§
Required Methods§
Sourcefn bound(&self, constraint: usize) -> Bound
fn bound(&self, constraint: usize) -> Bound
What the constraint constraint asks of its residuals.
Sourcefn evaluate(
&self,
values: &[Self::Value],
which: &[Term],
) -> Vec<Option<Linearized>>
fn evaluate( &self, values: &[Self::Value], which: &[Term], ) -> Vec<Option<Linearized>>
The terms which, with every block at values: each its residuals
and their derivatives, or None where it cannot be made there (a
residual undecidable — a direction of zero length — or the term not
made at all).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".