Python: module cdsMatrix
 
cdsMatrix
index

Numerical matrix classes
 
  CDSMatrixes are container objects for numerical contents. Elements
can be assigned to and read from using [i,j] index notation.
They can be added, subtracted, and multiplied. 
 
Classes:
 CDSMatrix_double
 CDSMatrix_DComplex
 CDSMatrix_int
 
 
Constructor:
 
   Here, replace ``type'' with the appropriate containee type (e.g., ``double'').
 
 CDSMatrix_type(rows, cols[, initializer])
   where the number of rows (rows), number of columns (cols), and an optional
   initializer value are specified.
 
 CDSMatrix_type(otherMatrix)
   construct a new CDSMatrix, initializing elements from those of otherMatrix.
 
Also:
 
 SymMatrix_double(size)
   construct symmetric real matrix of specified size.
 
 SymMatrix_double(lowerTri)
   construct symmetric real matrix from a lower triangular matrix. 
   Example:
            s = SymMatrix_double([1,2,3])
            print s
            [1, 2]
            [2, 3]
 
Methods:
 
  fromList(list) - set elements from a sequence of sequences.
 
  rows() - number of rows
  cols() - number of columns
 
  set(val) - set all elements to val.
  setDiag(val) - set all diagonal elements to val.
  scale(val) - scale all elements by val.
  add(val)   - add val to all elements.
  rawData()  - return a cdsVector.CDSVector_double containing the
               data in the matrix in column-major form.
 
One can multiply CDSMatrixes by CDSMatrixes and by cdsVector.CDSVectors.
 
In addition there are the functions:
 
 transpose(mat) - return the matrix transpose
 
 inverse(mat)   - return the matrix inverse
 
 svd(mat) - perform singular value decomposition on mat, and return the
            results in a structure with members
               sigma - singular values
               u     - left matrix
               vT    - right matrix
            Note that the singular value representation of mat is
                    u * sigma * vT
            Optional jobu and jobvt arguments may be specified:
               
               jobu:  
                  Specifies options for computing all or part of the
                 matrix u:
                  'A':  all M columns of U are returned in array U:
                  'S':  the first min(m,n) columns of U (the left
                        singular vectors) are returned in the array U
                  'N':  no columns of U (no left singular vectors) are
                        computed.
 
               jobvt:
                 Specifies options for computing all or part of the
                 matrix V^T:
                   'A':  all N rows of V^T are returned in the array
                         VT
                   'S':  the first min(m,n) rows of V^T (the right
                         singular vectors) are returned in the array VT
                   'N':  no rows of V^T (no right singular vectors)
                         are computed.
 
            By default, these two argument both take 'A' values.
 
 eigen(mat) - perform eigenvalue analysis on mat. This returns a list of 
              eigenPairs, each of which has accessors value and vector
              which which return the expected information.
 
 trace(mat) - return trace of mat
 
 det(mat)   - return determinate of mat
 
 
 
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

 
Classes
       
