cdsVector
index
cdsVector.py

numerical vector classes
 
  CDSVectors are container objects which behaves much like Python
sequences: the [] operator behaves as expected, returning an
element or slice and the len() function returns the size of the
list. Note that a proper Python list is generated using the slice [:].
 
Linear algebraic functions (+*-) are also defined on CDSVector objects. 
 
constructors:
  CDSVector_type(size)
    where the vector size is specified.
  CDSVector_type(python_object)
    where python_object is a sequence whose elements are compatible with type.
  CDSVector_type(other_CDSVector_type)
    this is a copy constructor.
 
classes:
 
CDSVector_double
  vector of floating point values. CDSVector_doubles may be multiplied
by a cdsMatrix.RMat of the appropriate size.
 
CDSVector_Vec3
  vector of vec3.Vec3 objects.
 
CDSVector_int
  vector of integer values.
 
the following functions will act on CDSVector objects:
 
  sqrt(vec) - return a new CDSVector object each of whose elements is
              the sqrt of the correspondig argument of vec.
  log(vec)  - return a CDSVector whose elements are logrithms of the 
              corresponding elements of vec.
  vec_norm  - return a CDSVector_double whose elements are the norm of the 
              corresponding elements of vec.
  norm(vec) - return the norm of the entire vector.
  sum(vec)  - return the sum of the entire vector.
  __pow__
  
miscellaneous members
  fromList(obj) - read a compatible Python object into the CDSVector.
  scale(x)      - scale each element by the value x.
  __pow__(x)    - raise each member to the x power (accessed via the ** 
                  operator). 
 
Note that mathematical operations which take element members out of
range are not supported. For instance, sqrt(CDSVector_int) is not
supported. 
 

 
Classes
       
__builtin__.object
CDSVector_DComplex
CDSVector_DComplexPtr
CDSVector_Vec3
CDSVector_Vec3Ptr
CDSVector_bool
CDSVector_boolPtr
CDSVector_double
CDSVector_doublePtr
CDSVector_int
CDSVector_intPtr

 
class CDSVector_DComplex(__builtin__.object)
     Methods defined here:
__add__(*args)
__del__(self, destroy=<built-in function delete_CDSVector_DComplex>)
__div__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__iadd__(*args)
__idiv__(*args)
__imul__(*args)
__init__(self, *args)
__isub__(*args)
__len__(*args)
__mul__(*args)
__neg__(*args)
__pow__(*args)
__repr__(self)
__rmul__(*args)
__setattr__ lambda self, name, value
__setitem__(*args)
__str__(*args)
__sub__(*args)
fromList(s, l)
help(*args)
resize(*args)
scale(*args)
set(*args)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0xee99f0>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSVector_DComplex' objects>
list of weak references to the object (if defined)

 
class CDSVector_DComplexPtr(CDSVector_DComplex)
    
Method resolution order:
CDSVector_DComplexPtr
CDSVector_DComplex
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from CDSVector_DComplex:
__add__(*args)
__del__(self, destroy=<built-in function delete_CDSVector_DComplex>)
__div__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__iadd__(*args)
__idiv__(*args)
__imul__(*args)
__isub__(*args)
__len__(*args)
__mul__(*args)
__neg__(*args)
__pow__(*args)
__repr__(self)
__rmul__(*args)
__setattr__ lambda self, name, value
__setitem__(*args)
__str__(*args)
__sub__(*args)
fromList(s, l)
help(*args)
resize(*args)
scale(*args)
set(*args)

Data and other attributes inherited from CDSVector_DComplex:
__dict__ = <dictproxy object at 0xee97f8>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSVector_DComplex' objects>
list of weak references to the object (if defined)

 
class CDSVector_Vec3(__builtin__.object)
     Methods defined here:
__add__(*args)
__del__(self, destroy=<built-in function delete_CDSVector_Vec3>)
__div__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__iadd__(*args)
__idiv__(*args)
__imul__(*args)
__init__(self, *args)
__isub__(*args)
__len__(*args)
__mul__(*args)
__neg__(*args)
__pow__(*args)
__repr__(self)
__rmul__(*args)
__setattr__ lambda self, name, value
__setitem__(*args)
__str__(*args)
__sub__(*args)
fromList(s, l)
help(*args)
resize(*args)
scale(*args)
set(*args)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0xee9980>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSVector_Vec3' objects>
list of weak references to the object (if defined)

 
class CDSVector_Vec3Ptr(CDSVector_Vec3)
    
Method resolution order:
CDSVector_Vec3Ptr
CDSVector_Vec3
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from CDSVector_Vec3:
__add__(*args)
__del__(self, destroy=<built-in function delete_CDSVector_Vec3>)
__div__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__iadd__(*args)
__idiv__(*args)
__imul__(*args)
__isub__(*args)
__len__(*args)
__mul__(*args)
__neg__(*args)
__pow__(*args)
__repr__(self)
__rmul__(*args)
__setattr__ lambda self, name, value
__setitem__(*args)
__str__(*args)
__sub__(*args)
fromList(s, l)
help(*args)
resize(*args)
scale(*args)
set(*args)

