I'm working in a vector space where the inner product is not the usual one and I would need to access directly to the norm induced by inner product. I found how to create such a space but the 'norm' function gives me the usual norm, which is not the one I want.
Here is an example :
What I want to compute is e.g.
I assume this should be possible directly. Any idea how ?
asked Mar 01 '12Bertrand
21 ● 2
You could redefine the
So you can create a subclass, with a new
and write a helper function to take objects from the old class and make ones in the new class:
Here's how you could use it:
Be careful though; unless you do a bit more work, arithmetic with
this is because the addition and multiplication methods are still those of
Shouldn't the induced norm be
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
Also, you might change the
Asked: Mar 01 '12
Seen: 82 times
Last updated: Mar 03 '12
powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.