- # Inner products are real numbers and not algebra
- # elements, so once we turn the algebra element
- # into a vector in inner_product(), we never go
- # back. As a result -- contrary to what we do with
- # self._multiplication_table -- we store the inner
- # product table as a plain old matrix and not as
- # an algebra operator.
- ip_table = matrix.identity(field,n)
- self._inner_product_matrix = ip_table
+ def jordan_product(x,y):
+ return V([ xi*yi for (xi,yi) in zip(x,y) ])
+ def inner_product(x,y):
+ return x.inner_product(y)