pub struct FactorQuad {
pub factors: Matrix,
pub omega: FactorCovariance,
pub diagonal: Vec<f64>,
}Expand description
A positive-semidefinite quadratic represented as (Q = F\Omega F^\mathsf{T} + \operatorname{diag}(d)).
Fields§
§factors: MatrixAsset-by-factor exposure matrix.
omega: FactorCovarianceFactor covariance.
diagonal: Vec<f64>Non-negative idiosyncratic diagonal.
Implementations§
Source§impl FactorQuad
impl FactorQuad
Sourcepub fn new(
factors: Matrix,
omega: FactorCovariance,
diagonal: Vec<f64>,
) -> Result<FactorQuad, ProblemError>
pub fn new( factors: Matrix, omega: FactorCovariance, diagonal: Vec<f64>, ) -> Result<FactorQuad, ProblemError>
Creates a factor quadratic after checking dimensions and convexity data.
Positive semidefiniteness of a dense omega is checked during solver
setup, where its Cholesky-like factor is needed.
§Errors
Returns a ProblemError for inconsistent dimensions, non-finite
values, asymmetry, or negative diagonal entries.
Sourcepub fn factor_count(&self) -> usize
pub fn factor_count(&self) -> usize
Number of latent factors.
Trait Implementations§
Source§impl Clone for FactorQuad
impl Clone for FactorQuad
Source§fn clone(&self) -> FactorQuad
fn clone(&self) -> FactorQuad
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FactorQuad
impl Debug for FactorQuad
Source§impl PartialEq for FactorQuad
impl PartialEq for FactorQuad
impl StructuralPartialEq for FactorQuad
Auto Trait Implementations§
impl Freeze for FactorQuad
impl RefUnwindSafe for FactorQuad
impl Send for FactorQuad
impl Sync for FactorQuad
impl Unpin for FactorQuad
impl UnsafeUnpin for FactorQuad
impl UnwindSafe for FactorQuad
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