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

Vector of double floats. More...

Inheritance diagram for amino.mat.DVec:
amino.mixin.VecMixin amino.mixin.CopyEltsMixin amino.mixin.SSDEqMixin amino.mixin.DivCompatMixin

Public Member Functions

def __init__ (self, arg=None)
 Constructs a vector. More...
 
def copy_from (self, src)
 Copies the contents of thing into self.
 
def copy_to (self, dst)
 Copies self to thing.
 
def axpy (self, alpha, x)
 self = alpha*x, where alpha is a scalar and x is a DVec
 
def zero (self)
 Fills self with zeros.
 
def set (self, alpha)
 Sets all elements of self to scalar alpha.
 
def increment (self, alpha)
 self = self + alpha, for scalar alpha
 
def gemv (self, trans, alpha, A, x, beta)
 General matrix-vector multiply. More...
 
def ssd (self, other)
 Sum of square differences.
 
def nrm2 (self)
 Euclidean norm of self.
 
def __getitem__ (self, key)
 Returns an item or slice of self.
 
def __setitem__ (self, key, item)
 Set an item of self.
 
def __len__ (self)
 Number of elements in self.
 
def inc (self)
 Increment between elements.
 
def __iadd__ (self, other)
 Add a scalar or vector to self.
 
def __add__ (self, other)
 Add a scalar or vector to self.
 
def __radd__ (self, other)
 Add a scalar or vector to self.
 
def __sub__ (self, other)
 Subtract a scalar or vector from self.
 
def __rsub__ (self, other)
 Subtract a self from a scalar or vecto.
 
def __imul__ (self, other)
 Multiply self by a scala.
 
def __neg__ (self)
 Negate self.
 
def __mul__ (self, other)
 Multiply self by a scala.
 
def __rmul__ (self, other)
 Multiply self by a scala.
 
def __itruediv__ (self, other)
 Divide self by a scala.
 
def __truediv__ (self, other)
 Divide self by a scala.
 
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 ensure (thing)
 If thing is not a DVec, construct a DVec containging thing. More...
 

Detailed Description

Vector of double floats.

Definition at line 49 of file mat.py.

Constructor & Destructor Documentation

◆ __init__()

def amino.mat.DVec.__init__ (   self,
  arg = None 
)

Constructs a vector.

   If arg is None -- Create an unitialized DVec
   If arg is a list -- Fill the DVec with list contents
   If arg is an int -- Create a DVec of that size

Definition at line 67 of file mat.py.

Member Function Documentation

◆ ensure()

def amino.mat.DVec.ensure (   thing)
static

If thing is not a DVec, construct a DVec containging thing.

Returns
thing if already a DVec, other a newly-constructed DVec.

Definition at line 83 of file mat.py.

◆ gemv()

def amino.mat.DVec.gemv (   self,
  trans,
  alpha,
  A,
  x,
  beta 
)

General matrix-vector multiply.

self = alpha*A*x + beta*self

alpha – a scalar A a matrix x a vector beta a scalar

Definition at line 139 of file mat.py.


The documentation for this class was generated from the following file: