MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Symmetrizing function arguments

  • To: mathgroup at
  • Subject: [mg127619] Re: Symmetrizing function arguments
  • From: "Dave Snead" <dsnead6 at>
  • Date: Wed, 8 Aug 2012 03:14:24 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <>

This will order the arguments, largest first:
g[x__] := G @@ Reverse@Sort@List@x

So, for example,  the input 
g[1, 3, 2]
gives the output
G[3, 2, 1]

Dave Snead

-----Original Message----- 
From: Hauke Reddmann 
Sent: Tuesday, August 07, 2012 12:01 AM 
To: mathgroup at 
Subject: [mg127619] Symmetrizing function arguments 

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...
...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 at
Out on deck the dawn arrived
Your grey sweater oversized
The rooftops glimmered before our eyes

  • Prev by Date: Re: Symmetrizing function arguments
  • Next by Date: Re: Symmetrizing function arguments
  • Previous by thread: Re: Symmetrizing function arguments
  • Next by thread: Re: Symmetrizing function arguments