Skip to main content

Equations

Trait Equations 

Source
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§

Source

fn count(&self) -> (usize, usize)

How many constraints there are, and how many preferences.

Source

fn bound(&self, constraint: usize) -> Bound

What the constraint constraint asks of its residuals.

Source

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".

Implementors§