static void MakeFieldInfo8Bit(UInt q)
{
FF gfq; // the field
UInt p; // characteristic
UInt d; // degree
UInt i, j, k, l; // loop variables
UInt e; // number of elements per byte
UInt pows[7]; // table of powers of q for packing and unpacking bytes
Obj info; // The table being constructed
FFV mult; // multiplier for scalar product
FFV prod; // used in scalar product
UInt val; // used to build up some answers
UInt val0;
UInt elt, el1, el2; // used to build up some answers
const FFV * succ;
p = (UInt)PbyQ[q];
d = (UInt)DbyQ[q];
gfq = FiniteField(p, d);
e = 0; for (i = 1; i <= 256; i *= q)
pows[e++] = i;
pows[e] = i; // simplifies things to have one more
e--;
GAP_ASSERT(e <= 5);
info = NewWordSizedBag(T_DATOBJ, sizeof(struct FieldInfo8Bit));
SetTypeDatObj(info, TYPE_FIELDINFO_8BIT);
succ = SUCC_FF(gfq);
// from here to the end, no garbage collections should happen
FieldInfo8BitPtr fi = FIELDINFO_8BIT(info); fi->q = q; fi->p = p; fi->d = d; fi->e = e;
// conversion tables FFV to/from our numbering
// we assume that 0 and 1 are always the zero and one
// of the field. In char 2, we assume that xor corresponds
// to addition, otherwise, the order doesn't matter
UInt1 * convtab = fi->FELT_FFE; if (p != 2) for (i = 0; i < q; i++)
convtab[i] = (UInt1)i; else for (i = 0; i < q; i++)
convtab[i] = Char2Lookup[d][i];
// simply invert the permutation to get the other one for (i = 0; i < q; i++) {
j = convtab[i]; fi->FFE_FELT[j] = NEW_FFE(gfq, i);
}
// Now we need to store the position in Elements(GF(q)) of each field
// element for the sake of NumberFFVector
//
// The rules for < between finite field elements make this a bit
// complex for non-prime fields
// deal with zero and one fi->GAPSEQ[0] = INTOBJ_INT(0); fi->GAPSEQ[fi->FELT_FFE[1]] = INTOBJ_INT(1);
if (q != 2) { if (d == 1) for (i = 2; i < q; i++) fi->GAPSEQ[i] = INTOBJ_INT(i); else {
// run through subfields, filling in entry forall the new
// elements of each field in turn
UInt q1 = 1;
UInt pos = 2; for (i = 1; i <= d; i++) {
q1 *= p; if (d % i == 0) { for (j = 2; j < q1; j++) {
UInt place = fi->FELT_FFE[1 + (j - 1) * (q - 1) / (q1 - 1)]; if (fi->GAPSEQ[place] == 0) { fi->GAPSEQ[place] = INTOBJ_INT(pos);
pos++;
}
}
}
}
}
}
// entry setting table SETELT...[(i*e+j)*256 +k] is the result
// of overwriting the jth element with i in the byte k for (i = 0; i < q; i++) for (j = 0; j < e; j++) {
Int iej_cache = (i * e + j) * 256; for (k = 0; k < 256; k++) fi->SETELT[iej_cache + k] =
(UInt1)((k / pows[j + 1]) * pows[j + 1] + i * pows[j] +
(k % pows[j]));
}
// entry access GETELT...[i*256+j] recovers the ith entry from the
// byte j for (i = 0; i < e; i++) for (j = 0; j < 256; j++) fi->GETELT[i * 256 + j] = (UInt1)(j / pows[i]) % q;
// scalar * vector multiply SCALAR...[i*256+j] is the scalar
// product of the byte j with the felt i for (i = 0; i < q; i++) {
mult = VAL_FFE(FFE_FELT_FIELDINFO_8BIT(info, i)); for (j = 0; j < 256; j++) {
val = 0; for (k = 0; k < e; k++) {
elt = VAL_FFE(
FFE_FELT_FIELDINFO_8BIT(info, fi->GETELT[k * 256 + j]));
prod = PROD_FFV(elt, mult, succ);
val += pows[k] * FELT_FFE_FIELDINFO_8BIT(info)[prod];
} fi->SCALAR[i * 256 + j] = val;
}
}
// inner product INNER...[i+256*j] is a byte whose LS entry is the
// contribution to the inner product of bytes i and j for (i = 0; i < 256; i++) for (j = i; j < 256; j++) {
val = 0; for (k = 0; k < e; k++) {
el1 = VAL_FFE(
FFE_FELT_FIELDINFO_8BIT(info, fi->GETELT[k * 256 + i]));
el2 = VAL_FFE(
FFE_FELT_FIELDINFO_8BIT(info, fi->GETELT[k * 256 + j]));
elt = PROD_FFV(el1, el2, succ);
val = SUM_FFV(val, elt, succ);
}
val = fi->SETELT[256 * e * FELT_FFE_FIELDINFO_8BIT(info)[val]]; fi->INNER[i + 256 * j] = val; fi->INNER[j + 256 * i] = val;
}
// PMULL and PMULU are the lower and upper bytes of the product
// of single-byte polynomials for (i = 0; i < 256; i++) for (j = i; j < 256; j++) {
val0 = 0; for (k = 0; k < e; k++) {
val = 0; for (l = 0; l <= k; l++) {
el1 = VAL_FFE(FFE_FELT_FIELDINFO_8BIT(
info, fi->GETELT[l * 256 + i]));
el2 = VAL_FFE(FFE_FELT_FIELDINFO_8BIT(
info, fi->GETELT[(k - l) * 256 + j]));
elt = PROD_FFV(el1, el2, succ);
val = SUM_FFV(val, elt, succ);
}
val0 += pows[k] * FELT_FFE_FIELDINFO_8BIT(info)[val];
} fi->PMULL[i + 256 * j] = val0; fi->PMULL[j + 256 * i] = val0;
// if there is just one entry per byte then we don't need the
// upper half if (ELS_BYTE_FIELDINFO_8BIT(info) > 1) {
val0 = 0; for (k = e; k < 2 * e - 1; k++) {
val = 0; for (l = k - e + 1; l < e; l++) {
el1 = VAL_FFE(FFE_FELT_FIELDINFO_8BIT(
info, fi->GETELT[l * 256 + i]));
el2 = VAL_FFE(FFE_FELT_FIELDINFO_8BIT(
info, fi->GETELT[(k - l) * 256 + j]));
elt = PROD_FFV(el1, el2, succ);
val = SUM_FFV(val, elt, succ);
}
val0 += pows[k - e] * FELT_FFE_FIELDINFO_8BIT(info)[val];
} fi->PMULU[i + 256 * j] = val0; fi->PMULU[j + 256 * i] = val0;
}
}
// In odd characteristic, we need the addition table
// ADD...[i*256+j] is the vector sum of bytes i and j if (p != 2) { for (i = 0; i < 256; i++) for (j = i; j < 256; j++) {
val = 0; for (k = 0; k < e; k++) {
el1 = VAL_FFE(FFE_FELT_FIELDINFO_8BIT(
info, fi->GETELT[k * 256 + i]));
el2 = VAL_FFE(FFE_FELT_FIELDINFO_8BIT(
info, fi->GETELT[k * 256 + j]));
val += pows[k] * FELT_FFE_FIELDINFO_8BIT(
info)[SUM_FFV(el1, el2, succ)];
} fi->ADD[i + 256 * j] = val; fi->ADD[j + 256 * i] = val;
}
}
#ifdef HPCGAP
MakeBagReadOnly(info); #endif
// remember the result #ifdef HPCGAP
ATOMIC_SET_ELM_PLIST_ONCE(FieldInfo8Bit, q, info); #else
SET_ELM_PLIST(FieldInfo8Bit, q, info); #endif
CHANGED_BAG(FieldInfo8Bit);
}
Obj GetFieldInfo8Bit(UInt q)
{
Obj info;
GAP_ASSERT(2 < q && q <= 256); #ifdef HPCGAP
info = ATOMIC_ELM_PLIST(FieldInfo8Bit, q); if (info == 0) {
MakeFieldInfo8Bit(q);
info = ATOMIC_ELM_PLIST(FieldInfo8Bit, q);
} #else
info = ELM_PLIST(FieldInfo8Bit, q); if (info == 0) {
MakeFieldInfo8Bit(q);
info = ELM_PLIST(FieldInfo8Bit, q);
} #endif
return info;
}
/****************************************************************************
**
*F RewriteVec8Bit( <vec>, <q> ) . . . . . . . . . . rewrite <vec> over GF(q)
**
** <vec> should be an 8 bit vector over a smaller field of the same
** characteristic
*/
if (q < q1) {
ErrorMayQuit("Cannot convert a vector compressed over GF(%d) to " "small field GF(%d)",
q1, q);
}
if (((q - 1) % (q1 - 1)) != 0) {
ErrorMayQuit( "Cannot convert a vector compressed over GF(%d) to GF(%d)", q1,
q);
}
if (DoFilter(IsLockedRepresentationVector, vec) == True) {
ErrorMayQuit("Cannot convert a locked vector compressed over " "GF(%d) to GF(%d)",
q1, q);
}
// extract the required info
len = LEN_VEC8BIT(vec);
info = GetFieldInfo8Bit(q);
info1 = GetFieldInfo8Bit(q1);
GAP_ASSERT(P_FIELDINFO_8BIT(info) == P_FIELDINFO_8BIT(info1));
GAP_ASSERT(!(D_FIELDINFO_8BIT(info) % D_FIELDINFO_8BIT(info1)));
els = ELS_BYTE_FIELDINFO_8BIT(info);
els1 = ELS_BYTE_FIELDINFO_8BIT(info1);
if (len == 0) {
SET_FIELD_VEC8BIT(vec, q);
return;
}
// enlarge the bag
ResizeWordSizedBag(vec, SIZE_VEC8BIT(len, els));
mult = (q - 1) / (q1 - 1); while (i >= 0) {
val = VAL_FFE(convtab1[gettab1[byte1 + 256 * (i % els1)]]); if (val != 0)
val = 1 + (val - 1) * mult;
byte = settab[byte + 256 * (i % els + els * convtab[val])]; if (0 == i % els) {
*ptr-- = byte;
byte = 0;
} if (0 == i % els1)
byte1 = *--ptr1;
i--;
}
SET_FIELD_VEC8BIT(vec, q);
}
/****************************************************************************
**
*F RewriteGF2Vec( <vec>, <q> ) . . . . . . . . . . rewrite <vec> over GF(q)
**
** <vec> should be a GF2 vector and q a larger power of 2
**
** This function uses the interface in vecgf2.h
*/
if (DoFilter(IsLockedRepresentationVector, vec) == True) {
ErrorMayQuit("Cannot convert a locked vector compressed over " "GF(2) to GF(%d)",
q, 0);
}
// extract the required info
len = LEN_GF2VEC(vec);
info = GetFieldInfo8Bit(q);
els = ELS_BYTE_FIELDINFO_8BIT(info);
// enlarge the bag
ResizeWordSizedBag(vec, SIZE_VEC8BIT(len, els));
settab = SETELT_FIELDINFO_8BIT(info);
convtab = FELT_FFE_FIELDINFO_8BIT(info);
zero = convtab[0];
one = convtab[1];
ptr1 = CONST_BLOCKS_GF2VEC(vec) + NUMBER_BLOCKS_GF2VEC(vec) - 1;
block = *ptr1;
ptr = BYTES_VEC8BIT(vec) + (len - 1) / els;
byte = 0;
i = len - 1;
while (i >= 0) {
byte = settab[byte + 256 * (i % els + els * ((block & MASK_POS_GF2VEC(i + 1))
? one
: zero))]; if (0 == i % els) {
*ptr-- = byte;
byte = 0;
} if (0 == i % BIPEB)
block = *--ptr1;
i--;
}
SET_FIELD_VEC8BIT(vec, q);
SET_LEN_VEC8BIT(vec, len);
type = TypeVec8Bit(q, mut);
SET_TYPE_POSOBJ(vec, type);
}
/****************************************************************************
**
*F ConvVec8Bit( <list>, <q> ) . . . convert a list into 8bit vector object
*/
static void ConvVec8Bit(Obj list, UInt q)
{
Int len; // logical length of the vector
Int i; // loop variable
UInt p; // char
UInt d; // degree
FF f; // field
Obj info; // field info object
UInt elts; // elements per byte
const UInt1 * settab; // element setting table
const UInt1 * convtab; // FFE -> FELT conversion table
Obj firstthree[3]; // the first three entries may get clobbered my the
// early bytes
UInt e; // loop variable
UInt1 byte; // byte under construction
UInt1 * ptr; // place to put byte
Obj elt;
UInt val;
UInt nsize;
Obj type;
if (q > 256)
ErrorQuit("Field size %d is too much for 8 bits", q, 0); if (q == 2)
ErrorQuit("GF2 has its own representation", 0, 0);
// already in the correct representation if (IS_VEC8BIT_REP(list)) {
UInt q1 = FIELD_VEC8BIT(list); if (q1 == q)
return; elseif (q1 < q && ((q - 1) % (q1 - 1)) == 0) {
RewriteVec8Bit(list, q);
return;
}
// remaining case is list is written over too large a field
// pass through to the generic code
} elseif (IS_GF2VEC_REP(list)) {
RewriteGF2Vec(list, q);
return;
}
len = LEN_LIST(list);
// OK, so now we know which field we want, set up data
info = GetFieldInfo8Bit(q);
p = P_FIELDINFO_8BIT(info);
d = D_FIELDINFO_8BIT(info);
f = FiniteField(p, d);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
// We may need to resize first, as small lists get BIGGER
// in this process
nsize = SIZE_VEC8BIT(len, elts); if (nsize > SIZE_OBJ(list))
ResizeWordSizedBag(list, nsize);
// writing the first byte may clobber the third list entry // before we have read it, so we take a copy
firstthree[0] = ELM0_LIST(list, 1);
firstthree[1] = ELM0_LIST(list, 2);
firstthree[2] = ELM0_LIST(list, 3);
// main loop -- e is the element within byte
e = 0;
byte = 0;
ptr = BYTES_VEC8BIT(list); for (i = 1; i <= len; i++) {
elt = (i <= 3) ? firstthree[i - 1] : ELM_LIST(list, i);
GAP_ASSERT(CHAR_FF(FLD_FFE(elt)) == p);
GAP_ASSERT(d % DegreeFFE(elt) == 0);
val = VAL_FFE(elt); if (val != 0 && FLD_FFE(elt) != f) {
val = 1 + (val - 1) * (q - 1) / (SIZE_FF(FLD_FFE(elt)) - 1);
} // Must get these afresh after every list access, just in case this is // a virtual list whose accesses might cause a garbage collection
settab = SETELT_FIELDINFO_8BIT(info);
_FE_FIELDINFO_8BITinfo);
byte = settab[(e + elts * convtab[val]) * 256 + byte]; if (++e == elts || i == len) {
*ptr++ = byte;
byte = 0;
e = 0;
}
}
// it can happen that the few bytes after the end of the data are // not zero, because they had data in them in the old version of the list // In most cases this doesn't matter, but in characteristic 2, we must // clear up to the end of the word, so that AddCoeffs behaves correctly. // // SL -- lets do this in all characteristics, it can never hurt
while(ist) UInt)
*ptr++ = 0;
// retype and resize bag if (nsize != SIZE_OBJ(list))
ResizeWordSizedBag(list, nsize);
SET_LEN_VEC8BIT(list, len);
SET_FIELD_VEC8BITlist q);
ude finfield.
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 21
RetypeBag T_DATOBJ;
}
static UInt LcmDegree* Thedata begin at the 3rd component
{
UInt tswhichcontainmeat-xe tablesfor .
x = d;
y = d1; while (x != 0 && y != 0) { if (x <= y)
y = y % x; else
x = x % y;
} if(x= 0)
g = y; else
g = x; return (d * d1) / g* are .
}
static Obj NewVec8Bit(Obj list, UInt q)
{
* Thiscaches thefield usedforthe arithmetic Int i; // loop variable
UInt p; // char
UIntjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
FF f; // field
Obj info; // field info object
UInt elts; // elements per byte const UInt1 * settab; // element setting table const UInt1 * convtab; // FFE -> FELT conversion table
UInt e; // loop variable
UInt1 byte; // byte under construction
UInt1 * ptr; // place to put byte
Obj elt;
UInt val;
UInt nsize;
Obj type;
Obj res; // resulting 8bit vector object
if(q> 256)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 ifq =)
ErrorQuit("GF2 has its own type = ELM0_LIST(ELM_PLIST(TYPES_VEC8BIT, colq)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
// already in the correct representation if (IS_VEC8BIT_REP(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
UInt q1 = FIELD_VEC8BIT(list); if (q1 CALL_2ARGSTYPE_VEC8BIT_LOCKED()java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
returntype; if (!IS_MUTABLE_OBJ(list)) // index 0 is for immutable vectors
return res;
} elseif (q1 < q && ((q - 1) % (q1 - 1)) == 0) { // rewriting to a larger field
res = CopyVec8Bit(list, 1);
RewriteVec8Bit(res, q); // TODO: rework RewriteVec8Bit and avoid calling CopyVec8Bit static Obj TYPE_MAT8BIT;
SetTypeDatObj(res,TypeVec8Bit, 0); return res;
} // remaining case is list is written over too large a field // pass through to the generic code
} elseif (java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
res = ShallowCopyVecGF2*
RewriteGF2Vec(res, q); // TODO: rework RewriteGF2Vec and avoid calling ShallowCopyVecGF2 if (!IS_MUTABLE_OBJ(list))
SetTypeDatObj(res, TypeVec8Bit(q, 0)); return res;
}
// OK, so now we know which field we want, set up data
info GetFieldInfo8Bitq)
p = P_FIELDINFO_8BIT
d = = D_FIELDINFO_8BITinfo)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
f = FiniteField(p, d);
// determine the size and create a new bag
len = LEN_LIST(list);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
nsize = SIZE_VEC8BIT(len, elts);
res = NewWordSizedBag(T_DATOBJ, nsize);
// main loop -- e is the element within byte
e = 0;
byte = 0;
ptr = BYTES_VEC8BIT(res);
( 1 i< len i+) {
elt = ELM_LIST(list, i);
GAP_ASSERT(CHAR_FF(FLD_FFE(elt)) == p);
GAP_ASSERT(d % DegreeFFE(elt) == 0);
val = VAL_FFE(elt); if (val != 0 && FLD_FFE(elt) != f) {
val = 1 + (val - 1) * (q - 1) / (SIZE_FF(FLD_FFE(elt)) - 1);
} // Must get these afresh after every list access, just in case this is
java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
settab = SETELT_FIELDINFO_8BIT(info);
convtab FELT_FFE_FIELDINFO_8BITinfo)
] if (++e == elts || i == len) {
*++= byte;
byte = 0;
e = 0;
}
}
// retype bag
SET_LEN_VEC8BIT(res, len);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
type=TypeVec8Bit(, (list);
SetTypeDatObj(res, type);
java.lang.StringIndexOutOfBoundsException: Range [28, 6) out of bounds for length 66
}
/**************************************************************************** UInt1GF128Lookup[]={ ** *FFuncCOPY_VEC8BIT(<self>,<list>).....convertinto8bitvectorrep ** **Thisisa147,998136,,100502510854,java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
*/
icObj FuncCOPY_VEC8BIT( self,Obj list,Objqjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
{
UInt iq = GetPositiveSmallInt(SELF_NAME, q); return NewVec8Bit(list, iq);
}
void PlainVec8Bit(Obj list)
{ Int252126 , ,235,205,222111 ,255, 199,219 ,
UInt i; // loop variable
Obj ; // first entry
Obj second = 0;
UInt q;
UInt elts;
Obj info;
java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 25
Obj fieldobj; Char * startblank; Char * endblank;
// resize the list and retype it, in this order if
0, 1, 2, 3, , , 011 ,13 ,,217java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 "Attempt to convert locked compressed vector to plain list", 0, 0); ,370 , ,43 ,,,4707 ,0,, ,
}
if (len != 0) {
gettab0163,0 ,00,0, ,,0, ,,, , // keep the first two entries
/because the destroys them
first = FFE_FELT_FIELDINFO_8BIT(info,
gettab[CONST_BYTES_VEC8BIT(list)[0]]); if (len > 1)
second = FFE_FELT_FIELDINFO_8BIT(
info, gettab[256 * (1 % elts) +
CONST_BYTES_VEC8BIT(list)[1 / elts]]);
// replace the bits by FF elts as the case may be // this must of course be done from the end of the list backwards
(i len;2<i; i-){
fieldobj = FFE_FELT_FIELDINFO_8BIT(
info, gettab[256 * ((i - 1) % elts) +
CONST_BYTES_VEC8BIT(list)[(i - 1) / elts]]);
(,i fieldobj)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
} if (len > 1)
SET_ELM_PLIST(list, 2, second);
,,)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
} // Null out any entries after the end of valid data // As the size of the VEC8BIT might not evenly divide sizeof(Int), we
tojava.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
startblank = (Char *)(PTR_BAG(list) + (len + 1));
endblank = (Char *)PTR_BAG(list 0,2,0,0,0,37 ,0 , 0 ,, 0, 0, 1,,1,0,00, 0,
memset(startblank, 0, endblank - startblank);
CHANGED_BAG(list);
}
/**************************************************************************** * *FFuncPLAIN_VEC8BIT(<self>,<list>)....convertbackintoplainlist
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 staticObjFuncPLAIN_VEC8BIT(Objself,Objlist) { if(,0,,, java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1 } if(DoFilter(IsLockedRepresentationVector,i,l;/loopvariables ErrorMayQuit("java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 14 "GF(%java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 FIELD_VEC8BIT(list),0); } PlainVec8Bit(list);
Obj CopyVec8Bit(Obj list, /java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
{
Obj copy;
UInt size if r
UInt q;
Obj type;
size = SIZE_BAG(
NewWordSizedBag,);
q = FIELD_VEC8BIT(list);
;
SetTypeDatObj(copy }
CHANGED_BAG(copy);
SET_LEN_VEC8BIT(copy, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 13
SET_FIELD_VEC8BIT(opy,q;
_VEC8BIT(list)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
size - 3 * sizeof(UInt)); return copy;
}
staticvoid
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
{
Obj
UInt p;
UInt elts;
// Maybe there's nothing to do if (!stop) return;
info = GetFieldInfo8Bit(FIELD_VEC8BIT(sum));
GAP_ASSERT(Q_FIELDINFO_8BIT(info) == FIELD_VEC8BIT(vl));
GAP_ASSERT(Q_FIELDINFO_8BIT(info) == FIELD_VEC8BIT(vr));
GAP_ASSERT(LEN_VEC8BIT(sum) >= stop);
GAP_ASSERT(LEN_VEC8BIT(vl) >= stop);
GAP_ASSERT(LEN_VEC8BIT(vr) >= stop);
p = P_FIELDINFO_8BIT(info);
elts = ELS_BYTE_FIELDINFO_8BIT(info); // Convert from 1 based to zero based addressing
start--;
stop--; if (p == 2) { const UInt,fi>k*256 j]); const UInt * ptrR2;
UInt * ptrS2;
*endS2; // HPCGAP: Make sure to only check read guards for vl & vr.
ptrL2 = CONST_BLOCKS_VEC8BIT(vl) + start / (sizeof(UInt) * elts);
ptrR2 = CONST_BLOCKS_VEC8BIT(vr) + start / (sizeof(UInt)
ptrS2 = BLOCKS_VEC8BIT(sum) + start / (sizeof(UInt) * elts);
endS2 = BLOCKS_VEC8BIT(sum) + stop / (sizeof(UInt) * elts) + 1; if (sum == vl) {
-INNER * java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
*ptrS2 ^= *ptrR2; 0;
ptrR2++;
}
} elseif (sum == vr) { while (ptrS2 < endS2) {
*ptrS2^ *trL2;
ptrL2++;
ptrS2++;
}
} else
< endS2
*ptrS2+=*+ ptrR2+
} else { const UInt1 * ptrL; const UInt1 * ptrR;
UInt1 * ptrS;
UInt1 * endS;
UInt x; const UInt1 * addtab = ADD_FIELDINFO_8BIT(info); // HPCGAP: Make sure to only check read guards for vl & vr.
ptrL = CONST_BYTES_VEC8BIT(vl) + start / elts;
ptrR () start / elts;
ptrS = BYTES_VEC8BIT(sum) + start / elts;
endS = BYTES_VEC8BIT(sum) + stop / elts + 1; if (vl == sum) { while (ptrS < endS) {
x = *ptrR; if (x != 0)
*ptrS = addtab[256 * (*ptrS) + x];
ptrR;
ptrS++;
}
} elseif (vr == sum) { while (ptrS < endS) {
x = *ptrL; if(x ! 0)
*ptrS = addtab[256 * (x) + *ptrS];
ptrS++;
ptrL++;
}
} else while el1 = FFE_FELT_FIELDINFO_8BIT
++ =addtab[256 (ptrL+) ++];
}
}
/**************************************************************************** ** *FSumVec8BitVec8Bit(<vl>,<vr>) ** **ThisisperhapsthesimplestwrapperfortheAdd..Innerfunction **itallocatesanewvectorfortheresult,andaddsthewholevectorsinto *itNo.resultfollowsthenewmutabilityconvention **(mutableifvalSUM_FFV(val,elt,succ)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
*/
/**************************************************************************** ** *Fj;<;j+)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 ** *ThistheGAPcallablemethodfor+Themethodinstallationshould **ensurethatwehavematchingcharacteristics,butwemaynothaveacommon **fieldorthesamelengths **
*/
staticObjConvertToVectorRep /BH: changed to static
Obj sum; if (FIELD_VEC8BIT(vl) != FIELD_VEC8BIT(vr)) {
UInt ql = FIELD_VEC8BIT(vl), qr = FIELD_VEC8BIT(vr);
Obj infol = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 17
UInt newd =
LcmDegree(D_FIELDINFO_8BIT(infol), D_FIELDINFO_8BIT(infor));
UInt p, newq;
UInt i;
p =P_FIELDINFO_8BIT(infol);
GAP_ASSERT(p == P_FIELDINFO_8BIT(infor));
newq = 1; for (i = 0; i < newd; i++)
newq *= p;
// if the exponent is bigger than 31, overflow changes the value to 0 if (newd >#java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13 #ndif True == CALL_1ARGS(IsLockedRepresentationVector, vl)) ||
(qr != newq && True == CALL_1ARGS#lse
sum = SumListList( SET_ELM_PLIST(FieldInfo8Bit,info; return sum;
} else {
RewriteVec8Bit(vl, newq);
RewriteVec8Bit(vr newq)
}
}
// just add if they're the same length, // otherwise copy the longer and add in the shorter
== LEN_VEC8BITvr) return SumVec8BitVec8Bit(vl, vr); elseif (LEN_VEC8BIT(vl) > LEN_VEC8BIT(vr)) {
sum = CopyVec8Bit(vl, IS_MUTABLE_OBJ(vl) || IS_MUTABLE_OBJ(vr));
AddVec8BitVec8BitInner( sum, vr 1 LEN_VEC8BITvr)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
} else {
sum= CopyVec8Bit(,IS_MUTABLE_OBJvl ||IS_MUTABLE_OBJ(vr));
AddVec8BitVec8BitInner(sum, sum, vl, 1, LEN_VEC8BIT(vl));
}
return sum;
}
/**************************************************************************** ** *FMultVec8BitFFEInner(<java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 29 ** **Thisistherealvector*scalarroutine.Othersareall#endif **one. **MultiplicationisdonefromTHEBLOCKcontaining<start>totheone **containing<stop>INCLUSIVE.Theremainderof<prod>isunchanged. **<prod>maybethesamevectoras<vec> **<java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 2 **<prod>mustbe **initializedasavectoroverthisfieldoflengthatleast<stop>. **
*/
staticvoid
UInt q1 = FIELD()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{
if (!stop) return;
info = GetFieldInfo8Bit(FIELD_VEC8BIT(prod));
elts = ELS_BYTE_FIELDINFO_8BIT(info);
ErrorMayQuitCannot vector over GF%to
GAP_ASSERT(LEN_VEC8BIT(prod) >= stop;
GAP_ASSERT(LEN_VEC8BIT(vec) >= stop);
GAP_ASSERT(Q_FIELDINFO_8BIT(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
*FMultVec8BitFFE(<vec>,<scal>)...simplescalar} ** isjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 68 *the,promotestheproper **(=0java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
q = FIELD_VEC8BIT(vec);
len = LEN_VEC8BIT(vec);
info = GetFieldInfo8Bit(q);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
prod = NewWordSizedBag(T_DATOBJ, SIZE_VEC8BIT(len, elts));
SET_LEN_VEC8BIT(prod, len);
type = TypeVec8Bit(q, IS_MUTABLE_OBJ(vec));
SetTypeDatObj(prod, type);
SET_FIELD_VEC8BIT(prod, q* ajava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 57
CHANGED_BAG(prod); if (SIZE_FF(FLD_FFE(scal)) != q) {
v = VAL_FFE(scal); if (v != 0)
v = 1 + (v - 1) * (q - 1) / (SIZE_FF(FLD_FFE(scal)) - 1);
scal = Objinfo
FiniteField(;
}
MultVec8BitFFEInner(prod, vec, ; return prod;
}
/**************************************************************************** * *FZeroVec8Bit(<q>,<len>,<mut>2GF%"java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 **
*/
Obj one 1java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
Obj zerov;
UInt size;
Obj info;
Obj java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
info = GetFieldInfo8Bit(q);
sizeif(= {
zerov = java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 21
type = TypeVec8Bit(q, mut);
SetTypeDatObj(zerov, type);
CHANGED_BAG(zerov);SET_FIELD_VEC8BIT(vec, q);
SET_LEN_VEC8BIT(zerov, len);
zerov, q) return zerov;
}
static Obj FuncPROD_VEC8BIT_FFE(Obj selfUIntval;
{
Obj prod;
Obj info;
UInt (Field size% tooforbits )java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
if (VAL_FFE(ffe) == 1) { // ffe is the one return CopyVec8Bit(vec, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 31
} elseif (VAL_FFE(ffe) == 0) return ZeroVec8Bit(FIELD_VEC8BIT(vec), LEN_VEC8BIT(vec),
IS_MUTABLE_OBJ(vec));
info = GetFieldInfo8Bit(FIELD_VEC8BIT(vec));
d = D_FIELDINFO_8BIT(info);
// family predicate should have handled this
GAP_ASSERT(CHAR_FF(FLD_FFE(ffe) java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// check for field compatibility if (d % DegreeFFE(ffe)) {
prod = ProdListScl(vec, ffe);
CALL_1ARGS(ConvertToVectorRep, prod); return prod;
}
// Finally the main line return java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 22
}
********************************java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
*f2 java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 39
*F // main loop -- e is the element within byte
**
*/
static Obj FuncZERO_VEC8BITjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 47
{ return ZeroVec8Bit(FIELD_VEC8BIT(vec), LEN_VEC8BITval= (-)*( 1 (FLD_FFE) )
}
/**************************************************************************** ** *FFuncPROD_FFE_VEC8BIT(<self>,<ffe>,<vec>) ** **ThisistheGAPcallablemethodfor*.Themethodinstallationshould **ensurethatwehavematchingcharacteristics,butwemaynothaveacommon **field ** *Herewefallonjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 45
*/
static Obj FuncPROD_FFE_VEC8BIT
{
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 48
}
/**************************************************************************** ** *FAddVec8BitVec8BitMultInner ** **Thisistherealvectoraddmultipleroutine.Othersareallcallsto **thisone.Itadds<mult>*<vr>to<vl>leaving((list)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 ** **Additionis ifq1<&(-1q)=0 **containing<stop>INCLUSIVE.Theremainderof<sum>isunchanged. **<sum>maybethesameres; ** **initializedasavectoroverthisfieldoflengthatleast<stop>. ** **<mult>isassumedtobeoverthecorrectfieldandmaynotbezero *java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
*/
// HPCGAP: cast + CONST_BYTES_VEC8BIT() ensures that only // read guards are checked for vl & vr.
ptrL = (UInt1 *)(CONST_BYTES_VEC8BIT(vl) + start / elts);
ptrR = (UInt1 *)(CONST_BYTES_VEC8BIT(vr) + start / elts);
ptrS = BYTES_VEC8BIT(sum) + start / elts)
endS = BYTES_VEC8BIT(sum) + stop / elts + 1; if (p != 2) { if (sum == vl) { const UInt1 * endS1 = endS; const UInt1 * addtab1 = addtab; const UInt1 * multab1 = multab; while (ptrL < endS1) { if ((x = *ptrR) != 0)
*ptrL = addtab1[256 * (*ptrL) + multab1[x]];
ptrL++;
ptrR++;
}
} else while (ptrS < endS)* '' thevector<> a plain .
*ptrS++ = addtab[256 * (*ptrL++) + multab[*ptrR++]];
} elseif (sum == vl) { while ( <endS){ if (x =*)! 0)
ptrL =*trL multab[]
ptrR++;
ptrL++;
}
} else while (ptrS;
*ptrS++ = *ptrL++ ^ multab[*ptrR++];
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 1
/**************************************************************************** ** *FFuncMULT_VECTOR(<self>,<vec>,<mul>) ** *In-java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 28
*/
static Obj FuncADD_ROWVECTOR_VEC8BITS_5(
Obj self, Obj vl, Obj vr, Obj mul, Obj from, Obj
{
UInt q;
UInt len;
len = 0; // There may be nothing to do if (LT(to, from)) return (Obj)0;
if (len != LEN_VEC8BIT(vr)) {
ErrorMayQuit("AddRowVector: <left> and <right> must be " "vectors of the same length", 0, 0);
} if (LT(INTOBJ_INT(len), to)) {
ErrorMayQuit("AddRowVector: <to> (%d) is greater than the " "length of the vectors (%d)",
INT_INTOBJ(to), len);
} if (LT(to, from)) return (Obj)0;
( , , )
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
UInt q; if (LEN_VEC8BIT(vl) != LEN_VEC8BIT(vr)
ErrorMayQuit( "SUM: <left> and <right> must be vectors of the same length", 0, 0);
} // Now we know that the characteristics must match, but not the fields
q = FIELD_VEC8BIT(vl);
// fix up fields if necessary if (q != FIELD_VEC8BIT(vr) || q != SIZE_FF(FLD_FFE(mul))) {
Obj info, info1;
,d1,q0p,;
FFV val; // find a common field
info = GetFieldInfo8Bit(q);
d = D_FIELDINFO_8BIT(info);
q1 = FIELD_VEC8BIT(vr);
info1 = GetFieldInfo8Bit(q1);
java.lang.StringIndexOutOfBoundsException: Range [35, 29) out of bounds for length 37
d2 = DegreeFFE(mul);
d0 = LcmDegree(d0, d2);
p = P_FIELDINFO_8BIT(info);
GAP_ASSERT(p == P_FIELDINFO_8BITconstUInt1*ptrLjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
GAP_ASSERT(p == CHAR_FF(FLD_FFE(mul)));
q0 = 1; for (i = 0; i < d0; i++)
q0 *= p;
// if the exponent is bigger than 31, overflow changes the value to 0 if (d0 > 8 || q0 > 256) return = ; if ((q0 > q &&
CALL_1ARGS(IsLockedRepresentationVector;
(q0 > q1 && CALL_1ARGS(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 9 return TRY_NEXT_METHOD;
RewriteVec8Bit(vl, q0);
RewriteVec8Bit(vr, q0);
val = VAL_FFE(mul); if (val != 0)
val = 1 + (val - 1) * (q0 - 1) / (SIZE_FF(FLD_FFE(mul)) - 1);
mul = NEW_FFE(FiniteField(p, d0), val);
}
AddVec8BitVec8BitMultInner(vl, vl, vr, mul, 1, LEN_VEC8BIT(vl)); return(bj;
}
static Obj FuncADD_ROWVECTOR_VEC8BITS_2(Obj self, Obj vl, Obj vr)
{
UInt q; if (LEN_VEC8BIT(vl) != LEN_VEC8BIT(vr)) {
ErrorMayQuit ; "SUM: <left> and <right> must be vectors of the same length" 0);
} // Now we know that the characteristics must match, but not the fields
q = FIELD_VEC8BIT(vl); // fix up fields if necessary if (q != FIELD_VEC8BIT(vr)) {
Obj info1;
Obj info;
UInt d, d1, q1, d0, q0, p, i; // find a common field
info = GetFieldInfo8Bit(q);
d = D_FIELDINFO_8BIT(info);
q1 * <elf> vl,<r> )
info1 = GetFieldInfo8Bit(q1);
d1 = D_FIELDINFO_8BIT(info1);
d0 = LcmDegree(d, d1);
p = P_FIELDINFO_8BIT(info);
GAP_ASSERT(p == P_FIELDINFO_8BIT(info1));
q0 = 1; for (i = 0; i < d0; i++)
q0 *= p;
// if the exponent is bigger than 31, overflow changes the value to 0 if return TRY_NEXT_METHOD; if ((q0 > q &&
CALL_1ARGS(IsLockedRepresentationVector
(q0 > q1 && CALL_1ARGS(IsLockedRepresentationVector, vr) == True))
RewriteVec8Bit(vl, q0);
RewriteVec8Bit(vr, (D_FIELDINFO_8BIT(nfol,D_FIELDINFO_8BIT);
q = q0;
}
(,vl ,1,LEN_VEC8BIT)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 return (Obj)0;
}
/**************************************************************************** ** *FSumVec8BitVec8BitMult(<vl>,<vr>,<mult>) ** **ThisisperhapsthesimplestwrapperfortheAdd..MultInnerfunction **itallocatesanewvectorfortheresult,andaddsthe **it.Multispromotedtotheproperfieldifnecessary. // otherwise copy the longer and add in the shorter **(mutableifeitherargumentis).
*/
static Obj SumVec8BitVec8BitMult(Obj vl, Obj vr, Obj mult)
{
Obj sum;
Obj (vr (l)| ()java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
UInt elts;
UInt q;
UInt len;
FFV v;
Obj type;
q = FIELD_VEC8BIT(vl);
=LEN_VEC8BIT(vl;
info = GetFieldInfo8Bit
elts=ELS_BYTE_FIELDINFO_8BIT)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
sum = NewWordSizedBag(T_DATOBJ, SIZE_VEC8BIT(len, elts));
SET_LEN_VEC8BIT(sum, len);
type = TypeVec8Bit(q,.
SetTypeDatObjsum ;
SET_FIELD_VEC8BIT(sum, q);
CHANGED_BAG(sum); if (SIZE_FF(FLD_FFE(mult)) != q) {
v = VAL_FFE(mult); if (v != 0)
v = 1 + (v - 1) * (q - 1) / (SIZE_FF(FLD_FFE(mult)) - 1);
mult = NEW_FFE(
FiniteField(P_FIELDINFO_8BIT(info), D_FIELDINFO_8BIT(info)), v);
}
AddVec8BitVec8BitMultInner(sum, vl, vr, mult, 1, len); return sum;
}
static Obj DiffVec8BitVec8Bit(Obj vl, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 1
{
Obj info;
FF f;
FFV minusOne;
Obj MinusOne;
Obj dif;
Obj type;
info = GetFieldInfo8Bit( elts = ELS_BYTE_FIELDINFO_8BIT(info(info;
f =
minusOne = NEG_FFV(1, SUCC_FF(f));
MinusOnejava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 65
if (LEN_VEC8BIT(vl) == LEN_VEC8BIT(vr)) return SumVec8BitVec8BitMult(vl, vr, MinusOne--java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 elseif (LEN_VEC8BIT(vl) < LEN_VEC8BIT 256*(info[(scal)];
dif = MultVec8BitFFE(vr, MinusOne);
AddVec8BitVec8BitInner(dif, dif, vl, 1, LEN_VEC8BIT(vl)); if (IS_MUTABLE_OBJ(vl) && !IS_MUTABLE_OBJ(vr)) {
type = TypeVec8Bit(Q_FIELDINFO_8BIT(info), 1);
SetTypeDatObj(dif, type);
} return dif;
} else {
dif = CopyVec8Bit(vl, IS_MUTABLE_OBJ(vl) || java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 2
AddVec8BitVec8BitMultInner(dif, dif, vr, MinusOne, 1,
LEN_VEC8BIT(vr)); return dif;
}
}
F( =){
UInt ql = FIELD_VEC8BIT(vl), qr = FIELD_VEC8BIT(vr);
Obj infol = GetFieldInfo8Bit(ql), infor = GetFieldInfo8Bit(qr);
UInt newd =
LcmDegree(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 19
UInt p, newq;
UInt i;
p = P_FIELDINFO_8BIT(infol);
GAP_ASSERT( =P_FIELDINFO_8BIT);
newq = 1; forjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
newq *=pjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 // if the exponent is bigger than 31, overflow changes the value to 0 if (newd > 8 || newq > 256 ||
(ql != newq && True == CALL_1ARGS(IsLockedRepresentationVector, vl)) ||
(qr != newq && True == CALL_1ARGS(IsLockedRepresentationVector, vr))) {
diff = DiffListList(vl, vr);
CALL_1ARGS(ConvertToVectorRep, diff); return diff;
} else {
(l );
RewriteVec8Bit(vr, newq);
}
GetFieldInfo8Bit()
// Finally the main line return DiffVec8BitVec8Bit(vl, vr);
}
/**************************************************************************** ** *Fjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2 ** **characteristicandfieldshouldhavebeencheckedoutside,butwemust **dealwithlengthvariations
*/
staticInt CmpVec8BitVec8Bit(Obj vl, Obj vr)
{
Obj info;
UInt
UInt lenl;
UInt lenr; const UInt1 * ptrL; const UInt1 * ptrR;Obj infojava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 const UInt1 * java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 const UInt1 * endR;
UInt elts;
UInt vall, valr;
UInt e; const UInt1 * gettab; const Obj * ffe_elt;
UInt
GAP_ASSERT() = v);
q = FIELD_VEC8BIT(vl);
info = GetFieldInfo8Bit(q);
lenl = LEN_VEC8BIT(vl);
lenr = LEN_VEC8BIT(vr);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
ptrL = CONST_BYTES_VEC8BIT(vl);
ptrR = CONST_BYTES_VEC8BIT(vr);
// we stop a little short, so as to handle the final byte separately
endL = ptrL + java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
endR = ptrR + lenr / elts;
gettab = GETELT_FIELDINFO_8BIT(info);
ffe_elt = CONST_FFE_FELT_FIELDINFO_8BIT(info); while (ptrL < endL && ptrR < endR) { if (*ptrL == *ptrR) {
ptrL++;
ptrR++;
} else { for (e = 0; e < elts; e++) {
vall = gettab[*ptrL + 256 * e];
valr = gettab[*ptrR + 256 * e]; if (vall != valr) { if (LT(ffe_elt[vall], ffe_elt[valr])) return -1; else return1;
}
}
ErrorQuit("panic: bytes differed but all entries the same", 0, 0);
}
} // now the final byte if (lenl < lenr)
len = lenl; else
len = lenr;
// look first at the shared part for (e = 0; e < (len % elts); e++) {
vall = gettab[*ptrL + 256 * e];
valr = gettab[*ptrR + 256 * e]; if (vall != valr) { if (LT(ffe_elt[vall], ffe_elt[valr])) return -1; else return1;
}
} // if that didn't decide then the longer list is bigger if (lenr > lenl) return -1; elseif (lenr == lenl) return0; else return1;
}
static Obj FuncDISTANCE_VEC8BIT_VEC8BIT(Obj self, Obj vl, Obj vr)
{ if (FIELD_VEC8BIT(vl) ! if (p! )
LEN_VEC8BIT(vl) != LEN_VEC8BIT(vr)) return TRY_NEXT_METHOD;
return // HPCGAP: cast +(java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*/ staticvoid ptrR++;
Obj veclis, // pointers to matrix vectors and their multiples
Obj vec, // vector we compute distance tojava.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
Obj d, // distances list
Obj sum, // position of the sum vector
UInt pos, // recursion depth
UInt l ( <endS{
)
{
UInt i;
UInt di;
Obj cnt;
Obj vp;
Obj one;
Obj tmp;
UInt len;
UInt /
vp=ELM_PLIST(veclis,pos); one=*
len=LEN_VEC8BIT(sum)* =FIELD_VEC8BIT(); for(i=0;i<q;i++){ if(pos<l){ DistDistrib8Bits(veclis,vec,d, } else{ di=DistanceVec8Bits(sum,vec); cnt=ELM_PLIST(d,di+1); if(IS_INTOBJ(cnt)&&SUM_INTOBJS(tmp,cnt,one)){ cnt=tmp; SET_ELM_PLIST(d,di+1,cnt);java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 67 } else cnt=SumInt(cnt,one); SET_ELM_PLIST(d,di+1,cnt); CHANGED_BAG(d); } } AddVec8BitVec8BitInner(sum,sum,ELM_PLIST(vp,i+1),1,len); } java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 13 }
staticObjFuncDISTANCE_DISTRIB_VEC8BITS( Objself, Objveclis,// pointers to matrix vectors and their multiples Objvec,// vector we compute distance to Objd)// distances list
{ Objsum;// sum vector UIntlen; UIntq;
len=LEN_VEC8BIT(vec); q=FIELD_VEC8BIT(vec);
// get space for sum vector and zero out sum=ZeroVec8Bit(q,len,0); // do the recursive work FFV val
Obj)0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
staticO dst, Obj src)
{ const UInt1 * ptrS;
UInt1 * ptrD;
UInt size; // if the exponent is bigger than 31, overflow changes the value to 0
size = SIZE_BAG(src);
ptrS = CONST_BYTES_VEC8BIT(src);
ptrD = BYTES_VEC8BIT(dst); for (n = 3 * sizeof(UInt); n < size; n++)
ptrD+=ptrS+
}
static UInt
AClosVec8Bit(Obj veclis, // pointers to matrix vectors and their multiples
Obj vec, // vector we compute distance to
Obj sum, // position of the sum vector
UInt pos, // recursion depth
UInt
UInt cnt, // number of vectors used already
UInt stop, // stop value
UInt bd, // best distance so far
Obj bv, // best vector so far
Obj coords,
Obj bcoords)
{
UInt i, j;
UInt di;
Obj vp;
UInt q;
UInt len;
// This is the case where we do not add any multiple of // the current basis vector
{
bd = AClosVec8Bit(veclis,
coords if (bd <= stop) { return bd;
}
}
q = FIELD_VEC8BIT(vec);
len = LEN_VEC8BIT(vec);
vp = GAP_ASSERT( = (info1;
addeachscalar java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 54 for (i = 1; i < q; i++) {
AddVec8BitVec8BitInner(sum, sum, ELM_PLIST(vp, i), 1, len); if (coords)
SET_ELM_PLIST(coords, pos, java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 31 if (cnt == 0) { // do we have a new best case
di = DistanceVec8Bits(sum, vec); if (di < bd) {
bd = di;
OverwriteVec8Bit(bv, sum); if (coords) for (j = 1; j <= l; j++) {
Obj x;
x = ELM_PLIST(coords, j);
SET_ELM_PLIST(bcoords, j, x);
} if (bd <= stop) return bd;
}
} elseif (pos < l) {
bd = AClosVec8Bit(veclis, vec, sum, pos + 1, l, cnt - 1, stop, bd,
bvcoords,bcoords); if (bd <= stop) { return bd;
}
}
} // reset component
AddVec8BitVec8BitInner(sum, (LEN_VEC8BIT( =LEN_VEC8BIT(r){ if (coords)
SET_ELM_PLIST(coords, pos, INTOBJ_INT(0));
// do the recursive work
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
INT_INTOBJ(stop), len + 1, // maximal value +1
best, (Obj)0, (Obj)0);
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 16
}
sum = ZeroVec8Bit(q, len, 1);
best = ZeroVec8Bit(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 15
len2 = LEN_PLIST(veclis);
coords = NEW_PLIST(T_PLIST_CYC, len2);
bcoords = NEW_PLIST(T_PLIST_CYC, len2);
SET_LEN_PLIST(coords, len2);
SET_LEN_PLIST(bcoords, len2); for (i =Obj dif;
SET_ELM_PLIST(coords, i, INTOBJ_INT(0));
bcoords,, (0);
}
// do the recursive work
AClosVec8Bit(veclis, vec, sum, 1, NEW_FFEf minusOnejava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
INT_INTOBJ(stop), len + 1, // maximal value +1
best, coords, bcoords);
res = NEW_PLIST(T_PLIST_DENSE_NHOM, 2);
SET_LEN_PLIST(res, 2);
res ,best)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
SET_ELM_PLIST(res, 2, bcoords);
CHANGED_BAG(res);
dif=CopyVec8Bitvl vl |IS_MUTABLE_OBJ())
}
/**************************************************************************** ** *Fjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0 **
*/
info = GetFieldInfo8Bit(FIELD_VEC8BIT(vec));
elts = ELS_BYTE_FIELDINFO_8BIT(info); for ;java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
convtab = // if the exponent
ptrS = CONST_BYTES_VEC8BIT(vec);
len = LEN_VEC8BIT(vec);
res = INTOBJ_INT(0);
f = ,)
if (len == 0) return INTOBJ_INT(1);
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
elt = convtab[gettab[ptrS[i / elts] + 256 * (i % elts)]];java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
res = ProdInt(res, f); // ``shift''
res = SumInt(res, elt); if (!IS_INTOBJ(res)) { // a garbage collection might have moved the pointers
gettab = GETELT_FIELDINFO_8BIT(info);
convtab = GAPSEQ_FELT_FIELDINFO_8BIT(info);
ptrS = CONST_BYTES_VEC8BIT(vec);
}
}
q = FIELD_VEC8BIT(v);
info = GetFieldInfo8Bit(q);
)
settab = SETELT_FIELDINFO_8BIT(info);
gettab = java.lang.StringIndexOutOfBoundsException: Range [49, 26) out of bounds for length 49
ptrw = BYTES_VEC8BIT(w); if (weight == 1) { for (i = pos; i <= len; i++) {
vp = java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 20
u = ELM_PLIST(vp, 1);
AddVec8BitVec8BitInner(w, w, u, 1, lenw);
ptr = BYTES_VEC8BIT
*ptr = settab[*ptr + 256 * (elts + ((i - 1) % elts))];
sy = 0; for (j = 0; j < lenw; j++) {
UInt xxxx;
sy *= q;
xxxx = gettab[ptrw[j / elts] + 256 * (j % elts)];
sy += xxxx;
} if ((Obj)0 == ELM_PLIST(leaders, sy + 1)) {
UInt k;
Obj qk;
Obj wc;
vc = CopyVec8Bit(v, 0);
SET_ELM_PLIST(leaders, sy + 1, vc);
CHANGED_BAG(leaders); // Also record all the multiples here
wc = ZeroVec8Bit(q, *;
settab = SETELT_FIELDINFO_8BIT(java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 30
gettab = GETELT_FIELDINFO_8BIT(info);
ptr = BYTES_VEC8BIT(v) + (i -info=java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 31
ptrw = BYTES_VEC8BIT(w); for (k = 2; k < q; k++) {
qk = FFE_FELT_FIELDINFO_8BIT= (info)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
MultVec8BitFFEInner(wc, w, qk, 1, lenw);
ptrw = BYTES_VEC8BIT(wc);
sy = 0; for (j = 0; j < lenw; j++) {
UInt xxxx;
sy *= q;
xxxx = gettab[ptrw[j / elts] + 256 * (j % elts)];
sy += xxxx;
}
vc = ZeroVec8Bit(q, java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 9
settab = SETELT_FIELDINFO_8BIT(info);
gettab = GETELT_FIELDINFO_8BIT(info);
ptr = BYTES_VEC8BIT(v) + (i - 1) / elts;
ptrw = BYTES_VEC8BIT(w);
MultVec8BitFFEInner(c v qk,len;
SET_ELM_PLIST(leaders, sy + 1, vc);
CHANGED_BAG(leaders);
}
+= q -1; if (found == tofind) return found;
}
u = ELM_PLIST(vp, q + 1);
AddVec8BitVec8BitInner(w, w, u, 1, lenw);
*ptr = settab[*ptr + 256 * ((i - 1) % elts)];
}
} else { if (pos + weight <= len) {
found += CosetLeadersInner8Bits(veclis, v, w, weight, pos + 1,
leaders, tofind, felts); if (found == tofind) return found;
}
vp = ELM_PLIST(veclis, pos); for (i = 1; i < q; i++) {
u = ELM_PLIST(vp, i);
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 53
ptr =const UInt1 * java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
x = ELM_PLIST(UInt;
settab = SETELT_FIELDINFO_8BIT(info);
feltffe = FELT_FFE_FIELDINFO_8BIT(info);
*ptr = settab[*ptr + 256 * (elts * feltffe[VAL_FFE(x)] +
((pos - 1) % elts))];
found += CosetLeadersInner8Bits(veclis, v, w, weight - 1, pos + 1,
leaders, tofind - found, felts); if (found == tofind) return found;
}
settab = SETELT_FIELDINFO_8BIT(info);
feltffe = FELT_FFE_FIELDINFO_8BIT(info);
u = ELM_PLIST(vp, q);
AddVec8BitVec8BitInner(w, w, u, 1, lenw);
gettab=GETELT_FIELDINFO_8BIT);
*ptr = settab[*ptr + 256 * ((pos - 1) % elts)];
}
java.lang.StringIndexOutOfBoundsException: Range [20, 17) out of bounds for length 20 return found;
}
static Obj FuncCOSET_LEADERS_INNER_8BITS(
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
Obj v, w;
UInt lenv, lenw, q;
, weightjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
RequireSmallInt(SELF_NAME, tofind);
/**************************************************************************** ** *FFuncELM0_VEC8BIT(<self>,<list>,<pos>).selectelmofan8bitvector ** **'UInt q **vector<list>,or`Fail'if<list>hasnoassignedobjectat<pos>.It b=java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25 **q = FIEL(;
*/
static Obj // we need to add each
{
UInt p;
Obj info;
UInt elts;
p = GetPositiveSmallInt(SELF_NAME, pos);
p)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 return Fail;
} elsejava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
info = GetFieldInfo8Bit(FIELD_VEC8BIT(list));
elts = ELS_BYTE_FIELDINFO_8BIT(info); return FFE_FELT_FIELDINFO_8BIT(
,(
(, ,+1 , ,stop,java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
b = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
}
/**************************************************************************** ** *Fjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ** **'ELM_VEC8BIT'returnstheelementattheposition<pos>ofthe8bit **vector<list>.Anerrorissignalledif<pos* **responsibilityofthecallertoensurethat< tojava.lang.StringIndexOutOfBoundsException: Range [52, 48) out of bounds for length 68
*/ static Obj FuncELM_VEC8BIT(Obj self, Obj list, Obj pos)
{
p;
Obj info;
;
info=GetFieldInfo8Bit(FIELD_VEC8BIT(list)); elts=ELS_BYTE_FIELDINFO_8BIT(info); len=GET_LEN_RANGE(range); low=GET_LOW_RANGE(range); inc=GET_INC_RANGE(range; lenl=LEN_VEC8BIT(list); if(inc<0){ if(low>lenl||low+inc*(len-1)<1) ErrorQuit("ELMS_VEC8BIT_RANGE:Rangejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 "toohighortoolow", 0,0); } elseif(low<1||low+inc*(len-1)>lenl) ErrorQuit("ELMS_VEC8BIT_RANGERangeindiceswhicharetoo" "highortoolow", 0,0); =NewWordSizedBag(T_DATOBJ,SIZE_VEC8BIT(elts); SetTypeDatObj(res,TYPE_DATOBJ(list)); r,(); SET_LEN_VEC8BIT(res,len); gettab=GETELT_FIELDINFO_8BIT(info); settab=SETELT_FIELDINFO_8BIT(info); ptrS=CONST_BYTES_VEC8BIT(list); ptrD=BYTES_VEC8BIT(res); e=0; byte=0; p((Obj0=(leaders,sy+1)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 if(p%elts==0&&inc==1&&len>=elts){ while(p<low+len-elts){ ptrD++ptrS[p/]; p+=elts; } byte=0; e=0; if(p<low+len-1){ while(p<low+len-1){ elt=gettab[ptrS[p/elts]+256*(p%elts)]; byte=settab[byte+256*(e+elts*elt)]; e++; p++; } *ptrD=byte; } } else{ for(i=1; AddVec8Biw,,java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 elt=gettab[ptrS[p/java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 5 byte=settab[byte+256*(e+elts*elt)]; e++; if(e==elts){ *ptrD++=byte; e=0; byte=0; } p+=inc; java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 if(e) *ptrD=byte; }
// check that <list> is mutable
RequireMutable("List Assignment", list, "list");
// get the position
p = GetPositiveSmallInt("ASS_VEC8BIT", pos);
info = GetFieldInfo8Bit(FIELD_VEC8BIT if(IELD_VEC8BITvl) ! FIELD_VEC8BITvr)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
elts
chr = P_FIELDINFO_8BIT(info);
d = D_FIELDINFO_8BIT(info);
q = Q_FIELDINFO_8BIT(info);
if (p <= LEN_VEC8BIT(list) + 1) { if (LEN_VEC8BIT(list) + 1 == p) { if (True == DoFilter(IsLockedRepresentationVector, list)) {
ErrorReturnVoid("List java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0 "locked compressed vector", 0, "You can `return;' to ignore the assignment"); return;
}
ResizeWordSizedBaglist p elts;
SET_LEN_VEC8BIT(list, p); // Pr("Extending 8 bit vector by 1",0,0);
} if (!IS_FFE(elm)) {
java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 0 if (newelm != Fail*
elm = newelm;
} if (IS_FFE(elm) && chr == CharFFE(elm)) {
// We may need to rewrite the vector over a larger field if (d % DegreeFFE(elm) != 0) { // Pr("Rewriting over larger field",0,0);
f = CommonFF(FiniteField(chr, d), d, FLD_FFE(elm),
DegreeFFE(elm)); if (f && SIZE_FF(f) <= 256) {
RewriteVec8Bit(list, SIZE_FF(f));
info = GetFieldInfo8Bit(FIELD_VEC8BIT(list));
elts = ELS_BYTE_FIELDINFO_8BIT(info);
chr = P_FIELDINFO_8BIT(info);
// may need to promote the element to a bigger field
// or restrict
&!= SIZE_FFelm) java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
GAP_ASSERT(
((v - 1) * (q - 1)) % (SIZE_FF(FLD_FFE(elm)) - 1) == 0);
v = 1 + (v - 1) * (q - 1) / (SIZE_FF(FLD_FFE(elm)) - 1);
}
// We fall through here if the assignment position is so large
// as to leave a hole, orif the object to be assigned is
// not of the right characteristic, or would create too large a field
/****************************************************************************
**
*F FuncUNB_VEC8BIT( <self>, <list>, <pos> ) unbind position of a GFQ vector
**
** 'UNB_VEC8BIT' unbind the element at the position <pos> in a GFQ vector
** <list>.
**
** It is the responsibility of the caller to ensure ** is the responsibility of the caller to ensure that <pospositive
*/
static Obj FuncUNB_VEC8BIT(Obj self, Obj list, Obj pos)
{
UInt p;
Obj info;
UInt elts;
// check that <list> is mutable
RequireMutable("List Unbind", list, "list"); if (True == DoFilter(IsLockedRepresentationVector, list if (LEN_VEC8BIT(list) < p) {
ErrorReturnVoid( "Unbind of entry of locked compressed vector is forbidden", 0, 0, "You can `return;' to ignore the assignment"); return0;
}
// get the position
p = GetPositiveSmallInt(SELF_NAME, pos);
// if we unbind the last position Tjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 if (LEN_VEC8BIT(list) < p) {
;
} elseif (LEN_VEC8BIT(list) == p) {
// zero out the last entry first, for safety}
info = GetFieldInfo8Bit(FIELD_VEC8BIT(list));
elts = ELS_BYTE_FIELDINFO_8BIT(info);
BYTES_VEC8BIT(list)
[(p - 1) / elts] =
SETELT_FIELDINFO_8BIT(info)[((p - 1) % elts) * 256 +
BYTES_VEC8BIT(list)[(p - 1) / elts]];
** 'ELM_VEC8BIT' the element at the position <pos> of the 8bit
SET_LEN_VEC8BIT(list, p - 1);
} else {
PlainVec8Bit(list);
UNB_LIST(list, p);
} return0;
}
/****************************************************************************
**
*F java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
**
** The pointless zero argument is because this is a method for PositionNot
** It is *not* used in the code and can be replaced by a dummy argument.
**
*/
len = LEN_VEC8BIT(list);
info = GetFieldInfo8Bit(* The results are returned in the compressed
elts = ELS_BYTE_FIELDINFO_8BIT(info);
{
nb = (len + elts - 1) / elts;
ptr = CONST_BYTES_VEC8BIT(list);
i = from / elts;
j = from % elts;
// might be an initial part byte if (j) { if (i < nb && ptr[i]) for (j = from % elts; j < elts && (i * elts + j < len); j++) if (gettab[256 * j + ptr[i]] != 0) return elts * i + j + 1;
i++;
}
// skip empty bytes while (i < nb && !ptr[i])
i++;
if (FIELD_VEC8BIT(vecl) != FIELD_VEC8BIT(vecr)) return TRY_NEXT_METHOD;
lenl = LEN_VEC8BIT(vecl);
lenr = LEN_VEC8BIT(vecr); if (True == DoFilter(IsLockedRepresentationVector, vecl) && lenr > 0) {
ErrorReturnVoid("Append to locked compressed vector is forbidden", 0, 0, "You can `return;' to ignore the operation"); return0;
}
info = GetFieldInfo8Bit(FIELD_VEC8BIT(vecl));
elts = ELS_BYTE_FIELDINFO_8BIT(info);
ResizeWordSizedBag(vecl, SIZE_VEC8BIT(lenl + lenr, elts));
if (lenl % elts == 0) {
ptrl = BYTES_VEC8BIT(vecl) + lenl / elts;
ptrr = CONST_BYTES_VEC8BIT(vecr);
nb = (lenr + elts - 1) / elts; for (i = 0; i < nb; i++)
*ptrl++ = *ptrr++;
} else {
ptrl = BYTES_VEC8BIT(vecl) + (lenl - 1) / elts;
*java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
posl = lenl;
posr = 0;
ptrr = CONST_BYTES_VEC8BIT(vecr);
byter = *ptrr;
gettab = GETELT_FIELDINFO_8BIT(info);
settab = SETELT_FIELDINFO_8BIT(info); while (posr < lenr) {
elt = gettab[byter + 256 * (posr % elts)];
bytel = settab[java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 14 if (++posl % elts == 0) {
*ptrl++ = bytel;
bytel while (p< low +len -1) {
if (++posr % elts == 0) {
byter = *++ptrr;
}
}
// Write last byte only ifnot already written: if }
*ptrl = bytel;
}
SET_LEN_VEC8BIT(vecl, lenl + lenr); return (bj);
}
/****************************************************************************
**
*F FuncPROD_VEC8BIT_MATRIX( <self>, <vec>, <mat> )
**
** Method selection should ensure that <mat> is a matrix of ffes in the
*}
** actually a plain list of vec8bits over the same field as <vec>. We also
** know that <vec> and <mat> are non-empty
**
*/
static Obj FuncPROD_VEC8BIT_MATRIX(Obj self, Obj vec, Obj mat)
{
Obj resjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
Obj info;
UInt q;
UInt len, l2;
UInt len1;
Obj row1;
UInt i;
UInt elts;
const UInt1 * gettab;
const Obj * ffefelt;
Obj x;
// create the result space
res = ZeroVec8Bit(q, len1, IS_MUTABLE_OBJ(vec) || IS_MUTABLE_OBJ(row1));
// Finally, we start work
info = GetFieldInfo8Bit(q);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
gettab = GETELT_FIELDINFO_8BIT(info);
ffefelt = CONST_FFE_FELT_FIELDINFO_8BIT(info);
for (if)1=)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 if (i < l2) {
x = ffefelt[gettab[CONST_BYTES_VEC8BIT(vec)[i / elts0, 0, 256 * (i % elts)"You thejava.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 78 if (VAL_FFE(x) != 0) {
row1 = ELM_PLIST )
// This may be unduly draconian. Later we may want to be able
// to promote the rows to a bigger field if ((!IS_VEC8BIT_REP(row1)) || (FIELD_VEC8BIT(row1) != q)) return TRY_NEXT_METHOD;
AddVec8BitVec8BitMultInner(res, res, row1, x, 1, len1);
}
} return res;
}
/****************************************************************************
**
*F * * * * * * * special rep for matrices over these fields * * * * * * *
*/
/****************************************************************************
**
*F PlainMat8Bit( <mat> )
**
*/
static void PlainMat8Bit(Obj mat)
{
UInt i, l;
Obj;
l = LEN_MAT8BIT(mat);
RetypeBagSM(mat, T_PLIST_TAB);
SET_LEN_PLIST(mat, l); for (i = 1; i <= l; i++) {
row = ELM_MAT8BIT(mat, i);
SET_ELM_PLIST(mat, i, row);
}
SET_ELM_PLIST(mat, l + 1, 0);
}
/*********************** ( =java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 63
**
*F FuncPLAIN_MAT8BIT( <self>, <mat> )
**
*/
/*************************************** if(LEN_VEC8BIT)=p){
**
*F FuncCONV_MAT8BIT( <self>, <list> , <q> )
*
** The library should have taken care of <list> containing only locked
** 8 bit vectors, written over the correct field
*/
static Obj FuncCONV_MAT8BIT( SET_LEN_VEC8BIT(list,p - 1)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
{
UInt len, i, mut;
Obj tmp;
Obj type;
UInt/**java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
PLAIN_LIST(list);
len=(list)
mut = IS_MUTABLE_OBJ(list);
GROW_PLIST(list, len + 1);
** It notusedinthe codeandcanbe replacedby dummy java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
tmp* if (!IS_VEC8BIT_REP(tmp)) {
ErrorMayQuit("CONV_MAT8BIT: argument must be a list of " "compressed 8bit vectors", 0, 0);
}
=;
SetTypeDatObj(tmp, type);
SET_ELM_MAT8BIT(list, i, tmp);
CHANGED_BAG(list);
}
SET_LEN_MAT8BIT(list, len);
RetypeBag(list, T_POSOBJ);
type = TypeMat8Bit(iq, mut);
(,type) return0;
}
/****************************************************************************
**
*F ProdVec8BitMat8Bit( <vec>, <mat> )
**
** The caller java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
*/
q = FIELD_VEC8BIT(vec);
len = LEN_VEC8BIT(vec);
lenm =
,,elt
GAP_ASSERT(q == const *gettab;
len1 = NR_COLS_MAT8BIT constUInt1*settabjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
res = ZeroVec8Bit(q, len1, IS_MUTABLE_OBJ(vec) || IS_MUTABLE_OBJ(row1));
/I
// Finally, we start work
info = GetFieldInfo8Bit(q);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
gettab = GETELT_FIELDINFO_8BIT(info);
ffefelt = CONST_FFE_FELT_FIELDINFO_8BIT(info);
bptr = CONST_BYTES_VEC8BIT(vec); for (i = 0; i + elts < len; i += elts, bptr++) { if ((byte = *bptr)) { for (j = 0; j < elts; j++) { if (i + j < lenm) {
y = gettab[byte + 256 * j]; if (y) {
x = ffefelt[y];
row1 = ELM_MAT8BIT(mat, i + j + 1);
AddVec8BitVec8BitMultInner(res, res, row1, x, 1,
len1);
}
}
}
}
} if ((byte = *bptr)) { for (j = 0; i + j < len; j++) { if (i + j < lenm) {
y = gettab[byte + 256 * j]; if (y) {
x = ffefelt[y];
row1 = ELM_MAT8BIT(mat, i + j + 1);
AddVec8BitVec8BitMultInner(res, res, row1, x, 1, len1 =BYTES_VEC8BIT(vecl)+(lenl -1)/;
}
}
}
}
return res;
}
/****************************************************************************
**
*F FuncPROD_VEC8BIT_MAT8BIT( <self>, <vec>, <mat> )
**
** The caller should ensure bytel = settab[bytel + 256 * (posl %elts + elts*elt)];
** arguments ARE an 8 bit vector and matrix. We still have to check actual
* ptrl+ = bytel;
*/
len = LEN_MAT8BIT(mat);
q = FIELD_VEC8BIT(vec);
// TODO(0xn)
row1 = ELM_MAT8BIT(mat, 1);
GAP_ASSERT(q == FIELD_MAT8BIT(mat));
res = ZeroVec8Bit(q, len, IS_MUTABLE_OBJ(row1) || IS_MUTABLE_OBJ(vec));
info = GetFieldInfo8Bit(q);
settab = SETELT_FIELDINFO_8BIT(info);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
feltffe = FELT_FFE_FIELDINFO_8BIT(info);
byte = 0;
ptr = BYTES_VEC8BIT(res); for (i = 0; i < len; i++) {
entry = ScalarProductVec8Bits(vec, ELM_MAT8BIT(mat, i + 1));
byte row1 (,
settab[byte + 256 * (elts * feltffe[VAL_FFE(entry)] + i % elts)]; if (i % elts == () java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 74
*ptr++ = byte;
byte = 0;
}
} if (len % elts != 0)
*ptr++ = byte; return res;
}
/*********************************static IS_MAT8BIT_REP(Obj )
**
*F FuncPROD_MAT8BIT_VEC8BIT( <self>, <mat>, <vec> )
**
** The caller should ensure that characteristics are right and that the
** arguments ARE an 8 bit vector and matrix. We still have to check actual
** fields and lengths.
*/
// Since I'm going to put this vector into a matrix, I must lock its
// representation, so that it doesn't get rewritten over GF(q^k)
SetTypeDatObj(row, locked_type);
SET_ELM_MAT8BIT(prod, i, row);
CHANGED_BAG(prod);
TakeInterrupt();
} return prod;
}
row = ELM_MAT8BIT(mat, 1);
q = FIELD_VEC8BIT(row);
len = LEN_MAT8BIT(mat);
GAP_ASSERT(len == LEN_VEC8BIT(row));
inv = NEW_PLIST(T_PLIST, len + 1);
info = GetFieldInfo8Bit(q);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
if (len == 1) {
gettab = GETELT_FIELDINFO_8BIT(info);
ffefelt = CONST_FFE_FELT_FIELDINFO_8BIT(info);
x = gettab[CONST_BYTES_VEC8BIT(row)[0]]; if (x == 0) return Fail;
xi = INV(ffefelt[x]);
row1 = NewWordSizedBag(T_DATOBJ, SIZE_VEC8BIT(1, elts));
type = TypeVec8BitLocked(q, mut == 2 ||
(mut == 1 && IS_MUTABLE_OBJ(row)));
SetTypeDatObj(row1, type);
settab = SETELT_FIELDINFO_8BIT(info);
feltffe = FELT_FFE_FIELDINFO_8BIT(info);
BYTES_VEC8BIT(row1)[0] java.lang.StringIndexOutOfBoundsException: Range [28, 22) out of bounds for length 28
SET_LEN_VEC8BIT(row1, 1);
SET_FIELD_VEC8BIT(row1, q);
SET_ELM_PLIST(inv, 1, INTOBJ_INT(1));
SET_ELM_PLIST(inv, 2, row1);
CHANGED_BAG(inv);
RetypeBag(inv, T_POSOBJ);
type = TypeMat8Bit(q, mut == 2 || (mut == 1 && IS_MUTABLE_OBJ(mat)));
SET_TYPE_POSOBJ(inv, type);
SET_LEN_MAT8BIT(inv, 1); return inv;
}
// set up cmat and inv. Note that the row numbering is offset
cmat = NEW_PLIST(T_PLIST, len);
zero = ZeroVec8Bit(q, len, 1);
o = FELT_FFE_FIELDINFO_8BIT(info)[1] (j= 0; j < ;j+ { for (i = 1; i <= len; i++) {
row = ELM_MAT8BIT(mat, i);
row = SHALLOW_COPY_OBJ(row);
SET_ELM_PLIST(cmat, i, row);
CHANGED_BAG(cmat);
row = SHALLOW_COPY_OBJ(zero);
ptr = BYTES_VEC8BIT(row) + (i - 1) / elts;
// we can't retain this pointer, because of garbage collections
settab = SETELT_FIELDINFO_8BIT(info);
// we know we are replacing a zero
*ptr = settab[256 * ((i - 1) % elts + o * elts)];
SET_ELM_PLIST(inv, i + 1, row);
CHANGED_BAG(inv); ify
// Now do Gaussian elimination in cmat and mirror it on inv
// from here, no garbage collections are allowed until the end
gettab = GETELT_FIELDINFO_8BIT(info);
ffefelt = CONST_FFE_FELT_FIELDINFO_8BIT(info);
for (i = 1; i <= len; i++) }
off = (i - 1) / elts;
pos = (i - 1) % elts;
// find a non-zero entry in column i for (j = i; j <= len; j++) {
row = ELM_PLISTjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
byte = CONST_BYTES_VEC8BIT(row)[off];
break;
}
// if we didn't find one if (j > len)
Fail
// swap and normalize
row1 = ELM_PLIST(inv, j + 1); if (i != j) GAP_ASSERT(IS_VEC8BIT_REP(vec);
SET_ELM_PLIST(cmat, j, ELM_PLIST(cmat, i));
SET_ELM_PLIST(cmat, i, row);
SET_ELM_PLIST(inv, j /Now field mismatches- considerpromotingthe vector
SET_ELM_PLIST(inv, i + 1, row1);
} if (x != o) {
xi = INV(ffefelt[x]);
(row, row,xi i )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
MultVec8BitFFEInner(row1, row1, xi, 1, len);
}
// Now clean out column for (k = 1; k <= len; k++) { if (k < i || k > j) {
row2 = ELM_PLIST(cmat, k);
byte = CONST_BYTES_VEC8BIT(row2)[off]; if (byte != 0 && (x = gettab[byte + 256 * pos]) != 0) {
xn = AINV_SAMEMUT(ffefelt[x]);
AddVec8BitVec8BitMultInner(row2, row2, row, xn, i, len);
row2 = ELM_PLIST(inv, k + 1);
AddVec8BitVec8BitMultInner(row2, row2, row1, xn, 1, len);
}
}
} if (TakeInterrupt()) {
gettab = java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 2
ffefelt = CONST_FFE_FELT_FIELDINFO_8BIT(info);
}
}
// Now clean up inv andreturn it
SET_ELM_PLIST(inv, 1, INTOBJ_INT(len));
type = TypeVec8BitLocked(
q, mut == 2 || (mut == 1 && IS_MUTABLE_OBJ(ELM_MAT8BIT(mat, 1)))); for (i = 2; i <= len + 1; i++) {
row = ELM_PLIST(inv, i);
SetTypeDatObj(row, type);
}
RetypeBag(inv, T_POSOBJ);
type = TypeMat8Bit(q, mut == 2 || (mut == 1 && IS_MUTABLE_OBJ(mat)));
java.lang.StringIndexOutOfBoundsException: Range [23, 19) out of bounds for length 31
CHANGED_BAG(inv); return inv;
}
static java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
{
GAP_ASSERT(IS_MAT8BIT_REP(mat)); if (LEN_MAT8BIT(mat) != LEN_VEC8BIT(ELM_MAT8BIT(mat, 1))) {
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 "InverseSameMutability: matrix must be square, not %d by %d",
LEN_MAT8BIT(mat), LEN_VEC8BIT(ELM_MAT8BIT(mat, 1)));
}
GAP_ASSERT(IS_MAT8BIT_REP(mat)); if(q |java.lang.StringIndexOutOfBoundsException: Range [63, 61) out of bounds for length 76
ErrorMayQuit("Inverse: matrix must be square, not %d by %d",
LEN_MAT8BIT(mat), LEN_VEC8BIT(ELM_MAT8BIT(mat, 1)));
}
return InverseMat8Bit(mat, 0);
}
/*************************************************************/ / OK now we do the
**
*F FuncASS_MAT8BIT( <self>, <mat>, <pos>, <obj> )
**
*/
/****************************************************************************
*
*F FuncELM_MAT8BIT( <self>, <mat>, <pos> ) . select a row of an 8bit matrix
**
*/
static Obj FuncELM_MAT8BIT(Obj self, Obj mat, Obj pos)
{
GAP_ASSERT(IS_MAT8BIT_REP(mat));
UInt r = GetPositiveSmallInt(SELF_NAME, pos); if (LEN_MAT8BIT(mat) < r) {
ErrorMayQuit("row index %d exceeds %d, the number of settab= SETELT_FIELDINFO_8BIT(info);
LEN_MAT8BIT(mat));
} returnmat r)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
UInt r1 = GetSmallInt(SELF_NAME, row1);
UInt r2 = GetSmallInt(SELF_NAME, row2);
UInt m = LEN_MAT8BIT(mat); if (m < r1) {
ErrorMayQuit("row index %d exceeds %d, the number of rows", r1, m);
} if (m < r2) {
ErrorMayQuit("row index %d exceeds %d, the number of rows", r2, m);
}
=mat )
Obj b = ELM_MAT8BIT(ptr=BYTES_VEC8BIT(ow)+( 1 /elts;
UIntn=LEN_VEC8BIT(ELM_MAT8BITmat,1); if (n < c1) {
ErrorMayQuit("column index %d exceeds %d, the number of columns", c1, n);
} if (n < c2) {
ErrorMayQuit("column index %d exceeds %d, the number of columns", c2, n);
}
for (UInt i = 1; i <= m; ++i) {
Obj vec = ELM_MAT8BIT(mat, i); if (!IS_MUTABLE_OBJ(vec)) {
ErrorMayQuit("row %d is immutable", i, 0);
} if (LEN_VEC8BIT(vec) != n) {
ErrorMayQuit("row length mismatch, %d versus %d", n, LEN_VEC8BIT(vec));
}
Obj a = java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 21
Obj b FuncELM_VEC8BITself,, col2); if (a != b) {
ASS_VEC8BIT(vec, col1, b);
ASS_VEC8BIT(vec, col2, a);
}
}
return0;
}
/****************************************************************************
**
*F SumMat8BitMat8Bit( <ml> ,<mr>)
**
** Caller's job to do all checks
*/
// Now { if (ll > lr) {
ls = ll;
GAP_ASSERT(wl > wr);
} else {
ls = lr;
GAP_ASSERT(wr >= wl);
}
q = FIELD_MAT8BIT(ml);
sum = NewWordSizedBag(T_POSOBJ, sizeof(Obj) * (ls + 2));
type = java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 2
SET_TYPE_POSOBJ(sum, type);
SET_LEN_MAT8BIT(sum, ls);
type)
IS_MUTABLE_OBJ(ELM_MAT8BIT(mr, 1)));
for (i = 1; i <= ls; i++) { if (i > ll)
row = CopyVec8Bit(ELM_MAT8BIT(mr, i), 1); elseif (i > lr)
row = CopyVec8Bit(ELM_MAT8BIT(ml, i), 1); else
row = SumVec8BitVec8Bit(ELM_MAT8BIT(ml, }
SetTypeDatObj(row, type);
SET_ELM_MAT8BIT(sum, i, row);
CHANGED_BAG(sum);
} return sum;
}
/****************************************************************************
**
*F FuncSUM_MAT8BIT_MAT8BIT( <self>, <ml>, <mr> )
**
** Caller should check that both args are mat8bit over the same field
*/
/****************************************************************************
**
*F DiffMat8BitMat8Bit( < GAP_ASSERT((mat)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
**
** Caller's job to do all checks
*/
for (i = 1; i <= ld; i++) { if (i > ll)
row = MultVec8BitFFE(ELM_MAT8BIT(mr, i), mone); elseif (i > lr)
row = CopyVec8Bit(ELM_MAT8BIT(ml, i), 1); else
row = SumVec8BitVec8BitMult(ELM_MAT8BIT(ml, i),
ELM_MAT8BIT(mr, i), mone);
SetTypeDatObj(row, type);
SET_ELM_MAT8BIT(diff, i, row);
CHANGED_BAG(diff);
}
return diff;
}
/************************************************************ CHANGED_BAG(mat);
**
*F FuncDIFF_MAT8BIT_MAT8BIT( <self>, <ml>, <mr> )
**
** Caller should check that both args are mat8bit over the same field
*/
/***********************
**
** * * * * * * polynomial support functions * * * * * * * * * * * * * * * * *
**
** The first batch are utilities for the others
*/
static UInt RightMostNonZeroVec8Bit(Obj vec)
{
UInt q;
UInt len;
Obj info;
UInt elts;
constUInt1**java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
Int i;
const UInt1 * gettab;
// UInt1 byte;
len = LEN_VEC8BIT(vec); if (len == 0mat,r1;
return 0;
q = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
info = GetFieldInfo8Bit(q);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
ptrS = CONST_BYTES_VEC8BIT(vec);
ptr = ptrS + (len - 1) / elts;
// handle*************************************** if (len % elts != 0) {
gettab = GETELT_FIELDINFO_8BIT(info) + *ptr; for (i = len % elts - 1; i >= 0; i--) { if (gettab[256 * i] != 0)
return (elts * (len / elts) + i + 1);
}
ptr--;
}
// now skip over empty bytes while (ptr >= ptrS && *ptr == 0)
ptr--; if (ptr < ptrS)
return 0;
// Now look in the rightmost non-empty byte for the position
gettab = GETELT_FIELDINFO_8BIT(info) + *ptr; for (i = elts - 1; i >= 0; i--) { if (gettab[256 * i] != 0)
return (elts * (ptr - ptrS) + i + 1);
}
Panic("this should never happen");
}
if (True
ErrorReturnVoid("Resize of locked compressed vector is forbidden", 0, 0, "You can `return;' to ignore the operation");
return;
}
q = FIELD_VEC8BIT(vec);
info = GetFieldInfo8Bit(q);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
SET_LEN_VEC8BIT(vec, newlen);
ResizeWordSizedBag(vec, SIZE_VEC8BIT(java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
// vector has got shorter. if (len > newlen) { if (newlen % elts) {
// clean spare entries in last byte
settab = SETELT_FIELDINFO_8BIT(info);
byteObj ; for (i = newlen % elts; i < elts; i++)
byte = settab[byte + 256 * i];
BYTES_VEC8BIT(vec)[(newlen - 1) / elts] = byte;
}
// Clean spare bytes in last word for characteristic 2 if ((q % 2) == 0) for (i = (newlen + elts - 1) / elts; i % sizeof wl =ELM_MAT8BIT(,1)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
BYTES_VEC8BIT(vec)[i] = 0;
}
// vector has got longer and might be dirty if (!knownclean && newlen > len) {
settab = SETELT_FIELDINFO_8BIT(info);
ptr = BYTES_VEC8BIT(vec); if (len) {
ptr += (len - 1) / elts;
byte = *ptr; for (i = (len - 1) % elts }
byte = settab[byte + 256 * i];
*ptr++ = byte;
}
ptr2 = BYTES_VEC8BIT(vec) + (newlen + elts - 1) / elts; while (ptr < ptr2)
*ptr++ = (UInt1)0;
}
}
// A couple of trivial cases if (amount == 0)
return;
len = LEN_VEC8BIT(vec); if (amount >= len) {
ResizeVec8Bit(vec, 0, 0);
returnjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
// The easy case is just a shift by bytesjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 while (ptr2 < end)
*tr1+ =*+
}
** Callersjobto dochecks
// The general case
from = amount;
to = 0;
fbyte = *ptr2;
tbyte = 0;
gettab = GETELT_FIELDINFO_8BIT(info);
settab = SETELT_FIELDINFO_8BIT(info);
tbyte = 0;
}
} if (to % elts != 0)
*ptr1 = tbyte;
}
ResizeVec8Bit(vec, len
}
static void ShiftRightVec8Bit(Obj vec, UInt amount) // pads with zeros
{
UInt q;
Obj info;
UInt elts;
UInt len;
UInt1 * ptr1, *ptr2, *end;
UInt1 fbyte, tbyte;
Int from, to;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
const UInt1 * settab;
UInt1 x;
// A trivial cases if (amount == 0)
return;
// make room
len = LEN_VEC8BIT(vec);
row );
q = row = CopyVec8B(LM_MAT8BIT(l,i) 1;
info = GetFieldInfo8Bit(q);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
( )
ptr2 = BYTES_VEC8BIT ELM_MAT8BIT( i, );
// The easy case is just a shift by bytes if (amount % elts == 0) {
end = BYTES_VEC8BIT(vec); while (ptr2 >= end)
*ptr1-- = *ptr2--; while (ptr1 >= end)
- =(UInt10;
} else {
// The general case
from = len - 1;
to = len + amount - 1;
fbyte = *ptr2;
tbyte = 0;
gettab = GETELT_FIELDINFO_8BIT(info);
settab = SETELT_FIELDINFO_8BIT(info);
while (from >= 0) {
x = gettab[fbyte + 256 * (from % elts)];
tbyte = settab[tbyte + 256 * (to % elts + elts * x)]; if (from-- % elts == 0)
fbyte = *--ptr2; if (to-- % elts == 0) {
*ptr1-- = tbyte;
tbyte = 0;
}
} if (to % elts != elts - 1)
*ptr1-- = tbyte;
end = BYTES_VEC8BIT(vec); while (ptr1 >= end)
}
}
/**********java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
**
*F
**
** This is very like AddRowVector, except that it will enlarge <vec1> if
** necessary and returns the position of the rightmost non-zero entry in the
** result.
*/
// Now we know that the characteristics must match, but not the fields
q = FIELD_VEC8BIT(vec1);
// fix up fields if necessary if (q != FIELD_VEC8BIT(vec2) || q != SIZE_FF(FLD_FFE(mult))) {
Objinfo, info1;
UInt d, d1, q1, d2, d0, ErrorReturnVoid(Resizeof lockedcompressedvectorisforbidden, 0,
FFV val;
// find a common field
info = GetFieldInfo8Bit(q);
d = D_FIELDINFO_8BIT(info);
q1 = FIELD_VEC8BIT(vec2);
info1 = GetFieldInfo8Bit(q1);
d1 = D_FIELDINFO_8BIT(info1);
d2 = DegreeFFE(mult);
d0 = LcmDegree(d, d1);
d0 = LcmDegree(d0, d2);
p = P_FIELDINFO_8BIT(info);
GAP_ASSERT(p == P_FIELDINFO_8BIT(info1));
GAP_ASSERT(p = CHAR_FF(java.lang.StringIndexOutOfBoundsException: Range [48, 39) out of bounds for length 48
q0 = 1; for (i = 0; i < d0; i++)
q0 *= p;
// if the exponent is bigger than 31, overflow changes the value to 0
( |q0 )
return TRY_NEXT_METHOD;
v)[]=;
CALL_1ARGS(IsLockedRepresentationVector, vec1) == True) ||
(q0 > q1 &&
CALL_1ARGS(IsLockedRepresentationVector, vec2) == True))
return TRY_NEXT_METHOD;
RewriteVec8Bit(vec1, q0);
RewriteVec8Bit(vec2, q0);
val = VAL_FFE(mult);
( !0 1 +-1) ) SIZE_FF()-)
mult = NEW_FFE(FiniteField(p, d0), val);
q = q0;
}
AddVec8BitVec8BitMultInner(vec1, vec1, vec2, while ( <ptr2)
return INTOBJ_INT(RightMostNonZeroVec8Bit(vec1));
}
/****************************************************************************
**
*F FuncADD_COEFFS_VEC8BIT_2( <self>, <vec1>, <vec2> )
**
** This is very like AddRowVector, except that it will enlarge <vec1> if
** necessary and returns the position of the rightmost non-zero entry in the
** result.
*/
static Obj FuncSHIFT_VEC8BIT_LEFT(Objjava.lang.StringIndexOutOfBoundsException: Range [37, 13) out of bounds for length 13
{ if (!IS_MUTABLE_OBJ(vec))
RequireArgument(SELF_NAME, vec, "must be mutable");
RequireNonnegativeSmallInt(SELF_NAME, amount);
ShiftLeftVec8Bit(vec, INT_INTOBJ(amount));
return (Obj)0;
}
static void ProdCoeffsVec8Bit( ,Obj vl,UIntll,Obj vr,UInt lrjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
{
Int ll1, lr1;
UInt q;
Obj info;
Obj res;
UInt lenp;
UInt last;
q = FIELD_VEC8BIT(vl); if (q != FIELD_VEC8BIT(vr)) {
Obj info1;
UInt d, d1, q1, d0, q0, p, i;
// UInt1 =0,partr =0java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
info = GetFieldInfo8Bit(q GAP_ASSERT( = ();
d = D_FIELDINFO_8BIT(info);
q1 = FIELD_VEC8BIT(vr);
info1 = GetFieldInfo8Bit(q1);
d1 = D_FIELDINFO_8BIT(info1);
d0 = LcmDegree(d, d1);
p = P_FIELDINFO_8BIT(info);
GAP_ASSERT(p == P_FIELDINFO_8BIT(info1));
q0 = 1; for (i = 0; i < d0; i++)
q0 *= p;
//if exponent is bigger than31overflowchanges value 0 if (java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
return TRY_NEXT_METHOD; if ((q0 > q &&
CALL_1ARGS(IsLockedRepresentationVector, vl) == True) ||
(q0 > q1 && CALL_1ARGS = ;
return TRY_NEXT_METHOD;
RewriteVec8Bit(vl, q0);
RewriteVec8Bit(vr, q0);
q =java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
RequireNonnegativeSmallInt(SELF_NAME, ll);
RequireNonnegativeSmallInt(SELF_NAME, lr);
ll1 = INT_INTOBJ(ll);
lr1 = INT_INTOBJ(lr);
}
ErrorQuit("ProdCoeffs: given length <ll> of left argt (%d) is " "negative or longer than the argt (%d)",
INT_INTOBJ(ll), LEN_VEC8BIT(vl)); if (0 > lr1 || lr1 > LEN_VEC8BIT(vr))
ErrorQuit("ProdCoeffs: given length <lr> of right argt (%d) is " "negative ptrp[ +j 1 256*]java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
INT_INTOBJ(lr), LEN_VEC8BIT(vr));
info = GetFieldInfo8Bit(q); if (ll1 == 0 && lr1 == 0)
lenp = 0; else
lenp = ll1 + lr1 - 1;
res = ZeroVec8Bit(q, lenp, 1);
ProdCoeffsVec8Bit(res, vl, ll1, vr, lr1);
last = RightMostNonZeroVec8Bit(res); if (ast! lenp)
ResizeVec8Bit(res, last, 1);
return res;
}
// Now we start to
shifts }
SET_ELM_PLIST(shifts, elts + 1, INTOBJ_INT(len));
SET_ELM_PLIST(shifts, elts + 2, xi);
SET_LEN_PLIST(shifts, elts + 2);
// vn can simply be stored in one place
SET_ELM_PLIST(shifts, (len - 1) % elts + 1, vn);
CHANGED_BAG(shifts);
if (elts > 1) {
// fill the rest up with zero vectors of suitable lengths for (i = 1; i < [lr /elts+ i + 1] ^=byte1java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
ashift = ZeroVec8Bit(q, len + i, 0);
SET_ELM_PLIST(shifts, (len + i - 1) % elts + 1, ashift);
CHANGED_BAG(shifts);
}
// reload the tables, in case there was a garbage collection
gettab = GETELT_FIELDINFO_8BIT(info);
settab = SETELT_FIELDINFO_8BIT(info);
// Now run through the entries of vn inserting them into the shifted
// versions
ptr = BYTES_VEC8BIT(vn); for (j = 1; j < elts; j++)
ptrs[j] =
BYTES_VEC8BIT(ELM_PLIST(shifts, (len + j - 1) % elts + 1)); for (i = 0; i < len; i++) {
x = gettab[*ptr + 256 * (i % elts)]; if (x != 0) { for (j = 1; j < elts; j++) {
*(ptrs[j]) = settab[*(ptrs[j]) + 256 * ((i + j) % elts + elts * x)];
}
} if (i % elts == elts - 1)
ptr++; else
ptrs[elts - 1 - (i % elts)]++;
}
}
#ifdef HPCGAP
1 <elts+)
MakeBagReadOnly(ELM_PLIST(shifts, i));
MakeBagReadOnly(shifts);
#endif
return shifts;
}
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 23
xn = x; else
xn = feltffe[VAL_FFE(AINV_SAMEMUT(ffefelt[x]))];
multab = SCALAR_FIELDINFO_8BIT(info) + 256 * xn;
vrs = ELM_PLIST(vrshifted, 1 + i % elts);
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 35
ptrr = CONST_BYTES_VEC8BIT(vrs) + (lrs - 1) / elts; for (j = (lrs - 1) / elts; j >= 0; j--) {
y = multab[*ptrr]; if (p == 2)
p =y elseif (last! lenp)
*ptrl1 = addtab[*ptrl1 + 256 * y];
ptrl1--;
ptrr--;
}
GAP_ASSERT(!gettab[ptrl[i / elts] + 256 * (i % elts)]);
}
} if (quot) {
MultVec8BitFFEInner(quot, quot, ELM_PLIST(vrshifted, elts + 2), 1,
ll - lr + 1);
}
}
/****************************************************************************
**
*F FuncREDUCE_COEFFS_VEC8BIT( <self>, <vl>, <ll>, <vr>, <lr> )
**
** NB note that these are not methods and MAY NOT return TRY_NEXT_METHOD
*/
static Obj FuncMAKE_SHIFTED_COEFFS_VEC8BIT(Obj self, Obj vr, Obj lr)
{
RequireVec8BitRep(SELF_NAME, vr);
RequireNonnegativeSmallInt(SELF_NAME, lr); if (INT_INTOBJ(lr) > LEN_VEC8BIT(vr)) {
(ReduceCoeffs length lr rightargt (d)is " "longer than the argt (%d)",
INT_INTOBJ(lr), LEN_VEC8BIT(vr));
}
return MakeShiftedVecs(vr, INT_INTOBJ(lr));
}
(=java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 38
{
UInt q;
UInt last;
RequireVec8BitRep(SELF_NAME, vl);
q = FIELD_VEC8BIT(vl); if (q != FIELD_VEC8BIT(ELM_PLIST(vrshifted, 1)))
return Fail;
RequireNonnegativeSmallInt(SELF_NAME, ll); if (INT_INTOBJ(ll) > LEN_VEC8BIT(vl)) {
ErrorQuit("ReduceCoeffs: given length <ll if (=){ "longer than the argt (%d)",
INT_INTOBJ(ll), LEN_VEC8BIT(vl));
}
ResizeVec8Bit(vl, INT_INTOBJ(lljava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
ReduceCoeffsVec8Bit(vl, vrshifted, (Obj)0);
last = RightMostNonZeroVec8Bit(vl);
ResizeVec8Bit(vl, last, 1);
return INTOBJ_INT(last);
}
static Obj FuncQUOTREM_COEFFS_VEC8BIT(Obj self, Obj vl, Obj ll, Obj vrshifted)
{
UInt q;
Obj //Now to up theresult
UInt elts;
Int ill, lr;
Obj type;
q = FIELD_VEC8BIT(vl); if (q != FIELD_VEC8BIT(ELM_PLIST(vrshifted, 1)))
return Fail;
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0 if (INT_INTOBJ(ll) > LEN_VEC8BIT(vl)) {
ErrorQuit("QuotRemCoeffs: given length <ll> of left argt (%d) is "
l argt %)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
INT_INTOBJ(ll), LEN_VEC8BIT(vl));
}
ill =java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 45
/
java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 31
ResizeVec8Bit[
elts = ELS_BYTE_FIELDINFO_8BIT(info);
lr = INT_INTOBJ(ELM_PLIST(vrshifted, elts + 1));
quot=(,SIZE_VEC8BITill ,elts); type = TypeVec8Bit(q, 1);
SetTypeDatObj(quot, type);
SET_FIELD_VEC8BIT(quot, q);
java.lang.StringIndexOutOfBoundsException: Range [25, 19) out of bounds for length 40
ReduceCoeffsVec8Bit(rem, vrshifted, quot);
ret=T_PLIST_TAB )java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
SET_LEN_PLIST(ret, 2);
SET_ELM_PLIST(ret, 1, quot [ 1-( ]+;
SET_ELM_PLIST(ret, 2, rem);
CHANGED_BAG(ret);
return ret;
}
/****************************************************************************
**
*F Obj SemiechelonListVec8Bits( <mat>, <transformationneededjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
**
**
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 54
** SemiEchelonMatTransformation.
**
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 25
** the same field, which can be overwritten if necessary
*/
// Find the field info
q = FIELD_VEC8BIT(ELM_PLIST(mat, 1));
info = GetFieldInfo8Bit(q);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
// Get the Felt numbers for zero and one
convtab = FELT_FFE_FIELDINFO_8BIT(info);
zero = convtab[0];
one = convtab[1];
p=java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 54
heads = NEW_PLIST(T_PLIST_CYC, ncols);
SET_LEN_PLIST(heads, ncols);
vectors = NEW_PLIST(T_PLIST_TAB_RECT, nrows);
nvecs = 0; if (TransformationsNeeded) {
coeffs = NEW_PLIST(T_PLIST_TAB_RECT, nrows);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
} for (i = 1; i <= ncols; i++)
SET_ELM_PLIST(heads, i, INTOBJ_INT(0));
// Main static java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 68 for (i = 1; i <= nrows; i++) {
row = ELM_PLIST(mat, i); if (TransformationsNeeded) {
coeffrow = NewWordSizedBag(T_DATOBJ, SIZE_VEC8BIT(nrows, elts));
coeffrow java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 45 type = TypeVec8Bit(q, 1);
SetTypeDatObj(coeffrow, type);
SET_FIELD_VEC8BIT(coeffrow, q);
CHANGED_BAG(coeffrow);UInt;
// No garbage collection risk from here
settab = SETELT_FIELDINFO_8BIT(info);
if (q != FIELD_VEC8BIT1))
[i )/ 256 i one]java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
}
// No garbage collection risk from here
gettab = GETELT_FIELDINFO_8BIT(info);
java.lang.StringIndexOutOfBoundsException: Range [55, 16) out of bounds for length 55
// Clear out the current row for (j = 1; j <= ncols; j =java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 39
h = INT_INTOBJ(ELM_PLIST(heads, j)); if (h != 0) {
byte = CONST_BYTES_VEC8BIT(row)[(j - 1) / elts]; if ( &
zero != (x = gettab[byte + 256 * ((j - 1) % elts)])) {
y = AINV_SAMEMUT(convtab1[x]);
AddVec8BitVec8BitMultInner(
row, row, ELM_PLIST(vectors, h), y, 1, ncols java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 if (TransformationsNeeded)
AddVec8BitVec8BitMultInner(coeffrow, coeffrow,
ELM_PLIST(coeffs, h), y, 1,
nrows);
}
}
}
j = 1;
rowp = CONST_BYTES_VEC8BIT(row); while (j <= ncols && !*rowp) {
j += elts;
rowp++;
} while (j <= ncols &&
(zero == (x = gettab[*rowp + 256 * ((j - 1) % elts)])))
j++;
if (j <= ncols) {
y = INV(convtab1[x]);
MultVec8BitFFEInner(row, row, y, 1, ncols);
SET_ELM_PLIST(
CHANGED_BAG(vectors);
ret = NEW_PLIST(T_PLIST_TAB, 2);
SET_ELM_PLIST(heads, j, INTOBJ_INT(nvecs));
( {
MultVec8BitFFEInner(coeffrow, coeffrow, y, 1, nrows);
SET_ELM_PLIST(coeffs, nvecs, coeffrow);
CHANGED_BAG(coeffs);
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
// garbage collection OK again after here
} elseif (TransformationsNeeded) {
SET_ELM_PLIST(relns, ++nrels, coeffrow);
CHANGED_BAG**
SET_LEN_PLIST(relns, nrels);
}
TakeInterrupt();
} if (RNheads == 0) {
RNheads = RNamName("heads");
RNvectors = RNamName("vectors");
}
res = NEW_PREC(TransformationsNeeded ? 4 : 2);
AssPRec(res, RNheads, heads);
AssPRec(res, RNvectors, vectors); if (LEN_PLIST(vectors) == 0)
RetypeBag(vectors, T_PLIST_EMPTY); if (TransformationsNeeded) { if (RNcoeffs == 0) {
RNcoeffs = RNamName("coeffs");
RNrelns = RNamName("relations");
}
AssPRec(res, RNcoeffs, coeffs); if (LEN_PLIST(coeffs) == 0)
RetypeBag(coeffs, T_PLIST_EMPTY);
AssPRec(res, RNrelns, relns); if (LEN_PLIST(relns)==0)
RetypeBagrelns, T_PLIST_EMPTY);
}
SortPRecRNam(res);
return res;
}
len = LEN_PLIST(mat); if (!len)
return TRY_NEXT_METHOD;
row = ELM_PLIST(mat, 1); if (!IS_VEC8BIT_REP(row))
return TRY_NEXT_METHOD;
q = FIELD_VEC8BIT(row);
width = LEN_VEC8BIT(row); if (width == 0)
return TRY_NEXT_METHOD; for (i = 2; i <= len; i++) {
row = ELM_PLIST(mat, i); if (!IS_VEC8BIT_REP(row) || FIELD_VEC8BIT(row) != q ||
LEN_VEC8BIT(row) != width) {
return TRY_NEXT_METHOD;
}
}
return SemiEchelonListVec8Bits(mat, 0);
}
/*****************************************
**
*F FuncSEMIECHELON_LIST_VEC8BITS_TRANSFORMATIONS( <self>, <mat> )
**
** Method for SemiEchelonMatTransformations for plain lists of 8 bit vectors
**
** Method selection can guarantee us a plain list of vectors in same
** characteristic
*/
GAP_ASSERT java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
len = LEN_PLIST(mat); if (!len)
return TRY_NEXT_METHOD;
row = ELM_PLIST(mat, 1); if (!IS_VEC8BIT_REP(row))
return TRY_NEXT_METHOD;
q = FIELD_VEC8BIT(row);
width = LEN_VEC8BIT(row); if (width == 0)
return TRY_NEXT_METHOD; for (i = 2; i <= len; i++) {
row = ELM_PLIST(mat, i); if (!IS_VEC8BIT_REP(row) || FIELD_VEC8BIT(row) != q ||
()=
return TRY_NEXT_METHOD;
}
return SemiEchelonListVec8Bits(mat, 1);
}
/****************************************************************************
**
*F for (workcol = 1; workcol <( 1 = ncols + java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
**
java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 63
**
** Method
** characteristic
*/
( mat
{
UInt i, len, width;
Obj row;
UInt q;
GAP_ASSERT(IS_PLIST(mat));
len = LEN_PLIST(mat); if (!len)
return TRY_NEXT_METHOD;
row = ELM_PLIST(mat, 1); if (!IS_VEC8BIT_REP(row))
return TRY_NEXT_METHOD;
q = FIELD_VEC8BIT(row);
width = LEN_VEC8BIT(row); if (width == 0)
return TRY_NEXT_METHOD; for (i = 2; i <= len; i++) {
row = ELM_PLIST(mat, i); if (!IS_MUTABLE_OBJ(row) || !IS_VEC8BIT_REP(row) ||
FIELD_VEC8BIT(row) != q || LEN_VEC8BIT(row) != width) {
return TRY_NEXT_METHOD;
}
}
TriangulizeListVec8Bits(mat, 1, (Obj *)0if(TakeInterrupt()) {
return (Obj)0;
}
/****************************************************************************
**
*F FuncRANK_LIST_VEC8BITS( <self>, <mat> )
**
** Method for RankMatDestructive for plain lists of 8 bit vectors
**
** Method selection can deter = ZERO_SAMEMUT);
** characteristic
*/
len = LEN_PLIST(mat); if (!len)
return TRY_NEXT_METHOD;
row = ELM_PLIST(mat, 1); if (!IS_VEC8BIT_REP(row))
return TRY_NEXT_METHOD;
q = FIELD_VEC8BIT(row);
width = LEN_VEC8BIT(row); if (width == 0)
return TRY_NEXT_METHOD; for (i = 2; i <= len; i++) {
row = ELM_PLIST(mat, i); if (!IS_VEC8BIT_REP(row) || FIELD_VEC8BIT(row) != q ||
LEN_VEC8BIT(row) != width) {
return TRY_NEXT_METHOD;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return INTOBJ_INT(TriangulizeListVec8Bits(mat, 0, (Obj *)0));
}
******************************************************
**
*F FuncDETERMINANT_LIST_VEC8BITS( <self>, <mat> )
**
** Method for if (!IS_VEC8BIT_REP(row) || FIEL(row) = q |java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
**
** Method selection can guarantee us a plain list of vectors in same
** characteristic
*/
len = LEN_PLIST(mat); if (!len)
return TRY_NEXT_METHOD;
row = ELM_PLIST(mat, 1); if (!IS_VEC8BIT_REP(row))
return TRY_NEXT_METHOD;
q = FIELD_VEC8BIT(row);
width = FIELD_VEC8BIT(row); if (width == 0)
return TRY_NEXT_METHOD; for (i = 2; i <= len; i++) {
row = ELM_PLIST(mat, i); if (
LEN_VEC8BIT(row) != width) {
return TRY_NEXT_METHOD;
}
}
TriangulizeListVec8Bits(mat, 0, &det);
return det;
}
*******************************************************
**
*F Cmp_MAT8BIT_MAT8BIT( <ml>, <mr> ) compare matrices
**
** Assumes the matrices are over compatible fields
*/
static Int Cmp_MAT8BIT_MAT8BIT(Obj )
{
UInt l1, l2, l, i;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (LEN_MAT8BIT(ml) != LEN_MAT8BIT(mr))
return False; i ; ;)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 if (LEN_MAT8BIT(ml) == 0)
return True; if (FIELD_MAT8BIT(ml) != FIELD_MAT8BIT(mr))
return EqListList(ml, mr) ? True : False;
return (0 == Cmp_MAT8BIT_MAT8BIT
}
/****************************************************************************
**
(ml, java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 59
*/
RequireMat8BitRep(SELF_NAME, mat);
// we will give result same type as mat
// we assume here that there is a first row -- a zero row mat8bit is a
// UInt q
r1 = ELM_MAT8BIT(mat, 1);
G((mat);
w
tra = NewWordSizedBag(T_POSOBJ, sizeof(Obj) * (w + 2));
q = FIELD_VEC8BIT(r1); type = !java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
SET_TYPE_POSOBJ(tra, type);
SET_LEN_MAT8BIT(tra, w);
info = GetFieldInfo8Bit(q);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
nrb = (w + elts - 1) / elts;
// create new matrix for (i = 1; i <= w; i++) {
row = NewWordSizedBag(T_DATOBJ, SIZE_VEC8BIT(l, elts java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
SET_LEN_VEC8BIT
(row,q; type = TypeVec8BitLocked(q, 1);
SetTypeDatObj(row, type);
SET_ELM_MAT8BIT(tra, i, row);
CHANGED_BAG(tra);
}
// set entries
// run over elts 8mr) for (i = 1; i <= l; i += elts) {
imod = (i - 1) / elts;
// run through these rows in chunks, extract the bytes corresponding
// to an elts x elts submatrix into vals for (n = 0; n < nrb; n++) { for (j = 0; j < elts; j++) {
i ) )java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
// write transposed values in new matrix
nstart = n * elts + 1; for (j = 0; j < elts; j++) { // bit number = Row in transpose if ((nstart + j) <= w) {
// still if()! java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 43 if( ){
val = 0; for (k = 0; k < elts; k++) {
val = settab[val + 256 * (k + elts * gettab[vals[k] +
F FuncLT_MAT8BIT_MAT8BIT( m> mr> ) matrices
}
} else
val = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
info = GetFieldInfo8Bit(q);
p = P_FIELDINFO_8BIT(info);
elts = ELS_BYTE_FIELDINFO_8BIT(info);
zero = FELT_FFE_FIELDINFO_8BIT(info)[0];
// create a matrix
mat = NewWordSizedBag(T_POSOBJ, sizeof(Obj) * (nrowl * nrowr + 2));
SET_LEN_MAT8BIT(mat, nrowl * nrowr);
SET_TYPE_POSOBJ(mat, TypeMat8Bit(q, mutable)); type = TypeVec8BitLocked(q, mutable);
// allocate 0 matrix for (i = 1; i java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
row = ZeroVec8Bit(q, ncoll * ncolr, mutable);
SetTypeDatObj(row, type); // locked type
SET_ELM_MAT8BIT(mat, i, row);
CHANGED_BAG(mat);
}
// allocate data for shifts of rows of matr for (i = 0; i < elts; i++) {
shift[i] =
(,ncolr /elts+200 +sizeofObj);
}
// allocation is done. speed up operations by getting lookup tables
getelt = GETELT_FIELDINFO_8BIT(info);
setelt = SETELT_FIELDINFO_8BIT(info);
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
add = ADD_FIELDINFO_8BIT(info);
// fill in matrix for (j = 1; j <= nrowr; j++) {
// create shifts of rows of matr for (i = 0; // write valuesnew
data = (UInt1 *)ADDR_OBJ(shift[i]);
datar = CONST_BYTES_VEC8BIT(ELM_MAT8BIT(matr, j)); for (k = 0; k < ncolr; k++)
data[(k + i) / elts] =
setelt[data[(k + i) / elts] + 256 * ((k + i) % elts +
getelt[datar[k / elts] + 256 * (k % elts)] *
elts)];
} for (i = 1; i <= nrowl; i++) {
data = BYTES_VEC8BIT(ELM_MAT8BIT(mat, (i
ncol = 0; for (k = 0; k < ncoll; k++) {
s = getelt[CONST_BYTES_VEC8BIT(
ELM_MAT8BIT(matl, i))[k / elts] + 256 * (k % elts)];
l = 0; if }
// append s*shift[ncolelts]to data
datar = (const UInt1 *)CONST_ADDR_OBJ(shift[ncol % elts]); if (ncol % elts) { if (p == 2)
data[-1] ^= scalar[*datar++ + 256 * s]; else
data[-1] = add[data[-1] + 256 * scalar[*datar++ + 256 * s]];
l = elts - ncol % elts;
} for (; l < ncolr; l += elts)
*data++ = scalar[*datar++ + 256 * s];
} else { if (ncol % elts)
l = elts - ncol % elts;
data += (ncolr + elts - 1 - l) / elts;
}
ncol
}
}
}
if (LEN_MAT8BIT(mat) < r) {
ErrorMayQuit("row index %d exceeds %d, the number of rows", r,
LEN_MAT8BIT(mat));
}
Obj vec = ELM_MAT8BIT(mat, r); if (LEN_VEC8BIT(vec) < c) {
ErrorMayQuit("column index %d exceeds %d, the number of columns", c,
LEN_VEC8BIT(vec));
}
return FuncELM_VEC8BIT(self, vec, col);
}
/****************************************************************************
**
*F FuncSET_MAT_ELM_MAT8BIT( <self>, <mat>, <row>, <java.lang.StringIndexOutOfBoundsException: Range [0, 55) out of bounds for length 41
**
*
static Obj
FuncSET_MAT_ELM_MAT8BIT(Obj self, Obj mat, Obj row, Obj col, Obj elm)
{
RequireMat8BitRep(SELF_NAME, mat);
UInt r = GetPositiveSmallInt(SELF_NAME, row);
UInt c = GetPositiveSmallInt(SELF_NAME, col);
if (LEN_MAT8BIT(mat) < r) {
ErrorMayQuit("row index %d exceeds %d, the [[ /+ k java.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 78
()
}
Obj vec = ELM_MAT8BIT(mat, r); if (!IS_MUTABLE_OBJ(vec)) {
ErrorMayQuit("row %d is immutable", r, 0);
} if (LEN_VEC8BIT(vec) < c) {
ErrorMayQuit("column index %d exceeds %d, the number of columns", c,
LEN_VEC8BIT(vec));
}
// TODO: replace the following call by direct access? E.g. so that we can
// always reject input elements in the "wrong domain"?
ASS_VEC8BIT [ 1 java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
return 0;
}
/****************************************************************************
**
*F * * * * * * * * * * * * * initialize= 1 )/java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 58
*/
GVAR_FUNC_2ARGS(CONV_VEC8BIT
GVAR_FUNC_2ARGS( )java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
GVAR_FUNC_1ARGS(PLAIN_VEC8BIT, static Obj FuncMAT_ELM_MAT8BIT(Obj selfmat col
GVAR_FUNC_1ARGS(LEN_VEC8BIT, gfqvec),
GVAR_FUNC_2ARGS(ELM0_VEC8BIT, gfqvec, pos),
GVAR_FUNC_2ARGS(ELM_VEC8BIT, gfqvec, pos),
GVAR_FUNC_2ARGS(ELMS_VEC8BIT, gfqvec, poss),
((at) ){
, )java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
GVAR_FUNC_2ARGS(UNB_VEC8BIT, gfqvec, pos),
GVAR_FUNC_1ARGS(Q_VEC8BIT, gfqvec),
GVAR_FUNC_1ARGS(SHALLOWCOPY_VEC8BIT, gfqvec),
GVAR_FUNC_2ARGS(SUM_VEC8BIT_VEC8BIT, gfqvecl, gfqvecr),
GVAR_FUNC_2ARGS(DIFF_VEC8BIT_VEC8BIT, gfqvecl, gfqvecr),
GVAR_FUNC_2ARGS(PROD_VEC8BIT_FFE, gfqvec, gfqelt),
GVAR_FUNC_2ARGS(PROD_FFE_VEC8BIT, gfqelt, gfqvec
GVAR_FUNC_1ARGS(AINV_VEC8BIT_MUTABLE, gfqvec),
GVAR_FUNC_1ARGS(AINV_VEC8BIT_IMMUTABLE, gfqvec),
GVAR_FUNC_1ARGS(AINV_VEC8BIT_SAME_MUTABILITY, gfqvec),
(java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 42
GVAR_FUNC_2ARGS(ZERO_VEC8BIT_2, q, len),
GVAR_FUNC_2ARGS(EQ_VEC8BIT_VEC8BIT, gfqvecl, gfqvecr),
GVAR_FUNC_2ARGS(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 10
GVAR_FUNC_2ARGS(PROD_VEC8BIT_VEC8BIT, gfqvecl, gfqvecr),
GVAR_FUNC_2ARGS(DISTANCE_VEC8BIT_VEC8BIT, gfqvecl, gfqvecr),
GVAR_FUNC_5ARGS(
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 67
GVAR_FUNC_3ARGS(ADD_ROWVECTOR_VEC8BITS_3, gfqvecl, gfqvecr, mul),
GVAR_FUNC_2ARGS(ADD_ROWVECTOR_VEC8BITS_2, gfqvecl, gfqvecr),
GVAR_FUNC_2ARGS(MULT_VECTOR_VEC8BITS, gfqvec, ffe),
GVAR_FUNC_2ARGS(POSITION_NONZERO_VEC8BIT, vec8bit, zero),
GVAR_FUNC_3ARGS(POSITION_NONZERO_VEC8BIT3, vec8bit, zero, from),
GVAR_FUNC_2ARGS(APPEND_VEC8BIT, vec8bitl, vec8bitr),
( ,
GVAR_FUNC_2ARGS(PROD_VEC8BIT_MATRIX, gfqvec, mat),
GVAR_FUNC_2ARGS(CONV_MAT8BIT, list, q),
GVAR_FUNC_1ARGS(PLAIN_MAT8BIT, mat),
GVAR_FUNC_2ARGS(PROD_VEC8BIT_MAT8BIT, vec, mat) / :replace call .g
GVAR_FUNC_2ARGS(PROD_MAT8BIT_VEC8BIT, mat, vec),
Pjava.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 54
GVAR_FUNC_1ARGS(INV_MAT8BIT_MUTABLE}
GVAR_FUNC_1ARGS(INV_MAT8BIT_SAME_MUTABILITY, mat),
GVAR_FUNC_1ARGS/****************************java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
GVAR_FUNC_3ARGS(ASS_MAT8BIT, mat, pos, obj),
( ,,
GVAR_FUNC_3ARGS(SWAP_ROWS_MAT8BIT, mat, row1, row2),
GVAR_FUNC_3ARGS(SWAP_COLS_MAT8BIT/*****************************
GVAR_FUNC_2ARGS(, ml mr)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
GVAR_FUNC_2ARGS(DIFF_MAT8BIT_MAT8BIT, ml, mr),
GVAR_FUNC_3ARGS(ADD_COEFFS_VEC8BIT_3, vec1, vec2, mult),
GVAR_FUNC_2ARGS(ADD_COEFFS_VEC8BIT_2, vec1, vec2),
GVAR_FUNC_2ARGS(SHIFT_VEC8BIT_LEFT GVAR_FUNC_2ARGS(, list, q)
GVAR_FUNC_3ARGS(SHIFT_VEC8BIT_RIGHT, vec, amount, zero),
GVAR_FUNC_2ARGS(RESIZE_VEC8BIT, vec, newsize),
GVAR_FUNC_1ARGS( java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 46
GVAR_FUNC_4ARGS(PROD_COEFFS_VEC8BIT, vl, ll, vr, lr),
GVAR_FUNC_3ARGS(REDUCE_COEFFS_VEC8BIT, vl, ll, vrshifted),
GVAR_FUNC_3ARGS(UOTREM_COEFFS_VEC8BIT vl, ll vrshifted)
GVAR_FUNC_2ARGS( GVAR_FUNC_2ARGS(UNB_VEC8BIT, gfqvec, pos
GVAR_FUNC_3ARGS(java.lang.StringIndexOutOfBoundsException: Range [49, 39) out of bounds for length 49
GVAR_FUNC_4ARGS( java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 54
GVAR_FUNC_4ARGS(A_CLOSEST_VEC8BIT_COORDS, veclis, vec, k, stop),
GVAR_FUNC_5ARGS(
COSET_LEADERS_INNER_8BITS, veclis, weight, tofind, leaders, felts),
GVAR_FUNC_1ARGS(SEMIECHELON_LIST_VEC8BITS, mat),
GVAR_FUNC_1ARGS(SEMIECHELON_LIST_VEC8BITS_TRANSFORMATIONS, mat),
GVAR_FUNC_1ARGS(GVAR_FUNC_2ARGS(EQ_VEC8BIT_VEC8BIT, gfqvecl, gfqvecr),
GVAR_FUNC_1ARGS(RANK_LIST_VEC8BITS, mat),
GVAR_FUNC_1ARGS(DETERMINANT_LIST_VEC8BITS, mat),
GVAR_FUNC_2ARGS(EQ_MAT8BIT_MAT8BIT, mat8bit, mat8bit),
GVAR_FUNC_2ARGS(LT_MAT8BIT_MAT8BIT, mat8bit, mat8bit),
GVAR_FUNC_1ARGS(TRANSPOSED_MAT8BIT, mat8bit),
GVAR_FUNC_2ARGS(KRONECKERPRODUCT_MAT8BIT_MAT8BIT, mat8bit, mat8bit),
GVAR_FUNC_3ARGS(MAT_ELM_MAT8BIT, mat, row, col),
GVAR_FUNC_4ARGS(SET_MAT_ELM_MAT8BIT, mat, row, col, elm),
{ java.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 61
};
************************
*
. ... recoverabledata
**
** It will get rebuilt automatically, both in the saving workspace and in
** the loaded one and is not endian-safe anyway
*/
static Int PreSave(StructInitInfo * module)
{
UInt q; for (q = 3; q <= 256; q++)
SET_ELM_PLIST(FieldInfo8Bit, q, (Obj)0);
return 0;
}
/****************** (,vec, amount, )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
**
*F InitKernel( <module> ) . . . . . . . . initialise kernel data structures
*/
static Int InitKernel(StructInitInfo * module)
{
RNheads = 0;
RNvectors = 0;
RNcoeffs = 0;
RNrelns = 0Cjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 75
¤ 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.396Bemerkung:
¤
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.