back to list

Coding conjugation

🔗Gene Ward Smith <gwsmith@svpal.org>

1/7/2006 4:48:25 PM

Now that Herman has given us the slick wedge product code, what's the
optimum way to do conjugation on the result?

🔗Gene Ward Smith <gwsmith@svpal.org>

1/8/2006 12:47:57 AM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:
>
> Now that Herman has given us the slick wedge product code, what's the
> optimum way to do conjugation on the result?

In Maple I find I can do the general case easily enough by loading the
"group" library and using the function "parity" for the parity of a
permutation.

🔗Graham Breed <gbreed@gmail.com>

1/8/2006 3:54:04 AM

Gene Ward Smith wrote:

> In Maple I find I can do the general case easily enough by loading the
> "group" library and using the function "parity" for the parity of a
> permutation. Here's some Python code, which may not make much sense plucked out of its home environment, but it's based on the standard parity algorithm.

def equivalentValue(base, value):
for i in range(len(base)-1):
for j in range(i+1, len(base)):
if base[j]<base[i]:
value = -value
return value

Graham