pub struct ProblemView<'a> {
pub q: &'a CscMatrix,
pub a: &'a CscMatrix,
pub c: &'a [f64],
pub b: &'a [f64],
pub bounds: &'a [(f64, f64)],
pub constraint_types: &'a [ConstraintType],
pub eliminated_cols: &'a [bool],
}Expand description
KKT 計算に必要な要素だけを参照する軽量 view。
eliminated_cols[j] == true の col は presolve が物理削除した EmptyCol で、
postsolve が x[j]=val を埋め戻したあとの original space stationarity 評価から除外する
(bd=0 慣例で r=0 になる前提)。reduced space (IPM 内部) では &[] を渡す:
削除済み col は構造的に存在しないため。長さ != bounds.len() の slice は無視する。
Fields§
§q: &'a CscMatrix§a: &'a CscMatrix§c: &'a [f64]§b: &'a [f64]§bounds: &'a [(f64, f64)]§constraint_types: &'a [ConstraintType]§eliminated_cols: &'a [bool]Implementations§
Source§impl<'a> ProblemView<'a>
impl<'a> ProblemView<'a>
Sourcepub fn from_problem(problem: &'a QpProblem) -> Self
pub fn from_problem(problem: &'a QpProblem) -> Self
presolve 情報なしで構築する (IPM internal / tests)。eliminated_cols = &[]。
Auto Trait Implementations§
impl<'a> Freeze for ProblemView<'a>
impl<'a> RefUnwindSafe for ProblemView<'a>
impl<'a> Send for ProblemView<'a>
impl<'a> Sync for ProblemView<'a>
impl<'a> Unpin for ProblemView<'a>
impl<'a> UnsafeUnpin for ProblemView<'a>
impl<'a> UnwindSafe for ProblemView<'a>
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
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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>
Converts
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>
Converts
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