| cdsVector |
index |
Numerical vector classes
CDSVectors are container objects which behave 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[, initializer])
where the vector size and an optional initializer value are 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.
Short name: RVec
CDSVector_Vec3
vector of vec3.Vec3 objects.
CDSVector_int
vector of integer values.
Short name: IVec
CDSVector_DComplex
vector of complex values.
Short name: CVec
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.
min(vec) - return the smallest element of the vector.
max(vec) - return the largest element of the vector.
miscellaneous members
fromList(obj) - read a compatible Python object into the CDSVector.
toList() - convert to a Python list object.
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.
# 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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions | ||
| ||
| Data | ||
| __CDSVector_hh__ = 1 | ||