diff --git a/permutation.cc b/permutation.cc index f7b537c..60d93f5 100644 --- a/permutation.cc +++ b/permutation.cc @@ -746,7 +746,7 @@ PERM_RANK_TYPE r=factorial(n); for(int i=1; i<=n; ++i) { T m=(*this)[i]; - if(i>1 && m>0) r/=ipow(i,m); + if(i>1 && m>0) r/=longpow(i,m); if(m>1) r/=factorial(m); } return r; @@ -770,6 +770,33 @@ return factorial(n)/prod; } +/*hammermesh eq 10-25, highest weight == generalized partition of r into n parts*/ +template +PERM_RANK_TYPE Partition::Un_irrep_dim(const int n) const +{ +#ifdef DEBUG +if(!this->is_valid()) laerror("operation with an invalid partition"); +#endif +std::cout<<"TEST "<n) return 0; //too antisymmetric partition +int i,j; +double prod; +int r=this->size(); +NRVec_from1 p(n); +for(i=1;i<=n;i++) p[i]= (i<=r?(*this)[i]:0)+n-i; +std::cout<<"TEST "<=2;j--) + { + for(i=1;i Partition Partition::adjoint() const { @@ -802,7 +829,7 @@ this->clear(); for(int i=1; i<=nparts; ++i) (*this)[i]=x[i].size(); } -PERM_RANK_TYPE ipow(PERM_RANK_TYPE x, int i) +PERM_RANK_TYPE longpow(PERM_RANK_TYPE x, int i) { if(i<0) return 0; PERM_RANK_TYPE y=1; diff --git a/permutation.h b/permutation.h index 86196fd..968e4b0 100644 --- a/permutation.h +++ b/permutation.h @@ -65,7 +65,7 @@ public: }; extern PERM_RANK_TYPE factorial(const int n); -extern PERM_RANK_TYPE ipow(PERM_RANK_TYPE x, int i); +extern PERM_RANK_TYPE longpow(PERM_RANK_TYPE x, int i); //permutations represented in the cycle format template @@ -156,6 +156,7 @@ public: explicit Partition(const YoungTableaux &x); //extract a partition as a shape of Young tableaux Partition adjoint() const; //also called conjugate partition PERM_RANK_TYPE Sn_irrep_dim() const; + PERM_RANK_TYPE Un_irrep_dim(const int n) const; PERM_RANK_TYPE generate_all(void (*callback)(const Partition&), int nparts=0); //nparts <0 means at most to -nparts @@ -172,7 +173,6 @@ public: int nrows() const {return this->size();} int ncols() const {return (*this)[1].size();} bool is_standard() const; //is it filled in standard way (possibly with repeated numbers) - //@@@???void clear(); //clear the numbers but keep shape (different than inherited clear()) int sum() const; //get back sum of the partition NRVec_from1 yamanouchi() const; //@@@yamanouchi symbol //@@@ ??>young operator as a linear comb of permutations - maybe a class for itself, i.e. element of the Sn group algebra? or maybe as a vector with index being the rank of the permutation(n! length) or as a sparsemat thereof or maybe a list??? @@ -188,7 +188,6 @@ extern PERM_RANK_TYPE partitions(int n, int k= -1); //enumerate partitions to k //@@@Sn character table computation from young - young frame filling - routine for one character of one irrep and another for generation of the whole group table (maybe class for a group table too) // -//@@@@Un irrep dimensions from gelfand }//namespace #endif diff --git a/t.cc b/t.cc index e50cc28..b209761 100644 --- a/t.cc +++ b/t.cc @@ -68,16 +68,24 @@ for(int i=0; i<4; ++i) } } +static int unitary_n; +static PERM_RANK_TYPE space_dim; + void pprintme(const Partition &p) { CompressedPartition pc(p); cout<<'['< q=p.adjoint(); -cout<<"IR dim "< y(p); for(int i=1; i<=y.nrows(); ++i) @@ -89,6 +97,7 @@ YoungTableaux yy(y); yy.clear(); cout<>n; +cin >>n >>unitary_n; Partition p(n); +space_dim=0; int tot=p.generate_all(pprintme,0); cout <<"generated "<