pub struct L1Term {
pub costs: Vec<f64>,
pub anchor: Vec<f64>,
}Expand description
A piecewise-linear proportional cost
sum_i costs[i] * |x[i] - anchor[i]| added to the smooth objective
(for portfolios: exact L1 turnover around the previous weights).
Costs must be non-negative. The term is handled by a dedicated
soft-threshold proximal block inside the solver, so it never grows the
SMW-reduced dimension — unlike an epigraph reformulation, which would add
(2n) general constraint rows (see docs/algorithm.md §4).
Fields§
§costs: Vec<f64>Non-negative per-variable cost coefficients (c).
anchor: Vec<f64>Anchor point (a) the absolute deviations are measured from.
Implementations§
Trait Implementations§
impl StructuralPartialEq for L1Term
Auto Trait Implementations§
impl Freeze for L1Term
impl RefUnwindSafe for L1Term
impl Send for L1Term
impl Sync for L1Term
impl Unpin for L1Term
impl UnsafeUnpin for L1Term
impl UnwindSafe for L1Term
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