MCPcopy Create free account
hub / github.com/Singular/Singular / initPT

Function initPT

factory/cf_binom.cc:33–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void
34initPT ( )
35{
36 STATIC_VAR bool initialized = false;
37
38 if ( ! initialized ) {
39 initialized = true;
40 ptZ = new CFArray[MAXPT+1];
41 ptF = new CFArray[MAXPT+1];
42 int i, j;
43 ptZ[0] = CFArray(1); ptZ[0][0] = 1;
44 ptF[0] = CFArray(1);
45 for ( i = 1; i <= INITPT; i++ ) {
46 ptF[i] = CFArray(i+1);
47 ptZ[i] = CFArray(i+1);
48 (ptZ[i])[0] = 1;
49 for ( j = 1; j < i; j++ )
50 (ptZ[i])[j] = (ptZ[i-1])[j-1] + (ptZ[i-1])[j];
51 (ptZ[i])[i] = 1;
52 }
53 for ( i = INITPT+1; i <= MAXPT; i++ ) {
54 ptF[i] = CFArray(i+1);
55 ptZ[i] = CFArray(i+1);
56 }
57 ptZmax = INITPT;
58 ptFmax = 0;
59 }
60}
61
62CanonicalForm
63binomialpower ( const Variable & x, const CanonicalForm & a, int n )

Callers 1

siInitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected