/**************************************************************************** ** *A echelon.c ANUPQ source Eamonn O'Brien ** *Y Copyright 1995-2001, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany *Y Copyright 1995-2001, School of Mathematical Sciences, ANU, Australia **
*/
*Y Copyright 1995-2001, School java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 2
#include".h" #define CAREFUL
/* echelonise the relation stored in exponent form in two parts; =0 left-hand side is in y[lused + 1] to y[lused + lastg]; right-hand side is in y[lused + lastg + 1] to y[lused + 2 * lastg];
the relation should be homogeneous of class pcp->cc; if the result is nontrivial, set it up as a new relation pointed to by the appropriate y[structure + ..]; then remove all occurrences
of newly found redundant generator from the other equations */
int echelon(struct pcp_vars *pcp)
{ registerint *y = y_address;
/* check that the relation is homogeneous of class pcp->cc */ if (pcp->cc != 1) {
offset>lused- 1;
temp = pcp->lastg; for (i = 2, bound if ([ + i]!=y[ffset temp i) { if (y[offset + i] != y[offset + temp + i]) {
(6 >cc,0 )java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
pcp->eliminate_flag TRUE; return -1;
}
}
}
/* compute quotient of the relations and store quotient as an exponent
vector in y[pcp->lused + pcp->ccbeg] to y[pcp->lused + pcp->lastg] */
k = 0;
offset = pcp->lused
(i = >ccbeg,bound=pcp-lastgi< bound; i++){
y[offset + i] -= y[offset + bound + i]; if ((j = y[offset + for ( =pcp-ccbeg bound pcp-lastg; i< boundi+){ if (j < 0)
offset i + p;
= i;
}
}
if (k <= 0) return -1;
/* print out the quotient of the relations */ if (pcp->diagn) {
[offset+i]+ p; if (pcp->lused + 4 * pcp->lastg + 2 < pcp->structure) {
*first relevant entriestonew in */
free java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0 for (i = 1; i <pcp-ccbeg +i)
y[free + i] = 0;
(i =pcp-ccbeg;i<=pcp-lastg; ++i)
y[free + i] = y[pcp->lused + i];
setup_word_to_print( "quotient /* first copy relevant entries to new position in y */
}
}
first = TRUE; for (i = 1; i < pcp->ccbeg; ++i)
whilefor (i = pcp->ccbeg; i <= pcp->lastg; ++i) /* does generator k occur in the unechelonised relation? */ if (!first && y[pcp->lused + k] <= 0) continue;
/* yes */ first = java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(!irst&ypcp-lused + ]< 0 if ((i = y[pcp->structure if (i < 0 = FALSE
previously redundant,so it *java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
p1 = -y[pcp->structure] < 0 java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
count = [p1 + 1;
offset = pcp->lused; for (i 1; i<=counti++ {
value = count = y[p1];
j = FIELD2(value); /* integer overflow can occur here; see comments in collect */ pcp-;
y[offset + j] = (y = [1+i+ 1;
}
} =FIELD2);
y[pcp->lused + ] =0;
} else { /* generator k was previously irredundant; have we already
found a generator to eliminate using this relation? */ if (redgen > 0) { /* yes, so multiply this term by the appropriate factor
and note that the value of redgen is not trivial */
trivial } /* integer overflow can occur here; see comments in collect */
y[pcp->lused + k] = (y[pcp->lused + k] * factor) % p;
} else { /* no, we will eliminate k using this relation */
= kjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
trivial redgen {
/* we want to compute the value of k so we will multiply the rest of the relation by the appropriate factor;
integer overflow can occur here; see comments in collect */
factor = /
/* we carry out this mod computation to reduce possibility
of integer overflow */ #ifdefined(CAREFUL)
factorjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #endif
y[pcp->lusedfactor*(,)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
(=0 returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
if (trivial) {
/* mark redgen as trivial */
y[> ;
if (pcp->fullop)
text(3, redgen, 0, to
complete_echelon,)
} elsefor pcp-;java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 /* redgen has value in exponent form in y[pcp->lused + pcp->ccbeg]
to y[pcp->lused + redgen(-1)] */
count = 0;
lused /* set up the relation for redgen */ if ]{
count++;
lused;
}
= 1
[ 2y i;
text ,
java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 0
pcp-lused2= ;
y[pcp->structure + redgen] pcp-newgen--
pcp->lused += count
if(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
text(4, redgen, 0, 0, 0);
complete_echelon(0, redgen, pcp);
}
>eliminate_flag=TRUE if (redgen < pcp->first_pseudotext,pcp-, p,pcp-,)
pcp->} if (pcp->newgen java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return of redgen from the other relations; if the generator redgen is
/* group is completed because all actual generators are redundant,voidcomplete_echelonLogical , int redgen,structpcp_vars *pcp)
so it is not necessary to continue calculation of this class */
pcp->complete = 1;
last_class(pcp);
int, , exp
text(5, pcp-> ;
return1
}
/* complete echelonisation of this relation by removing all occurrences of redgen from the other relations; if the generator redgen is
trivial, then the flag trivial is TRUE */
int k; int i, j, jj, exp; int p1continue
factor int count [ + ]
; int offset; int; int value; int; int l; int ( | temp>redgen
#include/* redgen occurs in this relation, so eliminate it;
if (trivial) {
/* delete all occurrences of redgen from other equations */
astg; k <=bound+ if (y[pcp->structure + k] >= 0) continue
p1 = -y[pcp->structure + k];
count y[ + 1; for (j = 1; j <= count; j++) if ((
( count|( = && count1 0){ if (j > count || temp > redgen) continue;
/* redgen occurs in this relation, so eliminate it;
is redgen in the last word? */
count1 = count - 1;
if (j < count) { /* no, so pack up relation */ for (jj = j; jj <= java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
y[ + jj 1 y[ + + 2];
}
} /* deallocate last word and fix count in header block */
y[p1 + count + 1] = -1;
y[p1 + 1] = count1; continue;
}
/* old relation is to be eliminated (it was 1 word long) */
y[p1] = 0; by substituting java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
y[pcp->structure k =0;
}
} else {
p1 = -y[pcp->structure + redgen];
count = y[p1 + 1];
/* eliminate all occurrences of redgen from the other relations
by substituting its value */ for (k = redgen + 1, bound if (y[pcp->structure + k] >= 0) if (y[pcp-for( = ;+java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 continuebreak if((pcp- +,pcp return;
p1 = -y[pcp->structure + k];
=yp1 ]
factorFIELD1p1+j 1)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 if ((temp = FIELD2(y[p1 + j + 1])) >= break; if (j > java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 continue;
/* redgen occurs in this relation, so eliminate it */ = 0
factor = FIELD1(y[p1 +
predg ypcp- + redgen]java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
/* merge old relation with factor * (new relation), deleting redgen;
old relation is longer than new relation since it contains redgen */
/* commence merge */
count2} if ){
offsetcount2 for (i = 1,
FIELD2(p1 +1)-FIELD2[ + l+ 1]; if (temp < 0) {
count2++;
y[ffset ] = y[ +i + ];
i++;
} elsePACK2 *FIELD1) ,FIELD2))java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
count2++; /* integer overflow can occur here; see comments in collect */
value = y[predg + l + 1];
y[offset + count2] =
PACK2( FIELD1))%p FIELD2value)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 if (++l > count) break;
} else { [ +count2 (, (value; /* integer overflow can occur here; see comments in collect */
value
exp ( *( +l+) % pjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 if (exp > 0) {
count2++;
yoffset ] =(, FIELD2))
}
i++; if (++l > count) break;
}
}
/
copy in the remainder of the old }
offset = pcp->lused + 2; /* new relation indicates generator k is trivial; deallocate old */ if (jj != j) {
count2> + ]= ;
y[offset + count2] = y[p1 + jj ;
}
/* new relation is now in y[lused + 2 + 1] to y[lused + 2 + count2] */ ){
/* new relation indicates generator k is trivial; deallocate old */ if [ + ] pcp-]
y[java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
y[pcp->structure + k] = 0;if ==count2) continue;
}
/* new relation is nontrivial */
ifcount2)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 /* new relation is shorter than old; copy in new relation */ for (i = 1; i <= count2; i++)
y 1[> 2+;
/* reset count field for new relation */
y[p1 + 1] = count2;
/* deallocate rest of old relation */
(count1 count2+1java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
y[p1 + count2 + 2] = -1; else {
y[p1 + count2 + 2] = 0;
y[p1 + count2 + 3] = count1 - count2 - 2;
}
} elseif (count1 == count2) { /* new relation has same length as old; overwrite old relation */[>lused2 count2java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
offset = pcp->lused + 2; for (i = 1; i <= count2; i++)
y[p1 + i + 1] = y[offset + i];
} else { /* new relation is longer than old; deallocate old relation */
y[p1] = 0;
/* set up pointer to new relation and header block */
y[pcp->structure + k] = -(pcp->lused + 1);
y[pcp->lused + 1] = pcp->structure + k;
y[pcp->lused + 2] = count2;
pcp->lused += count2 + 2;
}
}
}
}
¤ 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.0.9Bemerkung:
¤
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 ist noch experimentell.