pub enum PinRefusal {
Suffixes(String),
UntaggedParameter(usize),
PinIsNotAnEquality(usize),
PinRowIsNotUnit {
con: usize,
coefficient: Number,
},
}Expand description
Why the convex arm cannot express this request. Carrying the reason (rather
than an Option) is what lets the caller print a message a user can act on
— and what keeps “the convex arm declined” distinguishable from “the convex
arm answered zero”.
Variants§
Suffixes(String)
A required suffix is absent or the wrong length.
UntaggedParameter(usize)
A parameter has no sens_state_1 or no sens_init_constr tag.
PinIsNotAnEquality(usize)
The pinning constraint is an inequality (or a range). parametric_step
perturbs the equality right-hand side b; an inequality lives in
h/G, which is a different perturbation with a different meaning.
PinRowIsNotUnit
The pinning row is not x_p = value with a unit coefficient.
The NLP arm assumes this shape without checking it — try_compute_sens_step
passes signs = vec![1; n_params] — so a row with any other coefficient
would make the two arms disagree. Refusing here hands such a model back
to the path that has always handled it, rather than introducing a second
answer.
Implementations§
Trait Implementations§
Source§impl Clone for PinRefusal
impl Clone for PinRefusal
Source§fn clone(&self) -> PinRefusal
fn clone(&self) -> PinRefusal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PinRefusal
impl Debug for PinRefusal
Source§impl PartialEq for PinRefusal
impl PartialEq for PinRefusal
impl StructuralPartialEq for PinRefusal
Auto Trait Implementations§
impl Freeze for PinRefusal
impl RefUnwindSafe for PinRefusal
impl Send for PinRefusal
impl Sync for PinRefusal
impl Unpin for PinRefusal
impl UnsafeUnpin for PinRefusal
impl UnwindSafe for PinRefusal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more