| 1 | initial version |
Shouldn't the induced norm be sqrt(e0.inner_product(e0))? I would just write a function to do this:
def mynorm(v):
return sqrt(v.inner_product(v))
I've heard that Sage could do more to support working with non-standard inner product matrices. This might be an example of a place that could be improved.
Alternatively, if you wanted to modify the code in devel/sage/sage/modules/free_module_element.py, you could submit a patch. In the norm function, I would check to see if the inner product matrix defines the dot product:
if not self.parent().__inner_product_is_dot_product()
special-case code for inner product matrices
Also, you might change the __abs__ function.
| 2 | No.2 Revision |
Shouldn't the induced norm be sqrt(e0.inner_product(e0))? I would just write a function to do this:
def mynorm(v):
return sqrt(v.inner_product(v))
I've heard that Sage could do more to support working with non-standard inner product matrices. This might be an example of a place that could be improved.
Alternatively, if you wanted to modify the code in devel/sage/sage/modules/free_module_element.py, you could submit a patch. In the norm function, I would check to see if the inner product matrix defines the dot product:
if not self.parent().__inner_product_is_dot_product()
self.parent().__inner_product_is_dot_product():
special-case code for inner product matrices
Also, you might change the __abs__ function.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.