Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11273

Re: Symmetrizing function arguments

From W Craig Carter <ccarter@MIT.EDU>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Symmetrizing function arguments
Date 2012-08-08 07:21 +0000
Message-ID <jvt412$m1j$1@smc.vnet.net> (permalink)
References <20120807070126.D06C1662F@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


Hello Hauke,
Perhaps you are looking for the Orderless attribute?

SetAttributes[tet, Orderless]
tet[z,y,x,b,c,a]
tet[6,Pi,-Pi/2,-1,0]


W Craig Carter
Professor of Materials Science, MIT



On Aug 7, , at Tue Aug 7, 12 @3:01 AM, Hauke Reddmann wrote:

> I'd like to define a quasi 6j symbol which has tetrahedron
> symmetry in its 6 arguments. At the moment (I'm a n00b, still :-)
> I use a cheap hack:
> f[a_,b_] := If[a>b,F[a,b],F[b,a]];
> Bingo, f now is commutative and sorts by descending arguments,
> and NOOOOO endless loops. My, am I proud of myself :-)
> Needless to say, using this method to implement the symmetries
> of h[a_,b_,c_,d_,e_,f] is a royal pain in the backside, as you
> see with the hassle needed already for just 3 arguments...
> g[a_,b_,c_]:=If[b>c,If[a>c,If[a>b,G[a,b,c],g[b,a,c]],g[c,b,a]],g[a,c,b]];
> ...especially considering all the subcases needed when two arguments 
> are equal. 
> Surely, you can offer a more elegant way? It more or less suffices to 
> bring the largest value to position 1 and the second-largest to 2 or 3
> (assume a,b and c,d and e,f are the opponent edges of the tetrahedron),
> but optimal would be if none of the 24 tetrahedron operations gives
> a smaller lexicalic ordering even in the case of equal entries.
> 
> P.S. No, the inbuilt 6j symbol is useless - wrong Lie group :-)
> 
> -- 
> Hauke Reddmann <:-EX8    fc3a501@uni-hamburg.de
> Out on deck the dawn arrived
> Your grey sweater oversized
> The rooftops glimmered before our eyes
> 

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Symmetrizing function arguments W Craig Carter <ccarter@MIT.EDU> - 2012-08-08 07:21 +0000

csiph-web