Package linear_operators :: Module operators
[hide private]
[frames] | no frames]

Module operators

source code

Definition of specialized LinearOperator subclasses.

Classes
-------

- SymmetricOperator : Enforces matvec = rmatvec and square shape.

- IdentityOperator : Identity operator.

- HomotheticOperator : Homothetic operators : i.e. of the form a * I.

- DiagonalOperator : Diagonal operator.

- MaskOperator : Diagonal operator with ones and zeros on the diagonal.

- ShiftOperator : Shift the input vector values.

- PermutationOperator : Perform permutations of the input vector values.

- FftOperator : Perform one-dimensional Fast-Fourier Transform (np.fft.fft)

- ReplicationOperator : Replicates the input vector n times.

- SliceOperator : Performs slicing on an array.

- TridiagonalOperator : A tridiagonal matrix a 3 1d arrays.

- SymmetricTridiagonal : A symmetric tridiagonal matrix a 2 1d arrays.

- BandOperator : A band matrix using lapack storage scheme.

- SymmetricBandOperator : A symmetric band matrix using lapack storage scheme.

- LoweTriangularOperator : A special case of band operator with only subdiagonal bands.

- UpperTriangularOperator : A special case of band operator with only superdiagonal bands.

- EigendecompositionOperator : A class storing eigenpairs of another operator.

Functions
---------

Functions generate instances of the associated classes. The following are available :

- identity
- homothetic
- diagonal
- mask
- shift
- permutation
- fft
- replication
- slice_operator
- tridiagonal

- band_approximation : Generate a BandOperator from a dense matrix.
- symmetric_band_approximation : Generate a BandOperator from a dense matrix.

Classes [hide private]
  SymmetricOperator
Subclass of LinearOperator for the definition of symmetric operators, i.e.
  IdentityOperator
SymmetricOperator with identity matvec (lambda x: x).
  HomotheticOperator
Generate a SymmetricOperator performing an homothety, i.e.
  DiagonalOperator
An operator which mimics a diagonal matrix.
  MaskOperator
A subclass of DiagonalOperator with a boolean diagonal.
  ShiftOperator
A LinearOperator corresponding to a shift matrix
  PermutationOperator
Perform permutations to the vector elements.
  FftOperator
Generate an Operator performing Fast Fourier Transform.
  ReplicationOperator
Generate an operator which replicates the input vector n times.
  SliceOperator
Perform slicing on the input vector.
  TridiagonalOperator
Store a tridiagonal operator in the form of 3 arrays
  SymmetricTridiagonal
  BandOperator
Store a band matrix in ab format as defined in LAPACK documentation.
  LowerTriangularOperator
  UpperTriangularOperator
  SymmetricBandOperator
  EigendecompositionOperator
Define a SymmetricOperator from the eigendecomposition of another SymmetricOperator.
Functions [hide private]
 
_band_diag(ku, i=0)
Return a slice to get the i-th line of a band operator
source code
 
identity(shape, **kwargs)
Parameters: shape : the shape of the operator Output: I : identity LinearOperator
source code
 
homothetic(shape, coef, **kwargs) source code
 
diagonal(d, **kwargs) source code
 
diag(d, **kwargs) source code
 
mask(mask, **kwargs) source code
 
shift(shape, s, **kwargs) source code
 
permutation(p, **kwargs) source code
 
fft(shape, **kwargs) source code
 
replication(shape, n, **kwargs) source code
 
slice_operator(shape, slice, **kwargs) source code
 
tridiagonal(shape, diag, subdiag, superdiag, **kwargs) source code
 
symmetric_tridiagonal(shape, diag, subdiag, **kwargs) source code
 
band_operator(shape, ab, kl, ku, **kwargs) source code
 
symmetric_band_operator(shape, ab, lower=True, **kwargs) source code
 
band_approximation(mat, kl=0, ku=0)
Approximate a dense matrix as a BandOperator.
source code
 
symmetric_band_approximation(mat, k=0)
Approximate a symmetrix matrix as a SymmetricBandOperator.
source code
Variables [hide private]
  __package__ = 'linear_operators'
Function Details [hide private]

identity(shape, **kwargs)

source code 

Parameters: shape : the shape of the operator Output: I : identity LinearOperator

Exemple: >>> I = identity((16, 16), dtype=float32)