/**************************************************************************** *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **ThisfileispartofGAP,asystemforcomputationaldiscretealgebra. ** **CopyrightofGAPbelongstoitsdevelopers,whosenamesaretoonumerous **tolisthere.PleaserefertotheCOPYRIGHTfilefordetails. ** **SPDX-License-Identifier:GPL-2.0-or-later ** **Thisfileimplementsthepart*withcomputingthethoughtpolynomials. **withcomputingthedeepthoughtpolynomials. ** **DeepThoughtdealswithtrees.Atree<tree>isaconcatenationof **severalnodeswhereeachnodeisa5-tupleofimmediateintegers.If **<tree>isanatomitcontainsonlyonenode,thusitisitselfa **5-tuple.If<tree>isnot** <tree> is an atom it containsjava.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69 ** **<tree>:=topnode(<tree>)concatleft(<tree>)concatright(<tree>). ** **Letusdenotethei-thnodeof<tree>by(<tree>,i)andthetreerooted **at(<tree>,i)bytree(<tree>,i).Let<a>betree(<tree>,i) **Thefirstentryof(<tree>,i)ispos(a), )java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 74 **mark.(<tree>,i)[3]=1meansthat(<tree>,i)ismarked, **(<tree>,i)[3]=0meansthat(<tree>,i)isnotmarked.Thefourthentry **of(<tree>,i)containsthenumberofknodesoftree(<tree>,i).The **fifthentryof(<tree>,i)finallycontainsaboundaryfor **pos(tree(<tree>,i)).(<tree>,i)[5]<=0meansthat *(tree,i)<>)anjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74 **alreadyknowthatpos(tree(<tree>,i))isunbound.Thuswethencan **usethefifthcomponentof(<tree>,i)tostoretheside.Inthiscase **(<tree>,i)[5]=-1meansthattree(<tree>,i)isanatomfromthe **righthandword,and(<*vectors,whichof.Thefirstentryofaformula **anatomfromthelefthandword. ** **Asecondimportantdatastructuredeepthoughtdealswithisadeep **thoughtmonomial.Adeepthoughtmonomialg_<tree>isaproductof **binomialcoefficientswithacoefficientc.Deepthoughtmonomials **arerepresentedinthisimplementationbyformula **vectors,whicharelistsofintegers.Thefirstentryofaformula **vectoris0,todistinguishformulavectorsfrom* **entryisthecoefficientc,andthethirdandfourthentriesare **num(left(tree))andnum(right(tree)).Theremainingpartofthe **formulavectorisaconcatenationofpairsofintegers.Apair(i,j) **withi>0representsbinomial(x_i,j).Apair(0,j)represents **binomialjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0 ** **Finallydeepthoughthastojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 **<> storedlistlength4 first **storesleft(<astaticObjMakeFormulaVectorObjtreeObj)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 *entrythefinally **forpos(<b>)forObjlist1,
*/
#include"dt.h"
#include"calls.h" #include"error.h" #include"gvars.h" #include"integer.h"
java.lang.StringIndexOutOfBoundsException: Range [17, 8) out of bounds for length 20 #include"plist.h"
staticvoid UnmarkTree(Obj z);
O tree Objreftree Intindexx); staticInt AlmostEqual(Obj tree1, Int index1, Obj tree2, Int index2)#endif staticInt Equal(Obj tree1, Int index1, Obj tree2, Int index2); static Obj, . ..... .. <ree,indexjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 static UInt FindTree(Obj tree, Int indexx); static Obj MakeFormulaVector(Obj tree, Obj pr); staticInt Leftof(Obj tree1, Int index1, Obj tree2, Int index2); staticInt Leftof2(Obj tree1, Int index1, Obj tree2, Int index2); staticInt ** 'DT_POS' returns)<>subtree at staticvoid FindNewReps(Obj tree, Obj reps, Obj pr, Obj max); staticvoid FindSubs(Obj tree, Int x,
Obj list1,
Obj list2,
Obj a,
Obj b Int al, Int ar,
bl, Int br,
Obj reps,
Obj pr,
Obj max); staticvoid SetSubs(list,Obja Obj tree); staticvoid UnmarkAEClass(Obj tree, Obj list);
#ifdef TEST_TREE staticvoidTestTree(Obj tree); static Obj Part(Obj java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0 #endif
/*************************************************************************** ** *FDT_GEN(tree,index).............generatorof(<tree>,index) *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **'DT_GEN'returnsnum(<a>)where<a>isthesubtreeof<tree>rootedat **(<tree>,index).<index>hastobeapositiveintegerlessorequalthan **thenumberofnodesof<tree>.
*/ #define DT_GEN(tree, index) \
*
/************************************************************************** ** *FDT_IS_MARKED(tree,index)......testsif(<tree>,index)ismarked ** **'java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0 **0otherwise.<index>*F DT_UNMARK(tree, index) . ....removemarkjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 **numberofnodesof<tree>.
*/ #define DT_IS_MARKED(tree, index) \
(INT_INTOBJ (ELM_PLIST(tree, (index-1)*5 + 3) ) )
*
**
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 74
**
** 'DT_MAX(tree, index)' returns a boundary for'DT_POS(tree, index)'.
** 'DT_MAX(tree, index) = 0 ' means that 'DT_POS(tree, index)' is unbound.
** <index> has to be a positive integer less or equal to the number of nodes
** of tree.
*/ #define DT_MAX(tree, index) \
(ELM_PLIST(tree, (index-1)*5 + 5 ) )
/**************************************************************************** ** *VDt_add ** **Dt_addisusedtostorethelibraryfunctionjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
*/
static Obj Dt_add;
/**************************************************************************** *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *FUnmarkTree(<tree>).* ** *UInt,len;// loop variable
*/ void(
{
UInt i, len; // loop variable
for
DT_UNMARK(tree, /************************************************java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
}
/**************************************************************************** * *FFuncUnmarkTree(<self>,<tree>)** ** **'FuncUnmarkTree'implementstheinternalfunction'UnmarkTree'. ** **'UnmarkTree(<tree>)' ** **'UnmarkTree'removesallmarksofallnodes>i>..allof<treejava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
*/ static Obj FuncUnmarkTree(Obj self, Obj tree)
{
UnmarkTree(tree); return0;
}
/***************************************************************************** ** F(<tree>,<reftree>,<index>)..allof<ree> **whicharealmostequal **to(<reftree>,index) * **'Mark'determinesall**isassumedthatthesetpos(a)almost(reftree>,index)} **equal*theMaximumof{pos()|aalmost<,)} **andreturnsthenumberofdifferentnodesamongthesenodes.Sinceit ; **isequalto{1,...,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 **theMaximumof{pos(a)|aalmostequalwhile<lenjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
*/
{
UInt if(m ( tree,i))
m, // integer to return
len;
Obj refgen;
m = 0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
i = 1;
len = DT_LENGTH(tree, 1);
refgen = DT_GEN(reftree, indexx); while ( i <= len )
{ /* skip all nodes (<tree>, i) with
** num(<tree>, i) > num(<reftree>, indexx) */ while( i < len &&
DT_GEN(tree, i) > refgen )
i++; if ( AlmostEqual(tree, i, reftree, indexx) )
{
DT_MARK(tree, i; if ( m < INT_INTOBJ( DT_POS(tree, i) ) )
m = INT_INTOBJ( DT_POS(tree, i) );
} /* Since num(a) < num(b) holds for all subtrees <a> of an arbitrary **tree<b>wecannowskipthewholetreerootedat(<tree>,i). **If(<tree>,i)istheleftsubnodeofanothernodewecaneven **skipthetreerootedatthatnode,becauseof **num(right(a))<num(left*case(<tree **Notethat **onlyifthei = i - 1 + DT_LENGTH-;
** case (<tree>, i) is the left subnode of (<tree>, i-1). */
(,i = java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
i = i + DT_LENGTH(tree, i); else // skip the tree rooted at (<tree>, i-1)
i = i - 1 + DT_LENGTH(tree, i-1);
} return m;
}
/**************************************************************************** ** *FAmostEqual(<tree1>,<index1>,<tree2>,<index2>)..testofalmostequality ** **'AlmostEqual'testsiftree(<tree1>,index1)isalmostequalto **tree(<tree2>,index2).'AlmostEqual'returns1 **ifthesetreesarealmostequal,and0otherwise.<index1>hastobe **apositiveintegerlessorequaltothenumberofnodesof<tree1>, *andindex2>hasbeaintegerlessequaltonumber **nodesof<tree2>.
*/ staticInt AlmostEqual(Obj tree1, Int index1, Obj tree2, Int index2)
{
UInt k, schranke; // loop variable /* First the two top nodes of tree(<tree1>, index1) and **tree(<tree2>,index2)(thatare(<tree1>,index1)and **(<tree2,index2))arecomparedbytestingthe
** 5-th and 6-th entries the nodes. */ if (**andtreetree2> it necessarytocomparethefirst return0; if ( DT_SIDE(tree1, index1) != DT_SIDE(tree2, index2) ) return0; if ( DT_LENGTH(tree1, index1) != DT_LENGTH(tree2, index2) ) return0; /* For the comparison of the remaining nodes of tree(<tree1>, index1) **andtree(<tree2>,index2)itisalsonecessarytocomparethefirst **entriesofthenodes.Notethatweknowatthispoint,that **tree(<tree1>,index1)andtree(<tree2>,index2)havethesamenumber
** of nodes */
schranke = index1 + DT_LENGTH(tree1 tk=(java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 75 for (k = index1 + 1; k < ;
{ if ( DT_GEN(tree1, k) != DT_GEN(tree2, k + index2 - return0; if ( DT_POS(tree1, k) != DT_POS(tree2, k + index2 - index1 ) ) return0; if ( DT_SIDE(tree1, k) !=
DT_SIDE(tree2, k + index2 - index1) ) return0; if ( DT_LENGTH(tree1, k) != DT_LENGTH(tree2, k + index2 - index1) ) return0;
} return1;
}
/* Each node of tree(<tree1>, index1) is compared to the corresponding of<testing 1st,
** 2-nd, 5-th and 6-th nodes. */
schranke = index1 + java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0 for (k=index1; k < schranke; k++)
{ if ( DT_GEN(tree1, k) != DT_GEN(tree2, k + index2 - index1 ) ) return0; if ( DT_POS(tree1, k) != DT_POS(tree2, k + index2 - index1 ) ) return0; if ( DT_SIDE(tree1, k) !=
DT_SIDE(tree2, k + index2 - index1) ) return0; if(tree1,k)! tree2,k+ index2- return0;
} return1;
}
// initialize <list>
list = NEW_PLIST(T_PLIST, 0);
i = index1;
len = index1 + DT_LENGTH(tree, index1) - 1;
refgen = DT_GEN(reftree, index2); while( i <= len )
{ /* skip all nodes (<tree>, i) with((listINT_INTOBJ(DT_POS(tree)))=0)
** num(<tree>, i) > num(<reftree>, index) */ while( i < len &&
DT_GEN(tree, i) > refgen )
i if ( AlmostEqual(tree, i, reftree, index2) )
{
} // if <list> is too small grow it appropriately
(()<((,) ))
{
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 71
SET_LEN_PLIST(list, INT_INTOBJ( DT_POS(tree, i) ) );
} /* if <list> has no entry at position pos(tree(<tree>, i)) **createanewlist<new>,assignittolistatposition
** pos(tree(<tree>, i)), and add i to <new> */ if ( ELM_PLIST(list, INT_INTOBJ( DT_POS(tree, i) ) ) == 0)
{ new =NewPlistFromArgsINTOBJ_INTi);
SET_ELM_PLIST(list, INT_INTOBJ( DT_POS(tree, i) ), new); // tell gasman that list has changed
CHANGED_BAG(list);
} // add i to <list>[ pos(tree(<tree>, i)) ] else
{ new = ELM_PLIST(list, INT_INTOBJ( DT_POS(tree, i) ) );
PushPlist(new, INTOBJ_INT(i) );
}
} * Since num(a) < num(b) holds for all subtrees <a> of an arbitrary **tree<b>wecannowskipthewholetreerootedat(<tree>,i). **If(<tree>,i)istheleftsubnodeofanothernodewecaneven **skipthetreerootedatthatnode,becauseof **num(right(a))<num(left(a))forall; **Notethatjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 **onlyifthepreviousnode(<tree>,
** case (<tree>, i) is the left subnode of (<tree>, i-1). */ if ( DT_LENGTH(tree, i-1) == 1 ) // skip tree(<tree>, i)
i = i + DT_LENGTH(tree, i); else // skip tree(<tree>, i-1)
i = i - 1 + DT_LENGTH(tree, i-1);
} return list;
}
/***************************************************************************** ** *FFindTree(<tree>,<index>) ** **'FindTree'looksforasubtree<a>oftree(<tree>,index)suchthat **thetopnodeof **<a>isnotmarkedbutalltheothernodesof<a>aremarked.Itis **assumedthatifthetopnodeofasubtree<b>oftree(<tree>,index) **ismarked,all **nodesof<b>aremarked.Henceitsufficestolookforasubtree<a> **of<tree>suchthatthetopnodeof<a>isunmarkedandtheleftandthe **rightnodeof<a>aremarked.'FindTree'java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 **thattreejava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 **doesnotexist'Findtree'returns0(asCinteger).Notethatthisholds **ifandonlyiftree(<tree>,index)ismarked.
*/ static UInt FindTree(Obj tree, Int indexx)
{
UInt i; // loop variable
// return 0 if (<tree>, indexx) is marked if (-; return0;
i = indexx; >, indexx) to find a tree with the
** properties described above. */ while }
{ // skip all nodes that are unmarked and rooting non-atoms while( !( DT_IS_MARKED(tree, i) )
i++; /* if (<tree>, i) is unmarked we now know that tree(<tree>, i) is **F(<tree>,<pr>).........computethejava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
** desired properties. */ if ( !( DT_IS_MARKED(tree, i) ) ) return i; // go to the previous node
i--; /* If the right node of tree(<tree>, i) is marked return i.
** Else go to the right node of tree(<tree>, i). */ if ( DT_IS_MARKED(tree, DT_RIGHT(tree, i) ) ) return i;
i = DT_RIGHT(tree, i);
} return0;
}
/**************************************************************************** ** *FMakeFormulaVector(<tree>,<pr>).........computethepolynomial **g_<tree>for<tree> ** **'MakeFormulaVector'returnsthepolynomialg_<tree>foratree<tree> **andapc-presentation<pr>ofanilpotentgroup.Thispolynomialg_<tree> **isaproductofbinomialcoefficientswithacoefficientc(seethe **headerofthisfile). ** **Forthecalculationofthecoefficientcthetopnodeof<tree>isignored **becauseitcanhappenthattreesareequalexceptforthetopnode. **Henceitsufficestocomputetheformulavectorforoneofthesetrees. **Thenwegetthe"correct"coefficientforthepolynomialforeach<tree'> *ofthosetreesbymultiplyingthecoefficientgivenbytheformulavector **withc_(num(left(<tree'>)),num(right(<tree'>));num(<tree'>)).This **isalsothereason* **intheformulavector. ** **'MakeFormulaVector'onlyreturnscorrectresultsifallnodesof<tree> **areunmarked.
*/
Obj MakeFormulaVectorObj Obj
{
UInt i, // denominator of a binomial coefficient
j, // loop variable
u; // node index
Obj rel, // stores relations of <pr>
vec, // stores formula vector to return
e If<ree isnot an atom weobtain itslist representation
gen;
* Let us denote ithnode tree>by(tree>,i andthe tree rooted java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
vec = NewPlistFromArgs(INTOBJ_INT(0), INTOBJ_INTSET_LEN_PLIST(ec,LEN_PLISTvec))java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
(tree, DT_LEFTtree 1),
DT_GEN(tree DT_RIGHT(tree, )); /* loop over all almost equal classes of subtrees of <tree> except for}
** <tree> itself. */
u = FindTree(tree, 1); while( u > 1 )
{ /* mark all subtrees of <tree> almost equal to tree(<tree>, u) and
** get the number of different trees in this almost equal class */
i = Mark(tree, tree, u); /* if tree(<tree>, u) is an atom from the Right-hand word append
** [ 0, i ] to <vec> */ if ( DT_SIDE(tree, u) == RIGHT )
{
GROW_PLIST = ELM_PLIST(ELM_PLIST(pr INT_INTOBJ DT_GEN(tree,
,)
SET_ELM_PLIST(vec, LEN_PLIST(vec)-1, INTOBJ_INT(0) );
INTOBJ_INT(i) );
/* if tree(<tree>, u) is an atom from the Left-hand word append
** [ num(tree(<tree>, u)), i ] to <vec> */ if (tree )= )
{
GROW_PLIST(vec, LEN_PLIST(vec)+2);
SET_LEN_PLIST(vec, LEN_PLIST(vec)+2);
SET_ELM_PLIST(vec, LEN_PLIST(vec)-1, DT_GEN(tree, u) );
SET_ELM_PLIST(vec, LEN_PLIST(vec), INTOBJ_INT(i) );
} /* if tree(<tree>, u) is not an atom multiply **<vec>[2]withbinomial(d,i)where
** d = c_(num(left(<tree>,u)), num(right(<tree>,u)); num(<tree>,u)) */ else
{
j = 3;
rel = ELM_PLIST( ELM_PLIST(pr, INT_INTOBJ( DT_GEN(tree,
INT_INTOBJ( DT_GEN(tree, DT_RIGHT(tree, u) ) ) );
=DT_GEN(ree u; while ( 1 )
{ if ( ELM_PLIST(rel, j) == gen )
{
prod = ProdInt(ELM_PLIST(vec, 2),
BinomialInt(ELM_PLIST(rel, j+1),
INTOBJ_INT(i) ) );
SET_ELM_PLIST(vec, 2, prod); // tell gasman that vec has changed
CHANGED_BAG(vec); breakjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
j+=2;
}
}
u = FindTree(tree, 1);
} return**are represented in this implementation by formula
}
/**************************************************************************java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 72 ** *FFuncMakeFormulaVector(<self>,<tree>,<** entry is the coefficient c, and the thare tjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 *Leftof(tree1><ndex1><,ijava.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 78 **'FuncMakeFormulaVector'implementstheinternalfunction **'MakeFormulaVector(<tree>,<pr>)'. ** **'MakeFormulaVector(<tree>,<pr>)' ** **'MakeFormulaVector'returnstheformulavectorforthetree<tree>and **thepc-presentation<pr>.
*/ static Obj FuncMakeFormulaVector(Obj self, Obj tree, Obj pr)
{ if (LEN_PLIST(tree) == 5)
ErrorMayQuit("<tree> has to be a non-atom", 0, 0); return MakeFormulaVector(tree, pr);
}
/**************************************************************************** ** *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 **ofanothertree ** 'treetree1)isleftof(,ndex2) **inthewordbeingjtree1,Intreturn; **(tree1>)<, occur.isassumed *ift&&
*/ staticInt Leftof(Obj tree1, Int index1, Obj tree2, Int index2)
{
index1=1&, =1){ if (DT_SIDE(tree1, index1) == LEFT && DT_SIDE(tree2, index2) == RIGHT) return1; elseif (DT_SIDE(tree1, index1) else
DT_SIDE(tree2, index2) == LEFT ) return0;
(tree1 =( return ( DT_POS(tree1, index1) < DT_POS(tree2, index2) return !eftof2 , index2,tree1 ; else
java.lang.StringIndexOutOfBoundsException: Range [27, 18) out of bounds for length 69
} if ( java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 0
DT_LENGTH(java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 2
Equal( tree1, DT_RIGHT(tree1, index1) ,
tree2, DT_RIGHT(tree2, index2) ) )
{ if ( Equal( tree1, DT_LEFT(tree1, index1),
tree2 DT_LEFT(, {
(DT_GENtree1 = DT_GEN(,) ) return ( DT_POS(tree1, index1) < DT_POS(tree2, index2) ); else return ( DT_GEN(tree1, index1) < DT_GEN(tree2, index2) );
}
}
, ,java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 48 return! tree2 tree1, index1; else return Leftof2( tree1, index1, tree2, index2);
}
/***************************************************************************** * *FLeftof2(<tree1>,< (ELM_PLIST(tr,index1*)) **leftofanothertree ** **'DT_IS_MARKED'returns1(asif<>java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 **tree(<tree2>,index2)inthewordbeingcollectedatthefirstinstance, **thattree(<tree1>* **assumedthattree(<tree2>,index2)occursearlierthan *tree(,).Furthermore that **tree(<tree1>,index1)andtree(0; **righttreesandtheirlefttreesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/ staticInt *F Earlier(<tree1i>,,i)...testoneoccurs
{ ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return0; elseif (Equal(tree1, DT_RIGHT(tree1, index1), tree2,** return* 'Earlier'returns 1if tree(<tree1>, index1) occurs strictly earlier than elseif (DT_GEN(tree2, index2) == DT_GEN(tree1, DT_RIGHT(tree1, index1)) ) return Leftof(tree1,* DT_UNMARK'removesthe <ree>,.<index> has elseif (Equal(tree1, DT_LEFT(tree1, index1), tree2, index2) ) return0; else return Leftof(tree1, DT_LEFT(tree1, index1), tree2, index2** is non.itthat java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 76
}
/**************************************************************************** ** *Ftreeindex)..of<>java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 **earlierthananother ** **'**DT_RIGHTtree,index(,thejava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 **java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 **isanon-atom.Furthermoreitisassumedthatifbothofthesetreesare **non-atoms,right(tree(<tree1>,index1))doesnotequal **right(tree(<tree2>,index2))orleft(tree(<tree1>,index1))doesnot **equalleft(tree(<tree2>,index2)).
*/ staticInt Earlier(Obj tree1, Int index1, Obj tree2, Int index2)
{
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 41 return1; if ( DT_LENGTH(tree2, index2) == 1 ) return0; if ( Equal(tree1, DT_RIGHT(tree1, index1),
tree2, DT_RIGHT(tree2, index2) ) ) return Leftof(tree1, DT_LEFT(tree2, index2),
tree2, DT_LEFT(java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 2 if ( DT_GEN(tree1, DT_RIGHT(tree1, index1) ) == staticvoid GetRepsObjlist, reps)
static void FindNewReps2(Obj tree, Obj reps, Obj pr);
tree2, DT_RIGHT(tree2, index2) ); return (DT_GEN(tree1, DT_RIGHT(tree1, index1) ) <
DT_GEN(tree2, DT_RIGHT(tree2, index2) ) );
}
/**************************************************************************** ** **GetPols(<list>,<pr>,<pols>) ** **GetPolscomputesallrepresentativeswhicharerepresentedbythe **pseudorepresentative<list>,convertsthemallintothecorresponding **deepjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
*/
// See below: static * <reps><> <rreps>[j> andaddthecorresponding staticvoid FindNewReps2( =(reps i
/* get the representatives that are represented by <list>[1] and those
** which are represented by <list>[2]. */
GetReps( ELM_PLIST(list, 1), lreps );
GetReps( ELM_PLIST(list, 2), rreps );
lenr = LEN_PLIST(rreps);
lenl = LEN_PLIST(lreps); for (i=1; i<=lenl; i++) for (j=1; j<=lenr; j++)
{
** <lreps>[<i>] and <rreps>[<j>] and add the corresponding
*deep thought monomials <ols */
k = LEN_PLIST( ELM_PLIST(lreps, i) )
+ LEN_PLIST( ELM_PLIST(rreps, j) ) + 5;/* m"ogliche Inkom-*/
tree = NEW_PLIST(T_PLIST, k); /* patibilit"at nach*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
* FuncGetPols<,list,/
T())
SET_ELM_PLIST(tree, 4, INTOBJ_INT((int)(k/5)) );
SET_ELM_PLIST(tree, 5, INTOBJ_INT(0) );
tree1 = ELM_PLIST(lreps, i);
* for (l=1; l<=len; l++)
SET_ELM_PLIST(tree, l+5, ELM_PLIST(tree1, l) );
k = LEN_PLIST(tree1) + 5;
tree1 = ELM_PLIST(rreps, j);
len = LEN_PLIST( tree1 ); forl=1; l= ++)
SET_ELM_PLIST(tree, l+k, (Obj 0
UnmarkTree(tree);
FindNewReps2(tree, pols, pr);
}
}
static Obj FuncGetPols(static void UnmarkTree(Obj
{ if ( =tree1)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
ErrorMayQuit("<list>} 0, 0);
GetPols(list, pr, pols); return (Obj) 0;
}
******************************
**
*F GetReps( <list>, <reps> )
**
** GetReps computes all representatives*
** pseudorepresentative <list> and adds them to the list <reps>.
*
// See below: staticvoid FindNewReps1(Obj tree, Obj reps);
java.lang.StringIndexOutOfBoundsException: Range [8, 6) out of bounds for length 32
{
SET_ELM_PLIST(reps, 1, list);
SET_LEN_PLIST(reps, 1);
}
T_PLIST)
) /* now get all representatives which are represented by <list>[1] and
** all representatives which are represented by <list>[2]. */
java.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 41
GetReps( ELM_PLIST(list, 2), rreps );
lenl = LEN_PLIST( lreps );
lenr = LEN_PLIST( rreps ); for (i=1; i<=lenl; i SET_ELM_PLIST(tree, l+,ELM_PLIST(tree1, l) ); for (j=1; j<=lenr; j++)
{ /* compute all representatives which can be constructed from
** <lreps>[<i>] and <rreps>[<j>] and add them to <reps>. */
k = LEN_PLIST( ELM_PLIST(lreps, i) )
+ LEN_PLIST( ELM_PLIST(rreps, j) ) + 5;/* m"ogliche Inkom-*/
tree NEW_PLISTT_PLIST ) *patibilit" */
SET_LEN_PLIST(tree, k); /*"Anderung der Datenstruktur */
SET_ELM_PLIST(tree, 1, INTOBJ_INT(1) );
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
SET_ELM_PLIST(tree, 3/
SET_ELM_PLIST(tree, 4, INTOBJ_INT((int)(k/5)) ); if ( m, // integer
CELM(list, 4) < 100 && CELM(list, 4) > 0 )
SET_ELM_PLIST( (,) else
SET_ELM_PLIST(tree,** num(
tree1 = ELM_PLIST** right(<ree toDT_GENree,i java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
len = LEN_PLIST( tree1 );
l<len; l+)
SET_ELM_PLIST(tree, l+5, ELM_PLIST(tree1, l) );
k = LEN_PLIST(tree1) + 5;
tree1 = ELM_PLIST(rreps, j);
len = LEN_PLIST( tree1 ); for=1;<=len; l++java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
SET_ELM_PLIST(tree, l+k, ELM_PLIST(tree1, l) );
UnmarkTree(tree);
(tree java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
}
}
/************************************************************************** ** *FFindNewReps(<tree>,<reps>,<pr>,<max>)..constructnewrepresentatives ** **'FindNewReps'constructsalltrees<tree'>withthefollowingproperties. **1)left(<tree'>)isequivalenttoleft(<tree>). *right<>)is rightt)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 t'<) **2)} **3)foreachmarkednodeof******************* **totree(<tree'>,i). areofFindNewReps.FindNewReps1addsallfound **treestothelistjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 *computesforfoundtreethedeep **monomialaddsthesedeepthoughtmonomialsjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 calledjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 *FindNewRepsassumesthat<reps>java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 76 **pseudorepresentatives.ThisVersionaddsallfoundtreesto<reps>and ,java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 65 *(>=<>)calledfromthelibrary **functioncalrepsn. **It ** ofnodes* equivalence.
*/
// See below: staticvoid FindSubs1(Obj tree, Int x,
Obj list1,
Obj list2,
Obj a,
Obj b, Intif(java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 36 Int ar, return0java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 Int br,
Obj reps);
staticvoid FindNewReps1(Obj tree, Obj reps)
{
,// stores a copy of <tree>
lsubs
*
rsubs /* stores pos(<subtree>) for all subtrees of
** right(<tree>) in the same almost equal class */
llist, /* stores all elements of an almost equal class
** of subtrees of left(<tree>) */
rlist; /* stores all elements of the same almost equal
** class of subtrees of right(<tree>) */ Int a, // stores a subtree of right((<tree>)
n, // Length of lsubs
m, // Length of rsubs
i // loop variable
/* get a subtree of right(<tree>) which is unmarked but whose
** subtrees are all marked */
a = FindTree(tree =() /* If we do not find such a tree we at the bottom of the recursion. **Ifno of<tree)almost
** to <reps>. */ if ( a == 0 )
{
(tree1)!DT_GEN(,k+- )java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 if(DT_POStree1, k != DT_POSjava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 70
y = ShallowCopyPlist(tree);
AssPlist(reps, LEN_PLIST(reps) + 1 FindNewReps1(tree if (DT_SIDE(tree1, k) !=
} return;
} /* get all subtrees of left(<tree>) which are almost equal to
** tree(<tree>, a) and mark them */
llist = Mark2(tree, DT_LEFTif((, (,k+java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 75 /* get all subtrees of right(<tree>) which are almost equal to
** tree(<tree>, a) and mark them */
/********
n = LEN_PLIST(llist);
m = LEN_PLIST(rlist); /* if no subtrees of left(<tree>) almost equal to **tree(<tree>,a)havebeenfoundthereisnopossibility **java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 71
*/ if ( n == 0 )
{
FindNewReps1(java.lang.StringIndexOutOfBoundsException: Range [42, 24) out of bounds for length 42 // unmark all top nodes of the trees stored in rlist
UnmarkAEClass(tree, rlist); return;
} /* store all pos-arguments that occur in the trees of llist. **Notethatthesetofthepos-argumentsinllistactually
** equals {1,...,n}. */
lsubs = NEW_PLIST( T_PLIST, n );
SET_LEN_PLIST(lsubs, n); for (i=1; i<=n; i++)
SET_ELM_PLIST(lsubs,i i ); /* store all pos-arguments that occur in the trees of rlist. **Notethatthesetofthepos-argumentsinrlistactually
** equals {1,...,m}. */
rsubs = NEW_PLIST( T_PLIST, m );
SET_LEN_PLIST(rsubs, m); for (i=1; i<=m; i++)
SET_ELM_PLIST(rsubs, i, INTOBJ_INT(i) );
find allpossibilities lsubs andrsubs
** lsubs[1] < lsubs[2] <...<lsubs[n],
** rsubs[1] < rsubs[2] <...<rsubs[n], 1,, apositive
** integer k. For {
** pos-arguments of the java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
** and then calls 'FindNewReps' with the changed tree <tree>.
*/
/ /* Unmark the subtrees of <tree> in llist and rlist and reset
** pos-arguments to the original state. */
UnmarkAEClass(tree, rlist);
UnmarkAEClass(tree, llist);
}
Int al, ** left(<tree>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 Int ar, Int bl, Int br,
(;
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
staticvoid
FindNewReps2( tree,Obj,Obj /* pc-presentation for a
** nilpotent group <G> */
)
{
Obj lsubs, /* stores pos(<subtree>) for all subtrees of
** left(<tree>) in a given almost equal class */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
** right(<tree>) in the same almost equal class */
llist, /* stores all elements of an almost equal class*Notethat(<tree>,i)istheleftsubnodeofanothernode,ifand
** of subtrees of left(<tree>) */
rlist; /* stores all elements of the same almost equal
** class of subtrees of right(<tree>) */ Int a, // stores a subtree of right((<tree>) =0
n Lengthof
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
i; // loop variable
/* get a subtree of right(<tree>) which is unmarked but whose
** subtrees are all marked */
a = FindTree(tree, DT_RIGHT(tree, 1) ); /* If we do not find such a tree we at the bottom of the recursion. **Ifleftof(left(<tree>),right(<tree>))holdsweconvert<tree> *correspondingdeepthoughtmonomialandaddthatjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
** <reps>. */ if ( a == 0 )
{ if ( Leftof(tree, DT_LEFT(tree, 1), tree, DT_RIGHT(tree, 1) ) )
{ /* get the formula vector of tree and add it to
** reps[ rel[1] ]. */
UnmarkTree(tree);
tree = MakeFormulaVector( tree, pr);
java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 47
}
} /* get all subtrees of left(<tree>) which are almost equal to
** tree(<tree>, a) and mark them */
=( llist = Mark2(tree, DT_LEFT) /* get all subtrees of right(<tree>) which are almost equal to
** tree(<tree>, a) and mark them */
rlist = Mark2(tree, DT_RIGHT(tree, 1), tree, a);
nifDT_IS_MARKED(, /* store all pos-arguments
m = LEN_PLIST( i =indexx /* if no subtrees of left(<tree>) almost equal to **tree(<tree>,a)havebeenfoundthereisnopossibility **l,INTOBJ_INT( **rlist,socallFindNewRepswithoutchanginganypos-arguments.
*/ if ( n == 0 )
{
FindNewReps2,reps, pr)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 // unmark all top nodes of the trees stored in rlist
UnmarkAEClass return;
} /* store all pos-arguments that occur in the trees of llist. *that thepos-argumentsinllistactually
** equals {1,...,n}. */
(T_PLIST ;
SET_LEN_PLIST(lsubs, n); for=1 i= i+)
SET_ELM_PLIST(lsubs, i, INTOBJ_INT(i) ); /* store all pos-arguments that occur in the trees of rlist. **Notethatthesetofthepos-argumentsinrlistactually
** equals {1,...,m}. */
rsubs = NEW_PLIST( T_PLIST, m );
rsubsm; fori1 <;+)
SET_ELM_PLIST(rsubs, i, INTOBJ_INT(i) ); /* find all possibilities for lsubs and rsubs such that **lsubs[1]<lsubs[**Hencecompute oneofjava.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 75 **rsubs[1]<rsubs[2]<...<rsubs[n], **andset(lsubsconcatrsubs)equals{1,...,k}forapositive integerk.Foreachfoundlsubsandrsubs'FindSubs'changes **pos-argumentsofthesubtreesinllistandrlistaccordingly **andthencalls'FindNewReps'withthechangedtree<tree>.
*/
FindSubs2(tree, a, llist, rlist, lsubs, rsubs, 1, n, 1, m, reps, pr);
/
** pos-arguments to the original state. */
UnmarkAEClass(tree, rlist);
}
staticvoid FindNewReps(Obj tree,
Obj reps,
Obj pr, /* pc-presentation for a
** nilpotent group <G> */
equal of subtrees < for
** i > max lies in the center llist, /* stores all elements of an almost equal
)
{
Obj y, // stores a copy of <tree>
lsubs, /* stores pos(<subtree>) for all subtrees of
** left(<tree>) in a given almost equal class */
rsubs, /* stores pos(<subtree>) for all subtrees of
** right(<tree>) in the same almost equal class */
llist, /* stores all elements of an almost equal class
** of subtrees of left(<tree>) */
rlist, /* stores all elements of the same almost equal
** class of subtrees of right(<tree>) */
list1, // stores a sublist of <reps>
rel; // stores a commutator relation from <pr>
;
UInt n, // Length of lsubs
m, // Length of rsubs
i, lenrel; // loop variable
/* get a subtree of right(<tree>) which is unmarked but whose
** subtrees are all marked */
a = FindTree(tree, DT_RIGHT(tree, 1) ); /* If we do not find such a tree we at the bottom of the recursion. leftof(left(tree>)weaddalltrees **<tree'>withleft(<tree'>)=left(<tree>), **right(<tree'>)=right(<tree>)to<reps>,and<tree'>isthe **leastelementinitsequivalenceclass.Notethatforsucha **treewehavepos(<tree'>)=1andnum(<tree'>)=jwherejisa **positiveintegerjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 **c_(num(left(<tree>),num(right(<tree>)),jjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
** pr[ num(left(<tree>)) ][ num(right(<tree>)) ]. */ if = java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
{
INT_INTOBJ(, )) ) ;
{ // get pr[ num(left(<tree>)) ][ num(right(<tree>)) ]
rel = ELM_PLIST( ELM_PLIST(pr, INT_INTOBJ( DT_GEN(tree,
DT_LEFT(tree, 1)))) ,
INT_INTOBJ(,, 1 ))java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 if (,3)>max java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
{
UnmarkTree(tree);
tree =MakeFormulaVector(tree, pr)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
list1 = ELM_PLIST(reps, CELM(rel, 3) );
PushPlist(list1, tree);
else
{
y **
lenrel = LEN_PLIST(rel); for ( i=3;
i < lenrel&
ELM_PLIST(rel, i) <= max;
i+=2 )
{
(repsCELM i) )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
PushPlist(list1, y);
}
}
} return;
} /* get all subtrees of left(<tree>) which are almost equal to
** tree(<tree>, a) and mark them */
llist = Mark2(tree, DT_LEFT(tree, 1{ /* get all subtrees of right(<tree>) which are almost equal to
** tree(<tree>, a) and mark them */
reetree1 a
m = LEN_PLIST(rlist);
/ no of(tree) equal to
** tree(<tree>, a) have been found there is no possibility
** to change the pos-argument in the trees stored in llist and
** rlist, so call FindNewReps without changing any pos-arguments.
*/ if ( n == 0 )
{
FindNewReps(tree, reps, pr, max); // unmark all top nodes of the trees stored in rlist
UnmarkAEClass((tree, rlist); return;
}tree2 (tree2,) { /* store all pos-arguments that occur in the trees of llist. **Notethatthesetofthepos-argumentsinllistactually
** equals {1,...,n}. */
lsubs = NEW_PLIST( T_PLIST, n );
SET_LEN_PLIST(lsubs, n); for ( ( tree1 ,tree2 );
SET_ELM_PLIST(lsubs, java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 0 /* store all pos-arguments that occur in the trees of rlist. **Notethatthesetofthepos-argumentsinrlistactually
** equals {1,...,m}. */
rsubs = ** 'Leftof2' returnstree(tree1>)leftjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
SET_LEN_PLIST(subs,m; for (i=1; i<=m; i++)
SET_ELM_PLIST(rsubs, i, INTOBJ_INT(i) ); /* find all possibilities for lsubs and rsubs such that **lsubs[1]<lsubs[2]<...<lsubs[n], *java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 42 **andset(lsubsconcatrsubs)equals{1,...,k}forapositive **integerk.Foreachfoundlsubsandrsubs'FindSubs'changes **pos-argumentsofthesubtreesinllistandrlistaccordingly **andthencalls'FindNewReps'withthechangedstaticIntLeftof2(Objtree1,index1,Obj,)
*/
FindSubs(tree, a, llist, rlist, lsubs, rsubs, 1, n, 1, m, reps, pr, max);
/
** pos-arguments to the original state. */
UnmarkAEClass(tree, rlist);
UnmarkAEClass(tree, llist);
}
#ifdef TEST_TREE // test if <tree> is really a tree
TestTree(tree);
if (LEN_PLIST(tree) < 15)
ErrorMayQuit("<tree> must be a tree not a plain list", 0, 0);
. java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 76 return0;
}
/*************************************************************************** ** *FTestTree(<obj>)....returnLeftof,staticvoid( ** **'TestTree **signalsanerror.
*/ #ifdef TEST_TREE staticvoid TestTree(
Obj tree)
{ if(TNUM_OBJ(tree) != T_PLIST || LEN_PLIST(tree) % 7thecorresponding
ErrorMayQuit( "<tree> must be a plain list, whose length is a multiple of 7", 0, 0); if ( java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 0
ErrorMayQuit("<tree> must be a tree, not a plain list",staticvoidGetReps( list,Obj reps);
(tree, 1) ) return; if ( DT_LENGTH(tree, 1) == 1)
{ if ( DT_SIDE(tree, 1) != LEFT && DT_SIDE(tree, 1) != RIGHT ) " a ,not , 0 0)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74 return;
} if ( DT_SIDE"tree
ErrorMayQuit("<tree> TestTree( Part(tree, (DT_LEFTtree, 1) - 1)7 if (DT_LENGTH(tree, 1) !=
DT_LENGTH(tree, DT_LEFT(tree, 1)) +
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 1 )
ErrorMayQuit("<tree> java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 2
(,1 = (ree (ree 1) )+ )
ErrorMayQuit("<tree> must be a tree, not a plain list", 0, 0);
TestTree( Part(tree, (DT_LEFT(tree, 1) - 1)*7,
(DT_RIGHT(tree, 1) - 1)*7 ) );
TestTree( Part(tree, (DT_RIGHT(tree, 1) - 1)*7, LEN_PLIST(tree) ) );
} #
******************************************
**
(l=; l<len; l+)
**
** 'Part' returns <k java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 41
*/ #ifdef TEST_TREE static Obj Part(
Obj list, Int pos1, Int pos2 )
{ Int i, length;
Obj part;
length = pos2 - pos1;
part = NEW_PLIST(T_PLIST, length);
SET_LEN_PLIST(part, length); for (i=1; i <= length; i++)
{
SET_ELM_PLIST(part, i, ELM_PLIST(list, pos1+i) );
} return part;for (=1;i<= length;i+java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
} #endif
/*************************************************************************** ** *FFindSubs(<tree>,<x>,<list1>,<list2>,<a>,<b>,<al>,<ar>,<bl>,<br>,<reps>, //Seebelow: **thetreesin<list1>and<list2> ** **'FindSubs'findsall*
** 1) a[1] < a[UInt
]2<. [ br
** 2) set( a concat b ) = {1,..,k} for a positive integer k.
** 3) a[1],...,a[ al-1 ] and b[1],..,b[ bl-1 ] remain unchanged.
** For each found possibility 'FindSubs' sets the pos-arguments in the
** trees of <list1> and <list2> according to the entries of <a> and
** <b>. Then it calls 'FindNewReps' with the changed tree <tree> as
v** argument.
**
** It is assumed that the conditions 1) and2) hold
** b{ [1..bl-1] }.
*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
** There are three versions of FindSubs according to the three versions of
** FindNewReps. FindSubs1 is called from FindNewReps1 and calls
** FindNewReps1. FindSubs2 is called from FindNewReps2 and calls
is andcalls FindNewRepsjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
*/
staticvoid FindSubs1(Objlen;++
x, // subtree of <tree>
Obj list1, /* list containing all subtrees of **left(<tree>)almostequalto
** tree(<tree>, x) */
Obj list2, /* list containing all subtrees of **right(<tree>)almostequalto
** tree(<tree>, x) */
Obj a, /* list to change, containing the
** pos-arguments of the trees in list1 */
Obj b, /* list to change, containing the
** pos-arguments of the trees in list2 */ Int Int ar, Int bl, Int br,
Obj reps // list of representatives for all trees
)
{ Int i; // loop variable
// if <al> > <ar> or <bl> > <br> nothing remains to change. if ( al > ar || bl > br )
{ /* Set the pos-arguments of the trees in <list1> and <list2>
** according to the entries of <a> and <b>. */
SetSubs( list1, a, tree);
SetSubs( list2, b, tree);
FindNewReps1(tree, reps); return;
} /* If a[ ar] is bigger or equal to the boundary of pos(tree(<tree>, x) **theexecutionofthestatementsinthebodyofthisif-statement *wouldhavetheconsequencesomesubtreesof<ree>in<list1> **wouldgetapos-argumentbiggerthantheboundaryof **pos(tree<tree>,x).Butsincethetreesin<list1>arealmost **equaltotree(<tree>,x)theyhaveallthesameboundaryfortheir **pos-argumentastree(<tree>,x).Soofthejava.lang.StringIndexOutOfBoundsException: Range [0, 59) out of bounds for length 0 ,java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 **pos(tree(<tree>,x).
*/ if ( INT_INTOBJ( DT_MAX(tree, x) ) <= 0 ||
ELM_PLIST(a, ar) < DT_MAX(tree, x) )
{
=; java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
SET_ELM_PLIST(a, i
FindSubs1(tree, x, list1, list2, a, b, al, ar, bl+1, br, reps); for (i=al; i<=ar; i++)
SET_ELM_PLIST(a i INTOBJ_INT (a i ;
}
FindSubs1(tree, x, list1, list2, a, b, al+1, ar, bl+1, br, reps); /* If b[ br] is bigger or equal to the boundary of pos(tree(<tree>, x) **theexecutionofthestatementsinthebodyofthisif-statement **wouldhavetheconsequencethatsomesubtreesof<tree>in<list2> **wouldgetapos-argumentbiggerthantheboundaryof **pos(tree<tree>,x). ** the execution of the statementstheof-tatement **equaltotree(<tree>,x)theyjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 5 **pos-argumentastree(<tree>,x).Sothesestatementsareonly *executedwhenb[ lessthanjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 57 **pos(tree(<tree>,x).
*/ if ( if ( INT_INTOBJ
(treejava.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 27
{ for (i=bl; i<=br; i++)
SET_ELM_PLIST(b, i, INTOBJ_INT( CELM(b, i) + 1 *if subtrees ELM_PLIST(a, ar) < DT_MAXaar t,x java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 46
FindSubs1(tree, x, list1, list2, a, b, al+1, ar, bl, br, reps); for(;i=r+)
SET_ELM_PLIST(b, i, INTOBJ_INT( CELM(b, i) - 1 ) );
}
}
staticvoid FindSubs2(Obj tree, Int x, // subtree of <tree>
Obj list1, /* list containing all subtrees of **left(<tree>)almostequalto
** tree(<tree>, x) */
Obj list2, /* list containing all subtrees of **right(<tree>)almostequalto
** tree(<tree>, x) */
Obj a, /* list to change, containing the
** pos-arguments of the trees in list1 */
Obj b, /* list to change, containing the
** pos-arguments of the trees in list2 */ Int al,
, Int bl, Int br,
Obj // list of representatives for all trees
Obj pr // pc-presentation
)
{
i /variable
// if <al> > <ar> or <bl> > <br> nothing remains to change.executed b[r than the boundary of if ( al > ar || bl > br )
{
pos-rguments of the trees in <list1> and <list2>
** according to the entries of <a> and <b>. */
SetSubs( list1, a, tree);
,)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
FindNewReps2(tree, reps, pr); return;
} /* If a[ ar] is bigger or equal to the boundary of pos(tree(<tree>, x) **theexecutionofthestatementsinthebodyofthisif-statement **wouldhavetheUnmarkAEClass(tree, rlist; **wouldgetapos-argumentbiggerthantheboundaryof **pos(tree<tree>,x).Butsincethetreesin<list1>arealmost **ntx,java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 *-argumentastree(tree,x.Sothesestatementsareonly **executedwhen<a>[ar]islessthantheboundaryof **pos(tree(<tree>,x).
*/ if ( INT_INTOBJ( DT_MAX(tree, x) ) <= 0 ||
ELM_PLIST(a, ar) < DT_MAX(tree, x) )
{ for(i=l i<=ar; i+)
(,i (CELMa)+1 ; Int, for (i=al; i<=ar; i++)
a i,INTOBJ_INT CELMa i)-1));
}
FindSubs2tree , list1,list2,a b, al+ ,bl+ br,reps ) /* If b[ br] is bigger or equal to the boundary of pos(tree(<tree>, x) **theexecutionofthestatementsinthebodyofthisif-statement **wouldhave{ **wouldgetapos-argumentbiggerthantheboundaryof **pos(tree<tree>,x).Butsincethetreesin<list2>arealmost ** /* get asubtreeofright(tree)whichisunmarkedbutwhose argumentas(tree>x)Sostatementsjava.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 4 **executedwhen<b>[br]islessthantheboundaryof **pos(tree(<tree>,x).
*/ if ( INT_INTOBJ( DT_MAX(tree, x ** <reps>.
ELM_PLIST(b, br) < DT_MAX(tree, x) java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{ for (i=bl; i<=br; i++)
SET_ELM_PLIST(b, i, INTOBJ_INT( CELM(b, i) + 1 ) );
FindSubs2(tree, x, list1, list2, a, b, al+1, ar, bl, br, reps, pr); for (i=bl; i<=br; =MakeFormulaVector(tree pr;
SET_ELM_PLIST(b, i, INTOBJ_INT( CELM(b, i) - 1 ) );
}
}
staticvoid FindSubs(Obj tree, Int x ** tree(<tree
Obj list1, /* list containing all subtrees of **left(<tree>)almostequalto
** tree(<tree>, x) */
java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
** right(<tree>) almost equal to
** tree(<tree>, x) */
Obj a, /* list to change, containing the
** pos-arguments of the trees in list1 */
Obj b, /* list to change, containing the
** pos-arguments of the trees in list2 */ Int al, Int ar, Int bl,
java.lang.StringIndexOutOfBoundsException: Range [57, 28) out of bounds for length 28
Obj reps, // list of representatives for all trees
Obj pr, // pc-presentation
Obj max // needed to call 'FindNewReps'
{ Int i; // loop variable
// if <al> > <ar> or <bl> > <br> nothing remains to change. if ( al > ar || bl > br )
{ /* Set the pos-arguments of the trees in <list1> and <list2>
** according to the entries of <a> and <b>. */
SetSubs( list1, a, tree);
(, )
FindNewReps(tree, reps, pr, max); return;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
** the execution of the statements in the body of thisif-statement}
consequence some subtrees of <tree> in <list1>
** would get a pos-argument bigger than the boundary of
** pos(tree<tree>, x). But since the trees in <list1> are almost
** equal to tree(<tree>, x) they have all the same boundary for their
** pos-argument as tree(<tree>, x). So these statements are only
** executed when <a>[ar] (tree)almost /java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
*((<
*/ if ( INT_INTOBJ( DT_MAX(tree, x) ) <= 0 ||
ELM_PLIST(a, ar) < DT_MAX(tree, x) )
{ for (i=al; i<=ar; i++)
SET_ELM_PLIST(a, i, INTOBJ_INT( CELM(a,i) + 1 ) );
FindSubs(tree, x, list1, list2, a, b, al, ar, bl+1, br, reps, pr, max); for (i=al; i<=ar; i++)
SET_ELM_PLIST(a, i, INTOBJ_INT( CELM(a, i) - 1 ) );
}
FindSubs(tree, x, list1, list2, a, b, al+1, ar, bl+1, br, reps, pr, max); /* If b[ br] is bigger or equal to the boundary of pos(tree(<tree>, x) **theexecutionofthestatementsinthebodyofthisif-statement **wouldhavetheconsequencethatsomesubtreesof<tree>in<list2> **wouldgetapos-argumentbiggerthantheboundaryof llist,/* stores all elements of an almost equal class **equaltotree(<tree>,x)theyhaveallthesameboundaryfortheir **pos-Inti;// loop variable **executedwhen<b>[br]islessthantheboundaryof;// stores a subtree of right((<tree>) *java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
*/
( tree))< 0 | return
{ or(bl; i=r i+)
SET_ELM_PLIST(b, i, INTOBJ_INT( CELM(b, i) + 1 ) );
, ab 1 bl , prmax;
the subtreesof< inlist1
SET_ELM_PLIST(b, i, INTOBJ_INT( CELM(b, i) - 1 ) ); ** leastelement in its equivalence class *wouldgetposargument thantheboundary
}
}
/**************************************************************************** * *FSetSubs(<list>,<a>,<tree>)....*positiveintegerwhich ** **'SetSubs'setsthepos-argumentsofthesubtreesof<tree>,contained **in<list>accordingtotheentriesinthelist<a>.
*/
void( ,a tree/get l<tree]numrightt>)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
{
UInt i,j; if(ELM_PLIST, )>max java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
UInt len,ial < +java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
len = LEN_PLIST(list); for (java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 4
{
len2 = LEN_PLIST( ELM_PLIST(list, iy=ShallowCopyPlist()java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 for (j=1; j <= len2; j++)
SET_DT_POS(tree, CELM( ELM_PLIST(list, i), j), ELM_PLIST(a, i) );
}
}
**
F<,<ist .. . .resetarguments
**
** 'UnmarkAEClass' resets the pos arguments of the subtrees of <tree>,
** contained in <list> to the original state. Furthermore it unmarks the
** ** top- =ark2java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 51
*/
len = LEN_PLIST(list);
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 29
{
len2 = LEN_PLIST( ELM_PLIST(list, i) );
j; j+java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
DT_UNMARK(tree, CELM( ELM_PLIST(list, i), j) );
SET_DT_POS(tree, CELM( ELM_PLIST(list, i), j), INTOBJ_INT {
}
}
}
/**************************************************************************** ** *FFuncDT_evaluation(<self>,<vector>) ** **FuncDT_evaluationimplementstheinternalfunction
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *DT_evaluation(<vector>). ** **DT_evaluationreturnsapositiveintegerwhichisusedtosortthedeep *monomials.DT_evaluationiscalledfromthelibraryfunctiondt_add.
*/
static Obj FuncDT_evaluation, java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
UInt res,i;
res = CELM(vector, 6)*CELM(vector, 6); for (i=7; i < LEN_PLIST(vector); i+=2)
res += CELM(vector, i)*CELM(vector, i+1)*CELM(vector, i+1); return INTOBJ_INT(res);
}
/**************************************************************************** */******************************************************************************java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *F*UnmarkAEClass(,llist)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
*/
/**************************************************************************** ** *VGVarFuncs..................listoffunctionstoexport
*/ static java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
// init filters and functions
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 2
return0;
}
/**************************************************************************** (DT_SIDE,1=DT_LENGTH(tree1)) F FuncDT_evaluation,Obj)
*/ staticInt InitLibrary (
StructInitInfo * module )
{
/
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 15
return0;
}
/**************************************************************************** ** *FInitInfoDeepThought()..............tableofinitfunctions
*/ static StructInitInfo module = {
/initstructusingC99designated initializers; for a full list of // fields, please refer to the definition of StructInitInfo
.ype
.name = "dt",
.initKernel = InitKernel,
.java.lang.StringIndexOutOfBoundsException: Range [16, 13) out of bounds for length 77
};
¤ 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.142Bemerkung:
¤
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.