1 #include "def.h"
2 #include "macro.h"
3 
plet_elmsym_schur(a,b,c)4 INT plet_elmsym_schur(a,b,c) OP a,b,c;
5 /* AK 051201 */
6 {
7     INT erg = OK;
8 #ifdef PLETTRUE
9     INT t=0; /* is 1 if transfer HASHTABLE->SCHUR necessary */
10     CTTTTO(HASHTABLE,INTEGER,PARTITION,ELMSYM,"plet_elmsym_schur(1)",a);
11     CTTTO(HASHTABLE,PARTITION,SCHUR,"plet_elmsym_schur(2)",b);
12     CTTTO(EMPTY,HASHTABLE,SCHUR,"plet_elmsym_schur(3)",c);
13 
14     if (S_O_K(c) == EMPTY)
15         { t=1; init_hashtable(c); }
16 
17     pes___(a,b,c,cons_eins);
18     if (t==1) t_HASHTABLE_SCHUR(c,c);
19 #endif
20     ENDR("plet_elmsym_schur");
21 }
pes_ende()22 INT pes_ende()
23 {
24     return OK;
25 }
26 
27 #ifdef PLETTRUE
28 INT m_merge_partition_partition();
29 INT pes_integer_partition_();
30 INT pes_integer_hashtable_();
31 INT pes___();
32 
pes_null__(b,c,f)33 INT pes_null__(b,c,f) OP b,c,f;
34 {
35     INT mxx_null__();
36     return mxx_null__(b,c,f);
37 }
38 
pes_integer_hashtable_(a,b,c,f)39 INT pes_integer_hashtable_(a,b,c,f) OP a,b,c,f;
40 /* AK 061101 */
41 {
42     INT erg = OK;
43 
44     CTO(INTEGER,"pes_integer_hashtable_(1)",a);
45     CTTO(HASHTABLE,SCHUR,"pes_integer_hashtable_(2)",b);
46     CTTO(SCHUR,HASHTABLE,"pes_integer_hashtable_(3)",c);
47     NYI("pes_integer_hashtable_");
48 
49     ENDR("pes_integer_hashtable_");
50 }
51 
52 
pes_integer__(a,b,c,f)53 INT pes_integer__(a,b,c,f) OP a,b,c; OP f;
54 /* AK 051201 */
55 {
56     INT erg = OK;
57 
58     CTO(INTEGER,"pes_integer__(1)",a);
59     CTTTO(HASHTABLE,PARTITION,SCHUR,"pes_integer__(2)",b);
60     CTTO(HASHTABLE,SCHUR,"pes_integer__(3)",c);
61 
62     if (S_O_K(b) == PARTITION)
63         erg += pes_integer_partition_(a,b,c,f);
64     else if (S_O_K(b) == SCHUR)
65         {
66         INT mss_hashtable_hashtable_();
67         INT p_schursum();
68         if (S_S_N(b) == NULL)
69             erg += pes_integer_partition_(a,S_S_S(b),c,f);
70         else
71             erg += p_schursum(a,b,c,f,NULL,pes_integer__,mss_hashtable_hashtable_);
72         }
73     else
74         {
75         erg += pes_integer_hashtable_(a,b,c,f);
76         }
77 
78 
79 
80     ENDR("pes_integer__");
81 }
82 
83 INT mpp_hashtable_hashtable_();
84 INT pes_null_partition_();
pes_partition__(a,b,c,f)85 INT pes_partition__(a,b,c,f) OP a,b,c; OP f;
86 {
87     INT erg = OK;
88     CTO(PARTITION,"pes_partition__(1)",a);
89     CTTTO(HASHTABLE,SCHUR,PARTITION,"pes_partition__(2)",b);
90     CTTO(HASHTABLE,SCHUR,"pes_partition__(3)",c);
91 
92     if (S_PA_LI(a) == 0) {
93         erg += pes_null_partition_(b,c,f);
94         goto ende;
95         }
96     else if (S_PA_LI(a) == 1) {
97         erg += pes_integer__(S_PA_I(a,0),b,c,f);
98         goto ende;
99         }
100     else{
101         INT mss_hashtable_hashtable_();
102         INT p_splitpart();
103         erg += p_splitpart(a,b,c,f,pes_partition__,
104                                    mss_hashtable_hashtable_);
105         goto ende;
106         }
107 
108 ende:
109     ENDR("pes_partition__");
110 }
111 
112 
113 
pes_elmsym__(a,b,c,f)114 INT pes_elmsym__(a,b,c,f) OP a,b,c,f;
115 /* AK 051201 */
116 /* c += p_a [p_b]  \times f */
117 {
118     INT erg = OK;
119     CTO(ELMSYM,"pes_elmsym__(1)",a);
120     CTTTO(HASHTABLE,PARTITION,SCHUR,"pes_elmsym__(2)",b);
121     CTTO(HASHTABLE,SCHUR,"pes_elmsym__(3)",c);
122     M_FORALL_MONOMIALS_IN_A(a,b,c,f,pes_partition__);
123     ENDR("pes_elmsym__");
124 }
125 
pes_hashtable__(a,b,c,f)126 INT pes_hashtable__(a,b,c,f) OP a,b,c,f;
127 /* AK 051201 */
128 /* c += p_a [p_b]  \times f */
129 {
130     INT erg = OK;
131     CTO(HASHTABLE,"pes_hashtable__(1)",a);
132     CTTTO(HASHTABLE,PARTITION,SCHUR,"pes_hashtable__(2)",b);
133     CTTO(HASHTABLE,SCHUR,"pes_hashtable__(3)",c);
134     M_FORALL_MONOMIALS_IN_A(a,b,c,f,pes_partition__);
135     ENDR("pes_hashtable__");
136 }
137 
138 
pes_null_partition_(b,c,f)139 INT pes_null_partition_(b,c,f) OP b,c,f;
140 /* AK 061201 */
141 {
142     INT erg = OK;
143     CTO(PARTITION,"pes_null_partition(1)",b);
144     CTTO(SCHUR,HASHTABLE,"pes_null_partition(2)",c);
145     _NULL_PARTITION_(b,c,f);
146     ENDR("pes_null_partition");
147 }
148 
pes_integer_partition_(a,b,c,f)149 INT pes_integer_partition_(a,b,c,f) OP a,b,c,f;
150 /* AK 051201 */
151 {
152     INT erg = OK;
153     INT cc_plet_pes_integer_partition();
154 
155     CTO(INTEGER,"pes_integer_partition_(1)",a);
156     CTO(PARTITION,"pes_integer_partition_(2)",b);
157     CTTO(SCHUR,HASHTABLE,"pes_integer_partition_(3)",c);
158     SYMCHECK ((S_I_I(a) < 0),"pes_integer_partition_:integer<0");
159 
160     if (S_I_I(a) == 0) {
161         erg += pes_null_partition_(b,c,f);
162         goto ende;
163         }
164 
165     erg += cc_plet_pes_integer_partition(a,b,c,f);
166 
167 ende:
168     ENDR("pes_integer_partition_");
169 }
170 
171 
172 
pes___(a,b,c,f)173 INT pes___(a,b,c,f) OP a,b,c,f;
174 {
175     INT erg = OK;
176     CTTTTO(HASHTABLE,INTEGER,PARTITION,ELMSYM,"pes___(1)",a);
177     CTTTO(HASHTABLE,PARTITION,SCHUR,"pes___(2)",b);
178     CTTO(HASHTABLE,SCHUR,"pes___(3)",c);
179     if (S_O_K(a) == INTEGER)
180         {
181         erg += pes_integer__(a,b,c,f);
182         }
183     else if (S_O_K(a) == PARTITION)
184         {
185         erg += pes_partition__(a,b,c,f);
186         }
187     else if (S_O_K(a) == ELMSYM)
188         {
189         erg += pes_elmsym__(a,b,c,f);
190         }
191     else /* if (S_O_K(a) == HASHTABLE) */
192         {
193         erg += pes_hashtable__(a,b,c,f);
194         }
195 
196     ENDR("pes___");
197 }
198 #endif /* PLETTRUE */
199