amino  1.0-beta2
Lightweight Robot Utility Library
amino.mat.DMat Class Reference

Matrix of double floats. More...

Inheritance diagram for amino.mat.DMat:
amino.mixin.SSDEqMixin amino.mixin.DivCompatMixin amino.mixin.MatMixin

Public Member Functions

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)
 
- Public Member Functions inherited from amino.mixin.SSDEqMixin
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.
 
- Public Member Functions inherited from amino.mixin.DivCompatMixin
def __div__ (self, other)
 
def __idiv__ (self, other)
 Divide self by a scala.
 

Static Public Member Functions

def row_matrix (args)
 Creates a matrix from rows passed in args.
 
def col_matrix (args)
 Creates a matrix from columns passed in args.
 

Detailed Description

Matrix of double floats.

Definition at line 272 of file mat.py.

Member Function Documentation

◆ 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
transAwhether to transpose A
transBwhether to transpose B
alphascale factor for A and B
betascale factor for self

Definition at line 397 of file mat.py.

◆ pinv()

def amino.mat.DMat.pinv (   self,
  tol = -1 
)

Returns the pseudoinverse.

Parameters
tolsingular 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: