| relaxRatioPotTools | index relaxRatioPotTools.py |
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) - initializer optional.
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.
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
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
| Functions | ||
| ||
| Data | ||
| FALSE = 0 PI = 3.1415926535897931 TRUE = 1 __package__ = None default_resid = 1700 default_segid = '' pi = 3.1415926535897931 psfTmPTemplate = '\nstructure\nPSF\n\n 1 !NTITLE\n REMARKS preP... 1 0 !NGRP\n 0 0 0\n\nend\n' pyXplorHelp = Type help() for interactive help, or help(object) for help about object. radiusMap = {'C': 1.8500000000000001, 'H': 1.0, 'N': 1.75, 'O': 1.6000000000000001, 'S': 2.0} registeredTerms = {} | ||