pub trait ConstraintChannel: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn evaluate(&self, state: &[f64]) -> KernelResult<f64>;
fn dimension_names(&self) -> Vec<String>;
}Expand description
A domain-agnostic constraint channel operating on a state vector.
Each channel evaluates a constraint dimension and returns a margin in [0, 1], where 0 means “at constraint boundary” and 1 means “maximum headroom”.
Required Methods§
Sourcefn evaluate(&self, state: &[f64]) -> KernelResult<f64>
fn evaluate(&self, state: &[f64]) -> KernelResult<f64>
Evaluate this constraint channel against the given state vector.
Returns a margin in [0, 1].
Sourcefn dimension_names(&self) -> Vec<String>
fn dimension_names(&self) -> Vec<String>
Names of state dimensions this channel operates on.