#[cfg(feature = "owned-arrays")]
use loeres::{ContiguousVectorAccess, SolverError};
#[cfg(feature = "owned-arrays")]
use loeres_backend_static::array::FixedVector;
#[cfg(feature = "owned-arrays")]
pub trait ProjectedFirstOrderProblem<S, const N: usize> {
type Bounds: ContiguousVectorAccess<Scalar = S>;
fn validate_boundary(&self) -> Result<(), SolverError>;
fn lower_bound(&self) -> &Self::Bounds;
fn upper_bound(&self) -> &Self::Bounds;
fn step_scale(&self) -> S;
fn gradient_at(
&self,
x: &FixedVector<S, N>,
grad: &mut FixedVector<S, N>,
) -> Result<(), SolverError>;
fn objective_at(&self, x: &FixedVector<S, N>) -> Result<S, SolverError>;
}