pub struct Simplex { /* private fields */ }
Expand description
A simplex with level $\alpha$ is a set of the form $\Delta_\alpha^n = \{x \in \mathbb{R}^n {}:{} x \geq 0, \sum_i x_i = \alpha\}$, where $\alpha$ is a positive constant.
Implementations§
Trait Implementations§
Source§impl Constraint for Simplex
impl Constraint for Simplex
Source§fn project(&self, x: &mut [f64])
fn project(&self, x: &mut [f64])
Project onto $\Delta_\alpha^n$ using Condat’s fast projection algorithm.
See: Laurent Condat. Fast Projection onto the Simplex and the $\ell_1$ Ball. Mathematical Programming, Series A, Springer, 2016, 158 (1), pp.575-585. ⟨10.1007/s10107-015-0946-6⟩.
impl Copy for Simplex
Auto Trait Implementations§
impl Freeze for Simplex
impl RefUnwindSafe for Simplex
impl Send for Simplex
impl Sync for Simplex
impl Unpin for Simplex
impl UnwindSafe for Simplex
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
Mutably borrows from an owned value. Read more