Logo Search packages:      
Sourcecode: python-scientific version File versions  Download package

Scientific::Geometry::VectorModule::Vector Class Reference

List of all members.


Detailed Description

Vector in 3D space

Constructor:

- Vector(|x|, |y|, |z|)   (from three coordinates)
- Vector(|coordinates|)   (from any sequence containing three coordinates)

Vectors support the usual arithmetic operations
('v1', 'v2': vectors, 's': scalar): 

-  'v1+v2'           (addition)
-  'v1-v2'           (subtraction)
-  'v1*v2'           (scalar product)
-  's*v1', 'v1*s'    (multiplication with a scalar)
-  'v1/s'            (division by a scalar)

The three coordinates can be extracted by indexing.

Vectors are *immutable*, i.e. their elements cannot be changed.

Vector elements can be any objects on which the standard
arithmetic operations plus the functions sqrt and arccos are defined.

Definition at line 15 of file VectorModule.py.


Public Member Functions

def __add__
def __cmp__
def __copy__
def __div__
def __getitem__
def __getstate__
def __init__
def __len__
def __mul__
def __neg__
def __rdiv__
def __repr__
def __rmul__
def __rsub__
def __setstate__
def __str__
def __sub__
def angle
def asTensor
def cross
def dyadicProduct
def length
def normal
def x
def y
def z

Public Attributes

 array

Static Public Attributes

int is_vector = 1

Static Private Attributes

 __deepcopy__ = __copy__
 __radd__ = __add__

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

Generated by  Doxygen 1.6.0   Back to index