#------------------------------------------------------------------------------ # VectorStub.py #------------------------------------------------------------------------------ """ This module provides functions to perform standard vector operations. Vectors are represented as tuples of numbers (floats or ints). Functions that take two vector arguments will raise a ValueError() exception if the two vectors are of different dimensions. """ #------------------------------------------------------------------------------ # import library modules #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # function definitions #------------------------------------------------------------------------------ # add() ----------------------------------------------------------------------- def add(u, v): # end add() ------------------------------------------------------------------- # negate() -------------------------------------------------------------------- def negate(u): # end negate() ---------------------------------------------------------------- # sub() ----------------------------------------------------------------------- def sub(u, v): # end sub() ------------------------------------------------------------------- # scalarMult() ---------------------------------------------------------------- def scalarMult(c, u): # end scalarMult() ------------------------------------------------------------ # hadamard() ------------------------------------------------------------------ def hadamard(u, v): # end hadamard() -------------------------------------------------------------- # dot() ----------------------------------------------------------------------- def dot(u, v): # end dot() ------------------------------------------------------------------- # length() -------------------------------------------------------------------- def length(u): # end length() ---------------------------------------------------------------- # dim() ----------------------------------------------------------------------- def dim(u): # end dim() ------------------------------------------------------------------- # unit() ---------------------------------------------------------------------- def unit(v): # end unit() ------------------------------------------------------------------ # angle() --------------------------------------------------------------------- def angle(u, v): # end angle() ----------------------------------------------------------------- # randVector() ---------------------------------------------------------------- def randVector(n, a, b): # end randomVector() ----------------------------------------------------------