pub enum LcpError {
RayTermination,
MaxIterationsExceeded,
NonFiniteInput,
}Variants§
RayTermination
Lemke’s algorithm reached a “secondary ray”: the entering variable’s column had no
positive entry to pivot on, so the almost-complementary path runs off to infinity
instead of finding a solution. This is a valid outcome for some (M, q) (e.g. M not
copositive-plus) and does not necessarily mean the LCP is infeasible in general — only
that Lemke’s path failed to certify a solution.
MaxIterationsExceeded
The pivot count exceeded the safety cap without terminating. With Bland’s-rule-style tie-breaking this should not happen on well-posed circuit-sized problems; treat it as a bug or a pathological input if it does.
NonFiniteInput
M or q contained a NaN or infinity — e.g. from an overflowing upstream device
parameter, or an ill-conditioned circuit. Checked explicitly up front so this returns a
clean error instead of reaching a partial_cmp().unwrap() panic partway through pivoting
(NaN.partial_cmp(_) is None).