/* this procedure multiplies the exponent vector with addresscpbygen^(-exp),wheregenisapcp-generator
and exp is a positive integer in the range 0 to p */
void invert_generator(int gen, int exp, int cp, struct pcp_vars *pcp)
{ register int *y = y_address;
register int i; register int inverse; register int entry; register int lastg = pcp->lastg; register int cp1 = pcp->submlg; register int p = pcp->p;
#include"access.h"
/* each call to collect involves a string of length 1;
reserve two positions below y[pcp->submlg] for this */
inverse = cp1 - 2;
y[inverse + 1] = 1;
/* set up gen^exp as an exponent vector with base address cp1 */
for (i = 1; i <= lastg; ++i)
y[cp1 + i] = 0;
y[cp1 + gen] = exp;
/* now calculate the inverse, storing the result at cp */
for (i = gen; i <= lastg; ++i) {
entry = y[cp1 + i];
if (entry != 0) {
y[inverse + 2] = PACK2(p - entry, i);
collect(-inverse, cp, pcp);
collect(-inverse, cp1, pcp);
}
}
}
/* calculate the inverse of the string with base address
y[str], using the collected part referenced by cp */
void invert_string(int str, int cp, struct pcp_vars *pcp)
{ register int *y = y_address;
register int length; register int gen, exp; #include"access.h"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.