From 5980b3f74e7a4db6a4899bead82fd8103c4fd4a0 Mon Sep 17 00:00:00 2001 From: Jiri Pittner Date: Mon, 10 Nov 2025 14:55:48 +0100 Subject: [PATCH] permutation.h symmetrizer and antisymmetrizer --- permutation.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/permutation.h b/permutation.h index 3d0fd30..4ae2916 100644 --- a/permutation.h +++ b/permutation.h @@ -338,6 +338,29 @@ public: }; +//not extremely efficient but compactly represented via young operators +template +PermutationAlgebra symmetrizer(int n) +{ +Partition p(n); +p[1]=n; for(int i=2; i<=n;++i) p[i]=0; +YoungTableaux y(p); +for(int i=1; i<=n; ++i) y[1][i]=i; +return y.young_operator(); +} + +template +PermutationAlgebra antisymmetrizer(int n) +{ +Partition p(n); +for(int i=1; i<=n;++i) p[i]=1; +YoungTableaux y(p); +for(int i=1; i<=n; ++i) y[i][1]=i; +return y.young_operator(); +} + + + template std::ostream & operator<<(std::ostream &s, const YoungTableaux &x);