pub struct DenseMatrixHyperOperator {
pub matrix: Array2<f64>,
}Fields§
§matrix: Array2<f64>Trait Implementations§
Source§impl Clone for DenseMatrixHyperOperator
impl Clone for DenseMatrixHyperOperator
Source§fn clone(&self) -> DenseMatrixHyperOperator
fn clone(&self) -> DenseMatrixHyperOperator
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 HyperOperator for DenseMatrixHyperOperator
impl HyperOperator for DenseMatrixHyperOperator
Source§fn dim(&self) -> usize
fn dim(&self) -> usize
Operator dimension
p such that B · v consumes a p-vector and
produces a p-vector.Source§fn mul_vec(&self, v: &Array1<f64>) -> Array1<f64>
fn mul_vec(&self, v: &Array1<f64>) -> Array1<f64>
Compute B · v (matrix-vector product). v and result are p-vectors.
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Expose the concrete type for solver-local downcast helpers when the
implementor has a
'static concrete type. Borrowing adapters may keep
the default, which simply cannot downcast.Source§fn mul_vec_view(&self, v: ArrayView1<'_, f64>) -> Array1<f64>
fn mul_vec_view(&self, v: ArrayView1<'_, f64>) -> Array1<f64>
Compute B · v from a vector view.
Source§fn mul_vec_into(&self, v: ArrayView1<'_, f64>, out: ArrayViewMut1<'_, f64>)
fn mul_vec_into(&self, v: ArrayView1<'_, f64>, out: ArrayViewMut1<'_, f64>)
Compute B · v into caller-owned storage.
Source§fn mul_basis_columns_into(&self, start: usize, out: ArrayViewMut2<'_, f64>)
fn mul_basis_columns_into(&self, start: usize, out: ArrayViewMut2<'_, f64>)
Fill columns
[start, start + out.ncols()) of B into out.Source§fn scaled_add_mul_vec(
&self,
v: ArrayView1<'_, f64>,
scale: f64,
out: ArrayViewMut1<'_, f64>,
)
fn scaled_add_mul_vec( &self, v: ArrayView1<'_, f64>, scale: f64, out: ArrayViewMut1<'_, f64>, )
Accumulate
scale * B · v into caller-owned storage.Source§fn bilinear(&self, v: &Array1<f64>, u: &Array1<f64>) -> f64
fn bilinear(&self, v: &Array1<f64>, u: &Array1<f64>) -> f64
Compute v^T · B · u (bilinear form).
Source§fn bilinear_view(&self, v: ArrayView1<'_, f64>, u: ArrayView1<'_, f64>) -> f64
fn bilinear_view(&self, v: ArrayView1<'_, f64>, u: ArrayView1<'_, f64>) -> f64
Compute v^T · B · u without requiring owned vector inputs.
Source§fn is_implicit(&self) -> bool
fn is_implicit(&self) -> bool
Whether this operator uses implicit (non-materialized) storage.
Source§fn mul_mat(&self, factor: &Array2<f64>) -> Array2<f64>
fn mul_mat(&self, factor: &Array2<f64>) -> Array2<f64>
Compute B · F where F is (p × k). Default dispatches per-column in
parallel unless already inside a rayon worker.
Source§fn trace_projected_factor(&self, factor: &Array2<f64>) -> f64
fn trace_projected_factor(&self, factor: &Array2<f64>) -> f64
Compute
trace(F^T B F) for a (p x k) factor matrix F.Source§fn projection_design_id(&self) -> Option<usize>
fn projection_design_id(&self) -> Option<usize>
Optional stable identity for this operator’s action
B. When Some,
the default cached trace / projected-matrix paths memoize the B · F
product in the shared ProjectedFactorCache under a
(design_id, factor) key, so repeated projections of the same factor
against the same operator within one outer iteration build B · F
once. None (the default) disables that reuse: an operator with no
design factor stable across calls cannot key the cache without risking
a stale B · F, so it recomputes every time.fn trace_projected_factor_cached( &self, factor: &Array2<f64>, factor_cache: &ProjectedFactorCache, ) -> f64
Source§fn projected_matrix(&self, factor: &Array2<f64>) -> Array2<f64>
fn projected_matrix(&self, factor: &Array2<f64>) -> Array2<f64>
Compute the exact projected matrix
F^T B F.Source§fn projected_matrix_cached(
&self,
factor: &Array2<f64>,
factor_cache: &ProjectedFactorCache,
) -> Array2<f64>
fn projected_matrix_cached( &self, factor: &Array2<f64>, factor_cache: &ProjectedFactorCache, ) -> Array2<f64>
Compute the exact projected matrix
F^T B F, reusing caller-owned
projection caches when the operator has a shared row/design factor.Source§fn has_fast_bilinear_view(&self) -> bool
fn has_fast_bilinear_view(&self) -> bool
Whether
bilinear_view is implemented as a direct scalar contraction.Auto Trait Implementations§
impl Freeze for DenseMatrixHyperOperator
impl RefUnwindSafe for DenseMatrixHyperOperator
impl Send for DenseMatrixHyperOperator
impl Sync for DenseMatrixHyperOperator
impl Unpin for DenseMatrixHyperOperator
impl UnsafeUnpin for DenseMatrixHyperOperator
impl UnwindSafe for DenseMatrixHyperOperator
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.