Skip to main content

BlockOps

Struct BlockOps 

Source
pub struct BlockOps { /* private fields */ }
Expand description

Delayed matrix-free direct sum of static blocks.

Implementations§

Source§

impl BlockOps

Source

pub fn new( blocks: impl IntoIterator<Item = Arc<dyn LinearOperator>>, ) -> Result<Self>

Source

pub fn blocks(&self) -> usize

Source

pub fn materialize(&self, format: MatrixFormat) -> Result<Operator>

Source

pub fn push(&mut self, block: Arc<dyn LinearOperator>) -> Result<()>

Trait Implementations§

Source§

impl LinearOperator for BlockOps

Source§

fn shape(&self) -> (usize, usize)

Return (rows, columns).
Source§

fn format(&self) -> MatrixFormat

Report the public materialization format.
Source§

fn apply(&self, input: &[Complex64], output: &mut [Complex64]) -> Result<()>

Compute output = A * input. Read more
Source§

fn stored_triplets(&self) -> Result<Option<Vec<(usize, usize, Complex64)>>>

Return canonical stored nonzeros when the representation already owns them.
Source§

fn is_real(&self) -> bool

Whether this operator preserves real vectors exactly. Read more
Source§

fn apply_real(&self, input: &[f64], output: &mut [f64]) -> Result<()>

Apply this operator to a real vector. Read more
Source§

fn apply_transpose( &self, input: &[Complex64], output: &mut [Complex64], ) -> Result<()>

Apply the algebraic transpose without conjugating either operand. Read more
Source§

fn apply_adjoint( &self, input: &[Complex64], output: &mut [Complex64], ) -> Result<()>

Apply the conjugate transpose.
Source§

fn shifted_solver( &self, _shift: f64, ) -> Result<Option<Box<dyn ShiftedLinearSolver>>>

Prepare a reusable solver for (A - shift I) x = b, when supported.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<O> RuntimeAdjointLinearOperator<CpuRuntime> for O
where O: LinearOperator + ?Sized,

Source§

fn apply_adjoint_on( &self, _runtime: &CpuRuntime, input: &CpuBuffer, output: &mut CpuBuffer, ) -> Result<(), QmbedError>

Compute output = A† * input in runtime-owned storage.
Source§

impl<O> RuntimeLinearOperator<CpuRuntime> for O
where O: LinearOperator + ?Sized,

Source§

fn runtime_shape(&self) -> (usize, usize)

Return (rows, columns) in runtime coordinates.
Source§

fn apply_on( &self, _runtime: &CpuRuntime, input: &CpuBuffer, output: &mut CpuBuffer, ) -> Result<(), QmbedError>

Apply this map to backend-owned buffers.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,