Skip to main content

AdjointOperator

Trait AdjointOperator 

Source
pub trait AdjointOperator<T: Real = f64>: LinearOperator<T> {
    // Required method
    fn apply_t(&mut self, x: &[T], y: &mut [T]) -> Result<(), OperatorError>;

    // Provided method
    fn apply_t_block(
        &mut self,
        x: MatRef<'_, T>,
        y: MatMut<'_, T>,
    ) -> Result<(), OperatorError> { ... }
}
Expand description

An operator that also applies its transpose: y ← Aᵀ x. Needed by crate::rsvd() and crate::svds().

Required Methods§

Source

fn apply_t(&mut self, x: &[T], y: &mut [T]) -> Result<(), OperatorError>

y ← Aᵀ x (x.len() == nrows(), y.len() == ncols()).

§Errors

Whatever the operator reports.

Provided Methods§

Source

fn apply_t_block( &mut self, x: MatRef<'_, T>, y: MatMut<'_, T>, ) -> Result<(), OperatorError>

Block version; default loops over AdjointOperator::apply_t.

§Errors

Whatever the operator reports; an OperatorError if the shapes do not match.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Real, O: AdjointOperator<T> + ?Sized> AdjointOperator<T> for &mut O

Source§

fn apply_t(&mut self, x: &[T], y: &mut [T]) -> Result<(), OperatorError>

Source§

fn apply_t_block( &mut self, x: MatRef<'_, T>, y: MatMut<'_, T>, ) -> Result<(), OperatorError>

Source§

impl<T: Real> AdjointOperator<T> for CscMatrix<T>

Source§

fn apply_t(&mut self, x: &[T], y: &mut [T]) -> Result<(), OperatorError>

Source§

impl<T: Real> AdjointOperator<T> for CsrMatrix<T>

Source§

fn apply_t(&mut self, x: &[T], y: &mut [T]) -> Result<(), OperatorError>

Implementors§

Source§

impl<T, F, G> AdjointOperator<T> for FnAdjointOperator<F, G>
where T: Real, F: FnMut(&[T], &mut [T]) -> Result<(), OperatorError>, G: FnMut(&[T], &mut [T]) -> Result<(), OperatorError>,

Source§

impl<T: Real> AdjointOperator<T> for DenseBlock<T>

Source§

impl<T: Real> AdjointOperator<T> for MatRef<'_, T>