builtins.object
CDSList_DComplex
CDSList_EigenPair_DComplex
CDSList_EigenPair_double
CDSMatrix_DComplex
CDSMatrix_double
CDSMatrix_int
EigenPair_DComplex
EigenPair_double
Mat3
SVDResults_double
SymMatrix_double

 
class CDSList_DComplex(builtins.object)
    CDSList_DComplex(*args)
 

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< DComplex >'
__getslice__(self, *args, **kwargs) -> 'CDSList< DComplex >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__len__(self, *args, **kwargs) -> 'int'
__repr__ = _swig_repr(self)
__setitem__(self, *args, **kwargs) -> 'void'
append(self, *args, **kwargs) -> 'void'
help(self, *args, **kwargs) -> 'String'
remove(self, *args, **kwargs) -> 'void'
removeAll(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_CDSList_DComplex(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class CDSList_EigenPair_DComplex(builtins.object)
    CDSList_EigenPair_DComplex(*args)
 

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< EigenPair< DComplex > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< EigenPair< DComplex > >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__len__(self, *args, **kwargs) -> 'int'
__repr__ = _swig_repr(self)
__setitem__(self, *args, **kwargs) -> 'void'
append(self, *args, **kwargs) -> 'void'
help(self, *args, **kwargs) -> 'String'
remove(self, *args, **kwargs) -> 'void'
removeAll(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_CDSList_EigenPair_DComplex(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class CDSList_EigenPair_double(builtins.object)
    CDSList_EigenPair_double(*args)
 

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< EigenPair< double > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< EigenPair< double > >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__len__(self, *args, **kwargs) -> 'int'
__repr__ = _swig_repr(self)
__setitem__(self, *args, **kwargs) -> 'void'
append(self, *args, **kwargs) -> 'void'
help(self, *args, **kwargs) -> 'String'
remove(self, *args, **kwargs) -> 'void'
removeAll(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_CDSList_EigenPair_double(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class CDSMatrix_DComplex(builtins.object)
    CDSMatrix_DComplex(*args)
 

 
  Methods defined here:
__add__(self, *args, **kwargs) -> 'CDSMatrix< DComplex >'
__getitem__(self, *args, **kwargs) -> 'DComplex'
__iadd__(self, *args, **kwargs) -> 'CDSMatrix< DComplex >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__mul__(self, *args) -> 'CDSMatrix< DComplex >'
__neg__(self, *args, **kwargs) -> 'CDSMatrix< DComplex >'
__repr__(self, *args, **kwargs) -> 'String'
Return repr(self).
__rmul__(self, *args, **kwargs) -> 'CDSMatrix< DComplex >'
__setitem__(self, *args, **kwargs) -> 'void'
__str__(self, *args, **kwargs) -> 'String'
Return str(self).
__sub__(self, *args, **kwargs) -> 'CDSMatrix< DComplex >'
add(self, *args, **kwargs) -> 'void'
cols(self, *args, **kwargs) -> 'int'
fromList(s, l)
get(self, *args, **kwargs) -> 'DComplex'
rawData(self, *args, **kwargs) -> 'CDSVector< DComplex >'
resize(self, *args, **kwargs) -> 'void'
rows(self, *args, **kwargs) -> 'int'
scale(self, *args, **kwargs) -> 'void'
set(self, *args) -> 'void'
setDiag(self, *args) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_CDSMatrix_DComplex(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
CDSMatrix_complex = class CDSMatrix_DComplex(builtins.object)
    CDSMatrix_complex(*args)
 

 
  Methods defined here:
__add__(self, *args, **kwargs) -> 'CDSMatrix< DComplex >'
__getitem__(self, *args, **kwargs) -> 'DComplex'
__iadd__(self, *args, **kwargs) -> 'CDSMatrix< DComplex >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__mul__(self, *args) -> 'CDSMatrix< DComplex >'
__neg__(self, *args, **kwargs) -> 'CDSMatrix< DComplex >'
__repr__(self, *args, **kwargs) -> 'String'
Return repr(self).
__rmul__(self, *args, **kwargs) -> 'CDSMatrix< DComplex >'
__setitem__(self, *args, **kwargs) -> 'void'
__str__(self, *args, **kwargs) -> 'String'
Return str(self).
__sub__(self, *args, **kwargs) -> 'CDSMatrix< DComplex >'
add(self, *args, **kwargs) -> 'void'
cols(self, *args, **kwargs) -> 'int'
fromList(s, l)
get(self, *args, **kwargs) -> 'DComplex'
rawData(self, *args, **kwargs) -> 'CDSVector< DComplex >'
resize(self, *args, **kwargs) -> 'void'
rows(self, *args, **kwargs) -> 'int'
scale(self, *args, **kwargs) -> 'void'
set(self, *args) -> 'void'
setDiag(self, *args) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_CDSMatrix_DComplex(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class CDSMatrix_double(builtins.object)
    CDSMatrix_double(*args)
 

 
  Methods defined here:
__add__(self, *args, **kwargs) -> 'CDSMatrix< double >'
__getitem__(self, *args, **kwargs) -> 'double'
__iadd__(self, *args, **kwargs) -> 'CDSMatrix< double >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__mul__(self, *args) -> 'CDSMatrix< double >'
__neg__(self, *args, **kwargs) -> 'CDSMatrix< double >'
__repr__(self, *args, **kwargs) -> 'String'
Return repr(self).
__rmul__(self, *args, **kwargs) -> 'CDSMatrix< double >'
__setitem__(self, *args, **kwargs) -> 'void'
__str__(self, *args, **kwargs) -> 'String'
Return str(self).
__sub__(self, *args, **kwargs) -> 'CDSMatrix< double >'
add(self, *args, **kwargs) -> 'void'
cols(self, *args, **kwargs) -> 'int'
fromList(s, l)
get(self, *args, **kwargs) -> 'double'
rawData(self, *args, **kwargs) -> 'CDSVector< double >'
resize(self, *args, **kwargs) -> 'void'
rows(self, *args, **kwargs) -> 'int'
scale(self, *args, **kwargs) -> 'void'
set(self, *args) -> 'void'
setDiag(self, *args) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_CDSMatrix_double(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class CDSMatrix_int(builtins.object)
    CDSMatrix_int(*args)
 

 
  Methods defined here:
__add__(self, *args, **kwargs) -> 'CDSMatrix< int >'
__getitem__(self, *args, **kwargs) -> 'int'
__iadd__(self, *args, **kwargs) -> 'CDSMatrix< int >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__mul__(self, *args) -> 'CDSMatrix< int >'
__neg__(self, *args, **kwargs) -> 'CDSMatrix< int >'
__repr__(self, *args, **kwargs) -> 'String'
Return repr(self).
__rmul__(self, *args, **kwargs) -> 'CDSMatrix< int >'
__setitem__(self, *args, **kwargs) -> 'void'
__str__(self, *args, **kwargs) -> 'String'
Return str(self).
__sub__(self, *args, **kwargs) -> 'CDSMatrix< int >'
add(self, *args, **kwargs) -> 'void'
cols(self, *args, **kwargs) -> 'int'
fromList(s, l)
get(self, *args, **kwargs) -> 'int'
rawData(self, *args, **kwargs) -> 'CDSVector< int >'
resize(self, *args, **kwargs) -> 'void'
rows(self, *args, **kwargs) -> 'int'
scale(self, *args, **kwargs) -> 'void'
set(self, *args) -> 'void'
setDiag(self, *args) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_CDSMatrix_int(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class EigenPair_DComplex(builtins.object)
    EigenPair_DComplex(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
value(self, *args, **kwargs) -> 'DComplex'
vector(self, *args, **kwargs) -> 'CDSList< DComplex >'

Static methods defined here:
__swig_destroy__ = delete_EigenPair_DComplex(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag
value_

 
vector_

 

 
class EigenPair_double(builtins.object)
    EigenPair_double(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
value(self, *args, **kwargs) -> 'double'
vector(self, *args, **kwargs) -> 'CDSList< double >'

Static methods defined here:
__swig_destroy__ = delete_EigenPair_double(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag
value_

 
vector_

 

 
class Mat3(builtins.object)
    Mat3(*args)
 

 
  Methods defined here:
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
fromCols(self, *args, **kwargs) -> 'void'
fromRows(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_Mat3(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
RMat = class CDSMatrix_double(builtins.object)
    RMat(*args)
 

 
  Methods defined here:
__add__(self, *args, **kwargs) -> 'CDSMatrix< double >'
__getitem__(self, *args, **kwargs) -> 'double'
__iadd__(self, *args, **kwargs) -> 'CDSMatrix< double >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__mul__(self, *args) -> 'CDSMatrix< double >'
__neg__(self, *args, **kwargs) -> 'CDSMatrix< double >'
__repr__(self, *args, **kwargs) -> 'String'
Return repr(self).
__rmul__(self, *args, **kwargs) -> 'CDSMatrix< double >'
__setitem__(self, *args, **kwargs) -> 'void'
__str__(self, *args, **kwargs) -> 'String'
Return str(self).
__sub__(self, *args, **kwargs) -> 'CDSMatrix< double >'
add(self, *args, **kwargs) -> 'void'
cols(self, *args, **kwargs) -> 'int'
fromList(s, l)
get(self, *args, **kwargs) -> 'double'
rawData(self, *args, **kwargs) -> 'CDSVector< double >'
resize(self, *args, **kwargs) -> 'void'
rows(self, *args, **kwargs) -> 'int'
scale(self, *args, **kwargs) -> 'void'
set(self, *args) -> 'void'
setDiag(self, *args) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_CDSMatrix_double(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class SVDResults_double(builtins.object)
    SVDResults_double(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)

Static methods defined here:
__swig_destroy__ = delete_SVDResults_double(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
sigma

 
thisown

 
The membership flag
u

 
vT

 

 
class SymMatrix_double(builtins.object)
    SymMatrix_double(*args)
 

 
  Methods defined here:
__add__(self, *args, **kwargs) -> 'SymMatrix< double >'
__getitem__(self, *args, **kwargs) -> 'double'
__iadd__(self, *args, **kwargs) -> 'SymMatrix< double >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__mul__(self, *args) -> 'CDSVector< double >'
__repr__(self, *args, **kwargs) -> 'String'
Return repr(self).
__rmul__(self, *args, **kwargs) -> 'SymMatrix< double >'
__setitem__(self, *args, **kwargs) -> 'void'
__str__(self, *args, **kwargs) -> 'String'
Return str(self).
__sub__(self, *args, **kwargs) -> 'SymMatrix< double >'
cols(self, *args, **kwargs) -> 'int'
rows(self, *args, **kwargs) -> 'int'
scale(self, *args, **kwargs) -> 'void'
set(self, *args) -> 'void'
setDiag(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_SymMatrix_double(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
Functions
       
crossMat(*args, **kwargs) -> 'Mat3'
det(m)
return the determinate of matrix m
eigen(*args) -> 'CDSList< EigenPair< double >,10 >'
fast_max(*args) -> 'CDSMatrix< DComplex >::ElementType'
fast_min(*args) -> 'CDSMatrix< DComplex >::ElementType'
getCol(*args) -> 'CDSVector< CDSMatrix< DComplex >::ElementType >'
getRow(*args) -> 'CDSVector< CDSMatrix< DComplex >::ElementType >'
inverse(*args) -> 'SymMatrix< double >'
max(*args)
min(*args)
outerProd(*args)
can do better than this...
pyXplorHelp(*args) -> 'String'
randOrient(*args, **kwargs) -> 'Vec3'
randRot(*args, **kwargs) -> 'Mat3'
rotVector(*args, **kwargs) -> 'Mat3'
svd(*args) -> 'SVDResults< double >'
trace(m)
transpose(*args) -> 'SymMatrix< double >'
vec3_outerProd(*args, **kwargs) -> 'Mat3'
vec_outerProd(*args) -> 'CDSMatrix< DComplex >'

 
Data
        FALSE = 0
PI = 3.141592653589793
TRUE = 1
__sthead_hh__ = 1