Package gmisclib :: Module sbd_array :: Class sbd
[frames] | no frames]

Class sbd

source code

Instance Methods
 
__init__(self, sz, bw, _data=None)
Constructs a symmetric band-diagonal matrix of sz*sz, with a nonzero bandwidth of bw.
source code
 
__copy__(self)
Copy the data, not just the data description.
source code
 
__getitem__(self, key)
Pulls an element of the array.
source code
 
__setitem__(self, key, value) source code
 
increment(self, key, delta)
Increment a single value (and its symmetric partner, if off the diagonal).
source code
 
bd_increment(self, key, delta)
Block diagonal increment.
source code
 
__str__(self) source code
 
__repr__(self) source code
 
__pow__(self, other) source code
 
__getslice__(self, i, j)
This is copy semantics, not shared reference.
source code
Method Details

__init__(self, sz, bw, _data=None)
(Constructor)

source code 

Constructs a symmetric band-diagonal matrix of sz*sz, with a nonzero bandwidth of bw. bw==0 corresponds to a diagonal matrix.

__getitem__(self, key)
(Indexing operator)

source code 

Pulls an element of the array. Key is a 2-tuple that specifies the 'virtual' position in the array (i.e., as if the array were a full square matrix, rather than a band diagonal symmetric matrix.