Matrix of double floats.
More...
|
def | __init__ (self, arg=None) |
| Constructs a matrix.
|
|
def | copy_from (self, src) |
| Copies elements from src into self.
|
|
def | rows (self) |
| Number of rows.
|
|
def | cols (self) |
| Number of columns.
|
|
def | ld (self) |
| Leading dimension of data.
|
|
def | data (self) |
| Pointer to data.
|
|
def | __len__ (self) |
|
def | row_vec (self, i) |
| Returns the i'th row as a DVec.
|
|
def | col_vec (self, j) |
| Returns the j'th column as a DVec.
|
|
def | diag_vec (self) |
| Returns the diagonal as a DVec.
|
|
def | transpose (self) |
| Returns the tranpose of the matrix.
|
|
def | ssd (self, other) |
| Returns Sum of square differences.
|
|
def | nrm2 (self) |
| Returns the Euclidean norm of self.
|
|
def | gemm (self, transA, transB, alpha, A, B, beta) |
| General matrix-matrix multiply. More...
|
|
def | pinv (self, tol=-1) |
| Returns the pseudoinverse. More...
|
|
def | inv (self) |
| Returns the inverse.
|
|
def | __getitem__ (self, key) |
|
def | __setitem__ (self, key, item) |
|
def | __imul__ (self, other) |
|
def | __neg__ (self) |
| Negate self.
|
|
def | __mul__ (self, other) |
|
def | __rmul__ (self, other) |
|
def | __itruediv__ (self, other) |
| Divide self by a scala.
|
|
def | __truediv__ (self, other) |
| Divide self by a scala.
|
|
def | __iadd__ (self, other) |
|
def | __add__ (self, other) |
|
def | __radd__ (self, other) |
|
def | __isub__ (self, other) |
|
def | __sub__ (self, other) |
|
def | __rsub__ (self, other) |
|
def | __str__ (self) |
|
def | __eq__ (self, other) |
|
def | __ne__ (self, other) |
|
def | isclose (self, other, rel_tol=1e-09, abs_tol=0.0) |
| Returns true if object is close to other.
|
|
def | __div__ (self, other) |
|
def | __idiv__ (self, other) |
| Divide self by a scala.
|
|
|
def | row_matrix (args) |
| Creates a matrix from rows passed in args.
|
|
def | col_matrix (args) |
| Creates a matrix from columns passed in args.
|
|
Matrix of double floats.
Definition at line 272 of file mat.py.
◆ gemm()
def amino.mat.DMat.gemm |
( |
|
self, |
|
|
|
transA, |
|
|
|
transB, |
|
|
|
alpha, |
|
|
|
A, |
|
|
|
B, |
|
|
|
beta |
|
) |
| |
General matrix-matrix multiply.
Thin wrapper of BLAS dgemm().
self := alpha*op(A)*op(B) + beta*self
- Parameters
-
transA | whether to transpose A |
transB | whether to transpose B |
alpha | scale factor for A and B |
beta | scale factor for self |
Definition at line 397 of file mat.py.
◆ pinv()
def amino.mat.DMat.pinv |
( |
|
self, |
|
|
|
tol = -1 |
|
) |
| |
Returns the pseudoinverse.
- Parameters
-
tol | singular values less than tol are ignored. Negative values use a default. |
Definition at line 409 of file mat.py.
The documentation for this class was generated from the following file:
- /home/ntd/git/amino/python/amino/mat.py