Package pod :: Module linalg :: Class Vector
[frames] | no frames]

Class Vector

source code

object --+
         |
        Vector
Known Subclasses:


To Do: should somehow be merged with VectorMatrix.

Instance Methods
 
__init__(self, dim)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_length(self) source code
 
set_values(self, *values)
Using specified values to initialize the vector.
source code
 
set_data(self, data)
Using raw data (python list) to initialize the vector.
source code
 
get_component(self, i) source code
 
set_component(self, i, v) source code
 
get_data(self)
Raw data as built-in python list.
source code
 
sub(self, vector) source code
 
add(self, vector) source code
 
scale(self, a) source code
 
product(self, vector) source code
 
norm(self) source code
 
symmetric(self) source code
 
units(self, unit_vector)
How many times the current vector fits in the specified units (in norm).
source code
 
__eq__(self, other) source code
 
__ne__(self, other) source code
 
__repr__(self)
repr(x)
source code
 
__hash__(self)
hash(x)
source code

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self, dim)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

units(self, unit_vector)

source code 

How many times the current vector fits in the specified units (in norm).

The sign has a meaning only if both vectors are colinear.

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)