SmtC: Show me the Code
Ole Peter Smith
Instituto de Matemática e Estatística
Universidade Federal de Goiás
http://www.olesmith.com.br

Vectors
E se Eva tinha optado pela cobra?
Facebook.
  • [;\underline{u}, \underline{v}, \underline{w} \in \mathbb{R}^n;]
  • [; u[i]=v[i]+w[i], \quad i \in R(n);]
Python Listing: Vector.2.py.
     #Binary: u=v+w
     def __add__(v,w):        
        u=Vector(v)
        for i in range(len(v)):
            u[i]+=w[i]
        return u

    #Unary: u+=v. Superflous?
    def __iadd__(v,w):
        return v+w
Messages:
0 secs.