Data and other attributes inherited from CDSVector_Vec3:
__dict__ = <dictproxy object at 0xee9868>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSVector_Vec3' objects>
list of weak references to the object (if defined)

 
class CDSVector_bool(__builtin__.object)
     Methods defined here:
__add__(*args)
__del__(self, destroy=<built-in function delete_CDSVector_bool>)
__div__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__iadd__(*args)
__idiv__(*args)
__imul__(*args)
__init__(self, *args)
__isub__(*args)
__len__(*args)
__mul__(*args)
__neg__(*args)
__pow__(*args)
__repr__(self)
__rmul__(*args)
__setattr__ lambda self, name, value
__setitem__(*args)
__str__(*args)
__sub__(*args)
fromList(s, l)
help(*args)
resize(*args)
scale(*args)
set(*args)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0xee99f0>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSVector_bool' objects>
list of weak references to the object (if defined)

 
class CDSVector_boolPtr(CDSVector_bool)
    
Method resolution order:
CDSVector_boolPtr
CDSVector_bool
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from CDSVector_bool:
__add__(*args)
__del__(self, destroy=<built-in function delete_CDSVector_bool>)
__div__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__iadd__(*args)
__idiv__(*args)
__imul__(*args)
__isub__(*args)
__len__(*args)
__mul__(*args)
__neg__(*args)
__pow__(*args)
__repr__(self)
__rmul__(*args)
__setattr__ lambda self, name, value
__setitem__(*args)
__str__(*args)
__sub__(*args)
fromList(s, l)
help(*args)
resize(*args)
scale(*args)
set(*args)

Data and other attributes inherited from CDSVector_bool:
__dict__ = <dictproxy object at 0xee97f8>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSVector_bool' objects>
list of weak references to the object (if defined)

 
class CDSVector_double(__builtin__.object)
     Methods defined here:
__add__(*args)
__del__(self, destroy=<built-in function delete_CDSVector_double>)
__div__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__iadd__(*args)
__idiv__(*args)
__imul__(*args)
__init__(self, *args)
__isub__(*args)
__len__(*args)
__mul__(*args)
__neg__(*args)
__pow__(*args)
__repr__(self)
__rmul__(*args)
__setattr__ lambda self, name, value
__setitem__(*args)
__str__(*args)
__sub__(*args)
fromList(s, l)
help(*args)
resize(*args)
scale(*args)
set(*args)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0xee9980>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSVector_double' objects>
list of weak references to the object (if defined)

 
class CDSVector_doublePtr(CDSVector_double)
    
Method resolution order:
CDSVector_doublePtr
CDSVector_double
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from CDSVector_double:
__add__(*args)
__del__(self, destroy=<built-in function delete_CDSVector_double>)
__div__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__iadd__(*args)
__idiv__(*args)
__imul__(*args)
__isub__(*args)
__len__(*args)
__mul__(*args)
__neg__(*args)
__pow__(*args)
__repr__(self)
__rmul__(*args)
__setattr__ lambda self, name, value
__setitem__(*args)
__str__(*args)
__sub__(*args)
fromList(s, l)
help(*args)
resize(*args)
scale(*args)
set(*args)

Data and other attributes inherited from CDSVector_double:
__dict__ = <dictproxy object at 0xee9868>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSVector_double' objects>
list of weak references to the object (if defined)

 
class CDSVector_int(__builtin__.object)
     Methods defined here:
__add__(*args)
__del__(self, destroy=<built-in function delete_CDSVector_int>)
__div__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__iadd__(*args)
__idiv__(*args)
__imul__(*args)
__init__(self, *args)
__isub__(*args)
__len__(*args)
__mul__(*args)
__neg__(*args)
__pow__(*args)
__repr__(self)
__rmul__(*args)
__setattr__ lambda self, name, value
__setitem__(*args)
__str__(*args)
__sub__(*args)
fromList(s, l)
help(*args)
resize(*args)
scale(*args)
set(*args)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0xee99f0>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSVector_int' objects>
list of weak references to the object (if defined)

 
class CDSVector_intPtr(CDSVector_int)
    
Method resolution order:
CDSVector_intPtr
CDSVector_int
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from CDSVector_int:
__add__(*args)
__del__(self, destroy=<built-in function delete_CDSVector_int>)
__div__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__iadd__(*args)
__idiv__(*args)
__imul__(*args)
__isub__(*args)
__len__(*args)
__mul__(*args)
__neg__(*args)
__pow__(*args)
__repr__(self)
__rmul__(*args)
__setattr__ lambda self, name, value
__setitem__(*args)
__str__(*args)
__sub__(*args)
fromList(s, l)
help(*args)
resize(*args)
scale(*args)
set(*args)

Data and other attributes inherited from CDSVector_int:
__dict__ = <dictproxy object at 0xee97f8>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSVector_int' objects>
list of weak references to the object (if defined)

 
Functions
       
cat(...)
cat3(...)
cat4(...)
dot(...)
help(...)
log(...)
norm(...)
sqrt(...)
sum(...)
vec_norm(...)