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

Class BandOperator

source code

              object --+    
                       |    
interface.LinearOperator --+
                           |
                          BandOperator
Known Subclasses:


Store a band matrix in ab format as defined in LAPACK
documentation.

a[i, j] is stored in ab[ku + 1 + i - j, j]

for max(1, j -ku) < i < min(m, j + kl)

Band storage of A (5, 5), kl = 2, ku = 1 :

 *  a01 a12 a23 a34
a00 a11 a22 a33 a44
a10 a21 a32 a43  *
a20 a31 a42  *   *

Arguments
----------
shape : 2-tuple
    Shape of the dense matrix equivalent.
kl : int
    Number of subdiagonals
ku : int
    Number of superdiagonals

Notes
-----
For a description of band matrices see LAPACK doc :

http://www.netlib.org/lapack/lug/node124.html

Instance Methods [hide private]
 
__init__(self, shape, ab, kl, ku, **kwargs)
Generate a BandOperator instance
source code
 
diag(self, i=0)
Returns the i-th diagonal (subdiagonal if i < 0, superdiagonal if i >0).
source code

Inherited from interface.LinearOperator: __add__, __iadd__, __imul__, __isub__, __mul__, __neg__, __pow__, __radd__, __repr__, __rmul__, __rsub__, __sub__, matmat, matvec, todense

Inherited from interface.LinearOperator (private): _matmat

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  T
  rab
Output the ab form of the transpose operator.

Inherited from object: __class__

Method Details [hide private]

__init__(self, shape, ab, kl, ku, **kwargs)
(Constructor)

source code 

Generate a BandOperator instance

Arguments
---------
shape : 2-tuple
   The shape of the operator
ab : ndarray with ndim == 2
   Store the bands of the matrix using LAPACK storage scheme.
kl : int
    Number of subdiagonals
ku : int
    Number of superdiagonals

Overrides: object.__init__

Property Details [hide private]

T

Get Method:
unreachable.T(self)

rab

Output the ab form of the transpose operator.

Get Method:
unreachable.rab(self) - Output the ab form of the transpose operator.