pylops.MultiOperator¶
- class pylops.MultiOperator(Op=None, dtype=None, shape=None, dims=None, dimsd=None, clinear=None, explicit=None, forceflat=None, name=None)[source]¶
Multiprocess/threading operator
This class acts as a base class for all operators that wish to support multiprocessing/multithreading in their
matvec/rmatvecmethods.Implements basic methods to instantiate and tear down a pool of workers and
_matvec/_rmatvecinterfaces that dispatch to the actual implementations for serial/multiprocess/multithread, namely:_matvec_serial/_rmatvec_serial: serial implementation;_matvec_multiproc/_rmatvec_multiproc: multiprocess implementation;_matvec_multithread/_matvec_multithread: multithreading implementation.
Developers are in charge of implementing these methods for specific operators or overwriting
_matvec/_rmatvecif not all of the implementations are available.Note
End users of PyLops should not use this class directly but simply use operators that are already implemented. This class is meant for developers and it has to be used as the parent class of any new operator with multiprocess/multithreading capabilities developed within PyLops.
Methods
__init__([Op, dtype, shape, dims, dimsd, ...])adjoint()apply_columns(cols)Apply subset of columns of operator
close()Close the pool of workers used for multiprocessing / multithreading.
cond([uselobpcg])Condition number of linear operator.
conj()Complex conjugate operator
div(y[, niter, densesolver])Solve the linear problem \(\mathbf{y}=\mathbf{A}\mathbf{x}\).
dot(x)Matrix-matrix or matrix-vector multiplication.
eigs([neigs, symmetric, niter, uselobpcg])Most significant eigenvalues of linear operator.
matmat(X[, pool])Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
reset_count()Reset counters
rmatmat(X[, pool])Matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
todense([backend])Return dense matrix.
toimag([forw, adj])Imag operator
toreal([forw, adj])Real operator
tosparse()Return sparse matrix.
trace([neval, method, backend])Trace of linear operator.
transpose()
Examples using pylops.MultiOperator¶
PWD-based slope estimation and structural smoothing