Macaulay2 Engine
Loading...
Searching...
No Matches

◆ initialize1()

void WeylAlgebra::initialize1 ( )
private

Definition at line 175 of file weylalg.cpp.

176{
177 if (binomtable == nullptr)
178 {
179 int i, j;
180
181 binomtable = newarray(int *, binomtop + 1);
182 for (i = 0; i <= binomtop; i++)
183 binomtable[i] = newarray_atomic(int, i + 1);
184 binomtable[0][0] = 1;
185 binomtable[1][0] = 1;
186 binomtable[1][1] = 1;
187 for (i = 2; i <= binomtop; i++)
188 {
189 binomtable[i][0] = 1;
190 binomtable[i][i] = 1;
191 for (j = 1; j < i; j++)
192 binomtable[i][j] = binomtable[i - 1][j - 1] + binomtable[i - 1][j];
193 }
194
196 for (i = 0; i <= diffcoeffstop; i++)
197 diffcoeffstable[i] = newarray_atomic(int, i + 1);
198 diffcoeffstable[0][0] = 1;
199 diffcoeffstable[1][0] = 1;
200 diffcoeffstable[1][1] = 1;
201 for (i = 2; i <= diffcoeffstop; i++)
202 {
203 diffcoeffstable[i][0] = 1;
204 for (j = 1; j <= i; j++)
205 diffcoeffstable[i][j] = i * diffcoeffstable[i - 1][j - 1];
206 }
207#if 0
208// // Display the binomial tables:
209// cout << "---binom table---" << endl;
210// for (i=0; i<=binomtop; i++)
211// {
212// for (j=0; j<=i; j++)
213// cout << " " << binomtable[i][j];
214// cout << endl;
215// }
216// cout << "---diff table---" << endl;
217// for (i=0; i<=diffcoeffstop; i++)
218// {
219// for (j=0; j<=i; j++)
220// cout << " " << diffcoeffstable[i][j];
221// cout << endl;
222// }
223#endif
224 }
225}
static int diffcoeffstop
Definition weylalg.hpp:70
static int binomtop
Definition weylalg.hpp:69
static int ** binomtable
Definition weylalg.hpp:71
static int ** diffcoeffstable
Definition weylalg.hpp:72
#define newarray(T, len)
Definition newdelete.hpp:82
#define newarray_atomic(T, len)
Definition newdelete.hpp:91

References binomtable, binomtop, diffcoeffstable, diffcoeffstop, newarray, and newarray_atomic.

Referenced by initialize_weyl().