class documentation

class Vector:

View In Hierarchy

Represent a vector in a multidimensional space.

Method __add__ Return sum of two vectors.
Method __eq__ Return True if vector has same coordinates as other.
Method __getitem__ Return jth coordinate of vector.
Method __init__ Undocumented
Method __le__ Compare vectors based on lexicographical order.
Method __len__ Return the dimension of the vector.
Method __lt__ Compare vectors based on lexicographical order.
Method __ne__ Return True if vector differs from other.
Method __neg__ Return copy of vector with all coordinates negated.
Method __setitem__ Set jth coordinate of vector to given value.
Method __str__ Produce string representation of vector.
Instance Variable _coords Undocumented
def __add__(self, other):

Return sum of two vectors.

def __eq__(self, other):

Return True if vector has same coordinates as other.

def __getitem__(self, j):

Return jth coordinate of vector.

def __init__(self, d):

Undocumented

def __le__(self, other):

Compare vectors based on lexicographical order.

def __len__(self):

Return the dimension of the vector.

def __lt__(self, other):

Compare vectors based on lexicographical order.

def __ne__(self, other):

Return True if vector differs from other.

def __neg__(self):

Return copy of vector with all coordinates negated.

def __setitem__(self, j, val):

Set jth coordinate of vector to given value.

def __str__(self):

Produce string representation of vector.

_coords =

Undocumented