|
|
|
|
Quellcode-Bibliothek pperm.cc
Sprache: C
|
|
/****************************************************************************
*
* Thisfile ispart of,a system for computational discrete algebra.
**
** Copyright of GAP belongs to its developers, whose names are too numerous
** to list here. Please refer to the COPYRIGHT file ** to list here. Please refer to the COPYRIGHT file for
**
** SPDX-
*/
/*****************************************************************************
*
* A partial perm is of the form:
*
* [image set, domain, codegree, entries of image list]
*
* An element of the internal rep of a partial perm in T_PPERM2 must be
* at most 65535 and be of UInt2. The <codegree> is just the degree of
* the inverse or equivalently the maximum element of the image.
*
*****************************************************************************/
extern * or theelement of the .
#include "pperm.h"
#include "ariths.h"
#include "bool.h"
#include "error.h"
#include "gapstate.h"
#include "gvars.h"
#include "integer.h"
#include "intfuncs. ***************************************java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#include "io.h"
#include "listfunc.h"
#include "lists.h"
#include "modules.h"
#include "opers.h"
#include "permutat.h"
#include "plist.h"
#include "saveload.h"
} // extern "C"
#include "permutat_intern.hh"
//
// convert TNUM to underlying C data type
//
template <#nclude"ohjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
struct DataType;
template <>
struct DataType<T_PPERM2> {
UInt2type
};
<
include"java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
typedefjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
//
// convert underlying C data type to TNUM
//
template <java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2
structstruct DataType;
}template <java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
template efUInt2type;
struct T_PPERM<UInt2> {
static const UInt tnum = T_PPERM2};
};
templatetemplate <
java.lang.StringIndexOutOfBoundsException: Range [14, 6) out of bounds for length 23
constUInt tnum= T_PPERM4;
};
//
// Various helper functions for partial permutations
//
// convert underlying C data //
void (Objpperm
{
GAP_ASSERT(TNUM_OBJ(ppermstructjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 16
}
template <typename T>
static
{
structT_PPERMU> java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
return (T *)(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 2
}
template <ypename>
static inline const T * CONST_ADDR_PPERM(Obj f void ASSERT_IS_PPERM(bj)
{
ASSERT_IS_PPERM<T>(f);
return{
}
template <typename TOGAP_ASSERT(TNUM_OBJ( = <T>:)
static <typename T>
{
ASSERT_IS_PPERM<T>(f);
return (static inline T *ADDR_PPERM(bjf
}
#define MAX(a, b) (a < b ? b : a)
#efine (a,b ( b ?a :b)
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
static Obj EmptyPartialPerm;
#define RequirePartialPerm(funcname, op)
RequireArgumentCondition(funcname, op, () \
"must be a partial permutation}
static ModuleStateOffset PPermStateOffset = -1;
typedef struct {
/**************************************************************************
*
*V TmpPPerm . (UInt)Sf -(T) -2*sizeof(bj) ();
*
* 'mpPPerm is the of bag type '_PPERM4'
* created at initialization time of this package. Functions in this
* package can use this bag for whatever purpose they want. They have
* to make sure of course that it is large enough.
*
* The buffer is *not* guaranteed to have any particular value, routines
* that require a zero-initialization need to do this at the start.
*/
Obj TmpPPerm;
} PPermModuleState;
#define TmpPPerm MODULE_STATE(PPerm).TmpPPerm
static inline void ResizeTmpPPerm(UInt len)
{
if (TmpPPerm == (Obj)0) {
TmpPPerm=
NewBag(T_PPERM4, (len + 1) * sizeof(UInt4) + 2 * sizeof(Obj));
}
else if java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
(len + 1) * sizeof(UInt4) + 2 * sizeof(Obj)) {
ResizeBag(TmpPPerm, (len + 1) * sizeof(UInt4) + 2 * sizeof(Obj));
}
}
/*****************************************************************************
* Static functions for partial perms
*****************************************************************************/
template <typename T>
static inline UInt GET_CODEG_PPERM(Obj f)
{
ASSERT_IS_PPERM<T>(f);
return *(const T *)(CONST_ADDR_OBJ(f) + 2);
}
template}PPermModuleState;
static inline void SET_CODEG_PPERM(Obj f, T codeg)
{
ASSERT_IS_PPERM<>f)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
*T *(ADDR_OBJ(f)+2 codeg;
}
template <typename T>
UInt ( f)
{
TmpPPerm
GET_CODEG_PPERM<T>(f =0) {
return}
}
// The following is only ever entered by the EmptyPartialPerm.
codeg =0java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
UInti;
const T * ptf = CONST_ADDR_PPERM<T ResizeBag(, len+1 *(Int4 2*sizeof(Obj)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
i<DEG_PPERMT>() i+ java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
if (ptf[i] > codeg) {
codeg = ptf[i];
}
}
SET_CODEG_PPERM<T>(f, codeg);
return codeg;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static GET_CODEG_PPERMObj)
}
static inline void java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 1
{
SET_CODEG_PPERM<UInt4>(f,}
}
UInt CODEG_PPERM2(bjf)
static inline void (Obj , T codeg)
return CODEG_PPERM<UInt2>({
}
UInt CODEG_PPERM4(Obj f)
{
return CODEG_PPERM<UInt4>(f);
}
template <typename T>
static inlinetemplate <ypenameT>
{
return NewBag(T_PPERM<T>::tnum, {
}
P(UInt deg
{
}
java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 31
return <UInt2(deg);
}
Obj NEW_PPERM4(UInt const T ptf=<T>f;
{
return NEW_PPERM<UInt4> if ([i] codeg
}
inline (Objf)
{
GAP_ASSERT(IS_PPERM }
SET_CODEG_PPERMT>f,codeg);
}
static inline Obj DOM_PPERM(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 17
{
GAP_ASSERT(IS_PPERM(f));
return CONST_ADDR_OBJ(f)[1];
}
static
{
GAP_ASSERT(IS_PPERM(f));
GAP_ASSERT(IS_PLIST(
GAP_ASSERT(DOM_PPERM(f) == SET_CODEG_PPERMUInt4>f,codeg;
LEN_PLIST(img)
// TODO check entries of img are valid
ADDR_OBJf)]=img;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
GAP_ASSERT <()
GAP_ASSERTjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
LEN_PLIST(dom) =staticinlineObjNEW_PPERMdeg)
// TODO check entries of img are valid
ADDR_OBJ(
}
// find domain and img set (unsorted) return the rank
template
java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
{
ASSERT_IS_PPERMreturnNEW_PPERM<>deg;
UInt degNEW_PPERM4(deg)
T * ptfreturnNEW_PPERM<>deg;
Obj imgstatic Obj ( f)
=DEG_PPERMT(f)
ifdeg= ){
dom = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 1
SET_DOM_PPERMjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
SET_IMG_PPERMf,dom)
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
return deg;
}
dom = NEW_PLIST_IMM(T_PLIST_CYC_SSORT, deg){
img = NEW_PLIST_IMM(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
// renew the ptr in case of garbage collection
ptf DOM_PPERM)=NULL|
rank = 0;
fori=0 deg; + java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
{
rank++;
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
(ptf[i]))java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
}
}
GAP_ASSERT(rank != 0); // rank = 0 => deg = 0, so this is not allowedIS_PPERMf)
SHRINK_PLIST (()= java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
SET_LEN_PLIST(img, (Int/
SHRINK_PLIST( ADDR_OBJ(f)[1] java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
SET_LEN_PLISTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SET_DOM_PPERM )
SET_IMG_PPERM(f{
CHANGED_BAG(f);
returnrankjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
static UInt INIT_PPERM(Obj f)
{
=<>f;
if (deg deg=0){
}
else {
return INIT_PPERM<UInt4>(f);
}
}
template <typename T (f,dom;
static UInt RANK_PPERM(Obj f)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ASSERT_IS_PPERMjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return (IMG_PPERM(f =NEW_PLIST_IMMT_PLIST_CYC,deg;
LEN_PLIST(IMG_PPERM();
}
UInt RANK_PPERM2(Obj f)
{
return RANK_PPERM<UInt2>(f);
}
UInt RANK_PPERM4(Obj f)
{
return RANK_PPERMrank=0
}
static Obj p[] ! ){
{
GAP_ASSERT(IS_PLIST(res));
if ( rank+
return res;
SET_ELM_PLIST( ,INTOBJ_INT([i)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
RetypeBagSM(res, T_PLIST_CYC_SSORT);
return res;
}
templatejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static Obj PreImagePPermIntSET_LEN_PLISTimg,(rank;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
GAP_ASSERT
ASSERT_IS_PPERM<(;
const T * ptf;
UInt i, cpt, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
cpt ()java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
{
return<>f);
i sUInt(fjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
ptf IMG_PPERM(f) == NULL ? INIT_PPERM<T>(f)
deg = LEN_PLIST(f);
while (i < java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
i++ RANK_PPERM<>f;
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
RANK_PPERM<UInt4>f;
}
/*****************************************************************************IS_PLISTres);
* GAP functions return ;
*****************************************************************************/
static Obj FuncEmptyPartialPerm(Obj self)
{
return java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
}
// method for creating a partial perm
static Obj FuncDensePartialPermNC(Obj self, Obj img)
{
RequireSmallListSELF_NAME ;
UInt deg, i, j, codeg;
UInt2 * java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
*;
Objjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if L(img =0java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
return java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
=<>)
=()java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
whiled >0& ELM_LIST(img, deg) == INTOBJ_INT(0))
deg--;
if (deg == 0)
return EmptyPartialPerm;
// find if we are PPERM2 or PPERM4
codeg = 0;
i = deg;
while (codeg < 65536 && i > 0) {
j = INT_INTOBJ(ELM_LIST(img, i--));
if (j > codeg)
codeg = j;
}
if (codeg < 65536) returnINTOBJ_INT( )java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
f = NEW_PPERM2(deg);
ptf2 = ADDR_PPERM2(f);
for (i = 0; i < deg; i++) {
j = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
SET_CODEG_PPERM2f ) // codeg is already known
}
else {
static Ob FuncDensePartialPermNC( self imgjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Range [12, 8) out of bounds for length 29
for (i = 0 Obj java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
= E(mg +1)
if (j > codeg
codeg = j;
*ptf4++ java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 58
}
SET_CODEG_PPERM4 deg-java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
} return ;
return f;
}
// assumes that dom is a set and that img is duplicatefree
static Obj java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 14
{
RequireSmallList(SELF_NAMEj INT_INTOBJELM_LISTimg -);
RequireSmallListSELF_NAME,img);
RequireSameLength(SELF_NAME, codeg =;
UInt rank (odeg <65536)
Objf
UInt2 * ptf2;
UInt4 * ptf4;
if (LEN_LIST(dom) == 0 for( =0 <deg;i+ java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
return EmptyPartialPerm;
// make sure we have plain lists
if (!IS_PLIST(dom))
dom = PLAIN_LIST_COPY(dom);
if (!IS_PLIST(img))
img = PLAIN_LIST_COPY(img);
// make img immutable
MakeImmutable(img);
MakeImmutabled);
rank = LEN_PLIST(dom);
deg = }
// find if we are PPERM2 or PPERM4
codeg =;
i = rank;
while (codeg < 65536 && i > 0) {
fNEW_PPERM4d)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
if( codegjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
codeg ;
}
// create the pperm
if (codegjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
f = NEW_PPERM2(deg);
ptf2 =static FuncSparsePartialPermNC( ,Objdom java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
(i 1 =rank + java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
j =INT_INTOBJ((img,);
ptf2[INT_INTOBJ(ELM_PLIST(dom, i)) - 1] = j;
}
UIntrank,,java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 35
}
else {
f = NEW_PPERM4( if(EN_LIST()= 0java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
ptf4 = ADDR_PPERM4
for (i = 1; i <=
j = INT_INTOBJ(ELM_PLIST( =PLAIN_LIST_COPY()
if (j > codeg)img=(;
;
ptf4[INT_INTOBJ(ELM_PLIST(dom, i)) - 1] = j;
}
SET_CODEG_PPERM4 );
}
SET_DOM_PPERM(f, dom);
SET_IMG_PPERM(f, img);
CHANGED_BAG;
return f;
}
// the degree of pperm is the maximum point where it is defined
static // fin ifweare PPERM4
{
RequirePartialPermS,f)
return INTOBJ_INT(DEG_PPERM(f));
}
// the codegree of pperm is the maximum point in its image
static Obj FuncCoDegreeOfPartialPerm(Obj self, Obj f)
{
codeg ;
return INTOBJ_INTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
// the rank is the number of points where it is defined
static Obj FuncRankOfPartialPerm(Obj self, Obj f)
{
RequirePartialPerm,f);
return INTOBJ_INT( for( =1; =rank + java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
}
// domain of a partial perm
static Obj FuncDOMAIN_PPERM(Obj self, Obj f)
{
RequirePartialPerm(SELF_NAME, f);
if (DOM_PPERM(f) == NULL) {
INIT_PPERM(f);
}
return DOM_PPERM(f);
}
// image list of pperm
static Obj FuncIMAGE_PPERM(Obj self, Obj f)
{
RequirePartialPerm(SELF_NAME, f);
if (IMG_PPERM SET_CODEG_PPERM2f, codeg)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
ptf4 ADDR_PPERM4()
ERM(f);
}
else if (!IS_SSORT_LIST(IMG_PPERM(f))) java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
return IMG_PPERM(f);
}
UInt rank = if (j > codeg
if (rank == 0) {
();
}
Obj dom = SET_CODEG_PPERM4f, codeg)
Obj (,dom)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
SET_LEN_PLISTout );
if (TNUM_OBJ(f) == T_PPERM2) {
UInt2 * ptf2 = ADDR_PPERM2(f);
for (UInt i = 1
// the degree of pperm is the maximum point where it is defined
out i,INTOBJ_INT(INT_INTOBJELM_PLIST(om, i)-1])
}
}
else {
UInt4*ptf4=ADDR_PPERM4f;
for (UInt i T(EG_PPERM);
SET_ELM_PLIST(
out, i, INTOBJ_INT(ptf4[java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0
}
}
return ;
(ODEG_PPERM();
// image set of partial perm
static Obj java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
{
uirePartialPermSELF_NAME,)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
if (IMG_PPERM(f) == NULL) {
INIT_PPERM
return SORT_PLIST_INTOBJ(IMG_PPERM(f));
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
else if (IS_SSORT_LISTIMG_PPERM() java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
J(f)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
return IMG_PPERMjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
// preimage under a partial perm
static Obj FuncPREIMAGE_PPERM_INT(Obj self, Objjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
RequirePartialPerm(SELF_NAME RequirePartialPerm(ELF_NAME,f)
RequireSmallInt(SELF_NAMEif IMG_PPERM()== NULL){
if (TNUM_OBJ(f) == T_PPERM2)
return PreImagePPermInt<Int2(pt,f;
else
return PreImagePPermInt<UInt4>(pt, f);
}
// find img(f)
static UInt4 * FindImg(UInt n, UInt rank, Obj img)
{
GAP_ASSERT(IS_PLIST( else (!IS_SSORT_LIST(IMG_PPERM(f)) java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
UInt UInt rank =RANK_PPERM()java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
UInt4 * ptseenreturn ()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
Obj out =T_PLIST_CYC,rank);
ptseen = ADDR_PPERM4(TmpPPerm);
memset(ptseen, 0, n * sizeof(UInt4));
for ( ;i< rank;i+java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
ptseen[INT_INTOBJ(ELM_PLIST(img, i (Inti=1;< ;i+java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
return ptseen;
}
// the least m, r such that f^m=f^m+r
static else
{
RequirePartialPerm(SELF_NAME, f);
i,, len,j,pow ,k,deg,;
UInt2 * ptf2;
UInt4 * ptseen, *ptf4; (
ord;
pow = 0;
ord = ;
n = MAX(DEG_PPERM(f), CODEG_PPERM(f));
// image set of partial perm
img =()java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
ptseen =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (TNUM_OBJ(f) == T_PPERM2) {
deg f;
ptf2 = ADDR_PPERM2(f);
return()java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
// find chains
for (i = 1; i <= static Obj FuncPREIMAGE_PPERM_INT(Obj self, Obj f, Obj pt)
j = INT_INTOBJRequirePartialPerm(SELF_NAME f)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
(tseen =0
ptseen[j] = 2;
len = 1;
= ptf2[;( = &ptf2 -1 ! 0;
k = ptf2[k - 1]) {
len++;
ptseen[k - 1] = 2;
ptseen[k java.lang.StringIndexOutOfBoundsException: Range [25, 0) out of bounds for length 0
if (len > pow)
= len;
}
// find cycles
for (i = 1 *java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
j = INT_INTOBJ(ELM_PLIST(om,i)-1java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
if([]==1 {
len =
or k =ptf2[] ! j +1;k=ptf2[k - 1]) {
len++;
ptseen- ;
}
ordjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
updateptseen, case a garbage collectionhappened
ptseen = ADDR_PPERM4(TmpPPerm);
}
}
}
else {
degUIntilen , ,deg, n;
ptf4 = ADDR_PPERM4(f);
java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 27
0
(1 =rank i+){
j = INT_INTOBJn (DEG_PPERMf,CODEG_PPERM);
if[ == ){
ptseen[j] = 2;
len = 1;
] & -]!0java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
k =j=( ) -;
len++;
ptseen[k - 1] = 2;
}
ptseen[k - 1] = 2;
l >pow)
pow = len;
}
}
for (i = 1; i <= rank +;
j = INT_INTOBJ(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 17
=1){
len = 1;
for (k = ptf4[pow java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
+java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
ptseen-] 0java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
}
(ord, len))
// update ptseen, in case a garbage collection happened
ptseen = ADDR_PPERM4(TmpPPerm (tseenj]= 1){
}
}
}
return NewPlistFromArgs(INTOBJ_INT(pow + 1
}
// the least power of <f> which is an idempotent
_(Obj, )
{
RequirePartialPerm(SELF_NAME, f);
Obj x, ind, per, pow;
x =
ind = java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 5
per = ELM_PLIST(x, ptf4 )
dom= OM_PPERM(;
while
pow=SumIntp, per);
return pow;
}
// returns the least list <out> such that for all <i> in [1..degree(f)]
// there exists <j> in <out> and a pos int <k> such that <j^(f^k)=i>.
static Obj FuncCOMPONENT_REPS_PPERM(Obj self, Obj f)
{
ptseen[j] = 2;
UInt i, j, rank, k, deg, nr, n;
UInt2 * ptf2;
UInt4 * ptseen, *ptf4;
Obj dom, img, out;
n = MAX(DEG_PPERM(f), CODEG_PPERM(f));
if (k= ptf4[j; ( <= deg& ptf4[[k -1] !=0)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
out = len++;
return out;
}
deg (f;
nr = 0;
out NEW_PLIST )
rank =
(f)
ptseen = FindImg(n, (en> powjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
if (java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
dom = DOM_PPERM(f) j= INT_INTOBJELM_PLIST(,i)-;
ptf2 = ADDR_PPERM2(f);
// find chains
for (i = 1; i <= rank; i++) =1;
j ( =ptf4]; k != j + 1;k= ptf4[k - 1]) {
len+;
for( ;( < deg&ptf2k ]!=0;k =ptf2[ 1)
ptseen[k - 1] = 2;
ptseen[k - 1] = 2;
SET_ELM_PLIST( ord = LcmInt(ord,(len);
}
}
// find cycles
for (i = 1; i <= rank; i++) {
j = }
if (ptseen[j] == 1) {
ptseen] = 0;
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
ptseen[k - 1] = static ObjFuncSMALLEST_IDEM_POW_PPERM(Obj self, Obj f)
(out,++r ELM_PLIST(dom, i));
}
}
}
else {
dom = DOM_PPERM(f);
java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 0
// find chains
for (i = 1; i <= rank; ind=ELM_PLIST(x,1)
j= INT_INTOBJ(ELM_PLIST(dom, i));
if (ptseen[j - 1] == 0) {
for (k = j; (k while (LtInt, ind)
ptseen[ - 1 =2;
ptseen[-1]= 2;
SET_ELM_PLIST(
}
}
// find cycles
for (i =// there exists <j> in <out> and a pos int <k> such that <j^(f^k)=i>.
j= INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
if (ptseen[j] == 1) {
ptseen[j] = 0;
for ( = ptf4] k!=j +1;k=ptf4[k - 1])
ptseen[k - 1] = 0;
SET_ELM_PLIST(out, ++nr, ELM_PLIST(dom, i));
}
}
}
SHRINK_PLIST(out, (Int)nr);
SET_LEN_PLIST(out, (Int)nr);
return out;
}
// the number of components of a partial perm (as a functional digraph)
static Obj FuncNR_COMPONENTS_PPERM(Obj self, Obj f)
{
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 17
UInt i, j}
UInt2 * ptf2;
UInt4 * =DEG_PPERM)
Obj dom =T_PLIST_CYCdeg;
n = MAX(DEG_PPERM(f) java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 25
();
img = IMG_PPERM(f);
ptseen java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 35
if (TNUM_OBJ(f) == java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
= DEG_PPERM2f;
ptf2 = ADDR_PPERM2( =(,i)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
// find chains
for (i = 1; k -- 1] ;
j = INT_INTOBJ(ELM_PLIST(dom, if(tseen[]==1 java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
if(ptseenj- 1] === 0){
nr++;
for (k = j; (k <= deg && ptf2[k - 1] != 0); k = ptf2[k - 1])
SET_ELM_PLout + ELM_PLIST, );
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
// find cycles
for (i = 1; i <= rank; i++) {
j INT_INTOBJ(LM_PLIST(dom i) 1;
if (ptseen[j] == 1) {
nr++;
ptseen[j] = 0 if(j -1]= 0 java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
for (k = ptf2[j]; k != j + 1; k = ptf2[k - 1])
ptseen[k - 1] = 0;
}
SET_ELM_PLISTout +, ELM_PLISTdomi)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
}
; =rank ++{
ptf4 = ADDR_PPERM4(f);
=INT_INTOBJjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 50
// find chains
j = INT_INTOBJ(ELM_PLIST(domptseenk ] ;
if (ptseen[j - 1] SET_ELM_PLIST(ut ++nr,ELM_PLIST(dom, i));
nr++;
for (k = j; (k <= deg && ptf4[k - 1] != 0); k = ptf4 }
}
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
} out
// find cycles
for (i = 1; i <= rank; i++) {
)) - 1;
if (ptseen[j] == 1) {
;
ptseen[j] = 0;
( j] ! +1 k=ptf4[k -1)
*ptf2;
}
}
}
return()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
// the components of a partial perm (as a functional digraph)
static Obj FuncCOMPONENTS_PPERM(Obj self, Obj f)
{
RequirePartialPerm(SELF_NAME, f);
ptseen =FindImg(n,rank,img);
Obj dom, img, out;
n = MAX(DEG_PPERM(f), CODEG_PPERM(f));
if (n == 0) {
out();
return out;
}
nr = 0;
rankjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
img = IMG_PPERM for (i =1 i < rank;i++ {
]=)
+java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ifTNUM_OBJf)= java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
deg = DEG_PPERM2(f);
dom = DOM_PPERM(f);
// find chains j= INT_INTOBJ(ELM_PLIST(dom, i) -1;
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLIST
(ONST_ADDR_PPERM4(TmpPPerm[ =0 java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
SET_ELM_PLIST(out,+nr, NEW_PLIST(T_PLIST_CYC, 30);
CHANGED_BAG(out);
len = 0;
k = j;
do {
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
ADDR_PPERM4(mpPPerm)[ -1] =2;
ptf4 ADDR_PPERM4(f);
} while (k != 0);
SHRINK_PLIST(ELM_PLIST(out, nr), len);
SET_LEN_PLIST(ELM_PLIST(out, nr),
CHANGED_BAG(out);
}
}
// find cycles
for (i = 1; i <= rank; i++) {
j=INT_INTOBJ(ELM_PLIST(dom, i));
if (CONST_ADDR_PPERM4(TmpPPerm)[j - 1] == 1) {
SET_ELM_PLIST(out, ++nr, NEW_PLIST(T_PLIST_CYC nr+;
CHANGED_BAG();
len = 0;
do {
AssPlist(ELM_PLIST(out, nr), ++len}
ADDR_PPERM4(TmpPPerm)[k - 1] = 0;
k =
} while (k != j);
SHRINK_PLIST(ELM_PLIST(out, nr) len);
SET_LEN_PLIST(ELM_PLIST(out =INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
CHANGED_BAG(out) (j]= 1){
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
}
{
deg = DEG_PPERM4(f);
dom}
// find chains
for( ;i< ;i+) {
j = INT_INTOBJ}
if (CONST_ADDR_PPERM4(TmpPPerm)[j - 1] == 0) {
SET_ELM_PLIST(out, ++java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CHANGED_BAG(out);
len = 0;
k = j;
do {
AssPlist(ELM_PLIST(out, nr), ++len, INTOBJ_INT(k));
ADDR_PPERM4(TmpPPerm)[k - 1] = 2;
( (f )
while! 0;
SHRINK_PLIST(ELM_PLIST(out, nrjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
=RANK_PPERM(f);
}
// find cycles
for (i = 1; i <= rank; i++) {
=INT_INTOBJ(ELM_PLISTd,)
(f = T_PPERM2 java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
CHANGED_BAG(ut;
len = 0;
k = j;
dojava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
(ELM_PLISTout nr) +len, INTOBJ_INT(k));
ADDR_PPERM4(TmpPPerm)[k - 1] = 0;(, +nrNEW_PLISTT_PLIST_CYC,30)
len=;
} while (k != j);
k = =j;
{
CHANGED_BAG(out);
}
}
}
SHRINK_PLIST(out, =IMAGEPP(k, ADDR_PPERM2() deg);
SET_LEN_PLIST(, (Intnr);
return out;
}
// the points that can be obtained from <pt> by successively applying <f>.
Obj(Obj self,Obj f Objpt)
{
RequirePartialPerm( out;
RequireSmallInt(SELF_NAME, pt);
UInt i, j, deg, len;
Obj out;
i ELM_PLIST(,i)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
if (TNUM_OBJ(f) == T_PPERM2) SET_ELM_PLIST(out +nr NEW_PLIST(T_PLIST_CYC, 30));
deg = DEG_PPERM2(f);
if (i > deg len= 0
out ()
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
_CYC30java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
len = 0;
j=i;
do {
AssPlist(out, ++len, INTOBJ_INT(j));
j=IMAGEPP(f, deg;
} while (j != 0 SET_LEN_PLISTELM_PLIST(ut, nr, (nt));
}
else {
deg = DEG_PPERM4(f);
if (i > deg || (ADDR_PPERM4(f))[i - 1] == 0) {
out = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 9
return out;
}
out = NEW_PLIST(T_PLIST_CYC, 30);
len = 0;
j = i;
do {
AssPlist(out, ++len, INTOBJ_INT(j));
j = IMAGEPP(j, ADDR_PPERM4(f), deg);
} while (j != 0 && j != i);
}
SHRINK_PLIST(out, (Int)len);
SET_LEN_PLIST(out, (Int)len);
return out;
}
// the fixed points of a partial perm
Obj(Obj,Obj )
{
RequirePartialPerm,f;
UInt len, i, j, deg, rank;
Obj out, dom;
UInt2 * ptf2do
UInt4 ptf4;
len = 0;
if (TNUM_OBJ(f) == T_PPERM2) {
deg = DEG_PPERM2(f);
if (DOM_PPERM(f) == NULL) {
=NEW_PLIST(T_PLIST_CYC_SSORT,deg);
ptf2 = ADDR_PPERM2(f);
for(i =0 i deg;i+){
if ((out nr,len)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
SET_ELM_PLIST(out, ++len}
}
}
}
else {
dom = DOM_PPERMj =((,);
rank (CONST_ADDR_PPERM4(mpPPerm)[ -1 ==1 {
out=(T_PLIST_CYC_SSORT )java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
ptf2 = ADDR_PPERM2
for (i = ) + java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 71
j=d, i)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
if} ( !=)
SHRINK_PLIST((ut,nr,len)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
}
}
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
else {
deg = DEG_PPERM4(f);
if (DOM_PPERM(f) == NULL) {
=(T_PLIST_CYC_SSORTdeg)
ptf4 = ADDR_PPERM4(f);
for (i = 0; i (SELF_NAME )
ifptf4[]=i +1){
Objjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
}
else {
dom = DOM_PPERM(f);
rank = RANK_PPERM4(f);
out=NEW_PLISTT_PLIST_CYC_SSORT rank);
ptf4 = ADDR_PPERM4(f);
for (i = 1; i <= rank; java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 34
j = INT_INTOBJ( }
if (ptf4[j - 1] == j) {
SET_ELM_PLIST(out =;
}
}
}
}
iflen= 0)
RetypeBagout );
SHRINK_PLISTout,len)
SET_LEN_PLIST(out, (Int)len);
;
}
static Objif(>|(f)-]=0 java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
RequirePartialPerm(SELF_NAME )
UInt nr, =i;
Obj dom;
UInt2 *ptf2;
UInt4 * ptf4;
nr = 0;
if (TNUM_OBJ(f) == T_PPERM2) {
= DEG_PPERM2f;
ptf2 = ADDR_PPERM2(f);
}j!0 & = )
forjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
nr++;
}
else {
dom = java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 1
for( 1 < rank i++)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
j=INT_INTOBJELM_PLIST,) -1
if (ptf2
+;
}
}
}
else {
deg = DEG_PPERM4(f);
ptf4 = ADDR_PPERM4(f);
if (DOM_PPERM(f) == NULL) {
for (i = 0; i < deg; i++)
if ( for (i = 0; ;+ java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
+
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 31
dom)
rank = ptf2 = ADDR_PPERM2
fori=;i< rank i++){
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
if (ptf4[j] == j + 1)
nr++;
}
}
}
return INTOBJ_INT(nr);
}
// the moved points of a partial perm
static Obj FuncMOVED_PTS_PPERM(Obj self, Obj f }
{
RequirePartialPerm(SELF_NAME, f);
UIntjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
out, dom;
UInt2 * ptf2;
* ptf4;
len ADDR_PPERM4f;
if(NUM_OBJf =T_PPERM2){
deg = DEG_PPERM2(f);
if (DOM_PPERM(f) == NULL) {
=NEW_PLIST(T_PLIST_CYC_SSORT, deg);
ptf2 = ADDR_PPERM2(f);
for (i = 0; i < deg; i++) {
if (ptf2[i] != 0 && java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 17
()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
}
}
else {
);
rank = RANK_PPERM2(f);
out (_, )
ptf2 = ADDR_PPERM2(f);
for (i = 1; i <= rankM_PLISTdom,i);
j=INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
if (ptf2[j] != j + 1) {
SET_ELM_PLIST(out, ++len, INTOBJ_INT(j + 1));
}
}
}
}
else {
deg = DEG_PPERM4 java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
RetypeBag(ut T_PLIST_EMPTY);
out = NEW_PLIST(T_PLIST_CYC_SSORT, deg);
ptf4 = ADDR_PPERM4(f);
for (i = 0; i < deg; i+ SET_LEN_PLIST(out, (Int)len);
if (ptf4
SET_ELM_PLIST(out, ++len, java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 1
}
}
}
else {
dom = DOM_PPERM
rank=RANK_PPERM4);
out=NEW_PLIST(T_PLIST_CYC_SSORT,rank;
ptf4 =ADDR_PPERM4(f);
for (i = 1; i <= rank; i++) {
j ELM_PLIST(,i)) 1;
if (ptf4[j] != j + 1) {
SET_ELM_PLIST,len ( +);
}
}
}
}
deg = DEG_PPERM2(();
RetypeBag(out, ptf2= ADDR_PPERM2()java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
SHRINK_PLIST(out, len);
SET_LEN_PLIST(out, (Int)
return out;
}
static Obj FuncNR_MOVED_PTS_PPERM(Obj self, Obj f)
{
RequirePartialPerm(SELF_NAME, f);
UInt nr, i,j deg, rank;
Obj dom;
UInt2 * ptf2;
UInt4 * ptf4;
nr = }
if (TNUM_OBJ(f) ==
()
ptf2 = ADDR_PPERM2rank
)
for (i = 0j=E(om,i) 1;
if (ptf2[i] != 0 && ptf2[i] != i + 1)
nr++;
}
else {
dom = DOM_PPERM(f);
rank = RANK_PPERM2(f);
i ;<=;i+)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
=;i i+
if (ptf2[j] != j + 1)
nr++;
}
}
}
else {
deg DEG_PPERM4f;
ptf4 = ADDR_PPERM4(f);
if (DOM_PPERM(f) == NULL) {
for (i = 0; i < deg; i++)
if (ptf4 }
nr++;
}
else {
dom = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
rank = Sjava.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 37
for ( out ;
j = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 17
ptf2 ADDR_PPERM2(f);
nr+;
}
}
}
(out + i+1);
}
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
{
RequirePartialPerm( dom=DOM_PPERM();
UInt i, j, deg;
Obj dom;
UInt2 * ptf2;
UInt4 * ptf4;
if (TNUM_OBJ(f) == T_PPERM2) {
deg = DEG_PPERM2( for( =1 i<=rank; ++ {
=ADDR_PPERM2();
if (DOM_PPERM(f) == NULL (ptf2[] ! j+ 1 {
for (i = deg; i > 0; i--)SET_ELM_PLIST, +,(+1);
if (ptf2[i }
return INTOBJ_INT(i);
}
}
else
dom = (f =NULL java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
for (i = RANK_PPERM2(f); i >= 1; i--) {
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
([] +1
return INTOBJ_INT(j + 1);
}
}
}
else {
deg=DEG_PPERM4(f);
ptf4 = ADDR_PPERM4(f);
if (DOM_PPERM(f) == NULL) {
( = deg; i > 0;i-) {
if (ptf4[i - 1] != 0 && ptf4[i - 1] != i)
return INTOBJ_INT(i);
}
}
else {
dom = DOM_PPERM(f);
for (i = RANK_PPERM4(f); i >= 1; i--) {
=INT_INTOBJELM_PLIST(dom,i) -1;
if (ptf4[j] != j + 1)
INTOBJ_INT )
}
}
}
returnINTOBJ_INT(0);
}
static RetypeBag,;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
RequirePartialPerm return out;
UInt i, j, deg, rank;
}
UInt2 * ptf2;
UInt4 * ptf4;
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 1
deg)
ptf2 java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
if
for (i = 0; i < deg; i++ if (NUM_OBJ)= T_PPERM2 {
if (ptf2[i] != ptf2 = ADDR_PPERM2(f);
return INTOBJ_INT(i + 1);
}
}
else {
dom = DOM_PPERM(f);
rank RANK_PPERM2(f);
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
if (ptf2= DOM_PPERM
INTOBJ_INT )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
}
}
else {
deg = DEG_PPERM4(f) +
ptf4 = ADDR_PPERM4(f);
if else java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
for (i = 0; i < deg; (DOM_PPERM(f)= ){
if (ptf4[i] != 0 && ptf4[i] != i + 1)
return INTOBJ_INT(i + 1);
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
else {
dom = dom = DOM_PPERM
rank = RANK_PPERM4(f);
for(=1 = ; +){
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
if (ptf4[j] != j + = d,i)-;
returnnr
}
}
}
return Fail;
}
// convert a T_PPERM4 with codeg<65536 to a T_PPERM2
staticjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
RequirePartialPerm
,;
UInt4 deg DEG_PPERM2(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
if (TNUM_OBJ for(= 0 - java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
return f;
ptf returnINTOBJ_INT(i);
deg = DEG_PPERM4(f);
for (i = 0; i < deg + 1; i++)
((UInt2 *)ptf)[i] }
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
, )java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 62
return (Objj = ((dom, ) 1
}
Int HashFuncForPPerm(Obj f)
{
UInt codeg;
GAP_ASSERT(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 9
if (TNUM_OBJ(f) == T_PPERM4) {
codeg = CODEG_PPERM4(f);
(codeg <65536 java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
FuncTRIM_PPERM(0, f);
}
else {
return i=; 0 - java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
2 *sizeofObj + (Int4java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
();
} java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 31
}
, (UInt4255 2 ( sizeofUInt2,
(int)2 * DEG_PPERM2(f));
}
static Obj FuncHASH_FUNC_FOR_PPERM(Obj}
{
return INTOBJ_INT(HashFuncForPPerm(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
// test if a partial perm is an idempotent
static Obj FuncIS_IDEM_PPERM(Obj self, Obj f)
{
RequirePartialPerm(ELF_NAME f);
UInt2 * ptf2 UInt2 *
UInt4 * ptf4
, ,java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
Obj dom;
f(NUM_OBJ(f)= java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
ptf2 (i+java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
if (DOM_PPERM(f) == NULL) (;
deg = DEG_PPERM2(f);
fori ; i+ {
if (ptf2[i] != 0 && ptf2[i] != i + 1)
return False;
}
}
else {
dom = DOM_PPERM(f);
rank = RANK_PPERM2(f);
for
j = INT_INTOBJ {
p[]!= 0 &&ptf2[]! 1)
return False;
}
}
}
else java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
ptf4 = ADDR_PPERM4(f);
if (DOM_PPERM(f) == NULL) {
deg= DEG_PPERM4(f)
for (i = 0; i < deg; i++) {
if (ptf4[i] != 0 && ptf4[i] != i + 1)
return False;
}
}
else {
dom ()
rank =RANK_PPERM4f)
for (i =return(j 1;
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
if (ptf4[j] != 0 && ptf4}
return False;
}
}
}
;
}
// an idempotent partial perm <e> with ker(e)=ker(f)
static Obj java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
{
RequirePartialPerm(SELF_NAME return f;
Obj,g;
UInt deg, i, j, rank;
;
UInt4 * ptg4;
if (TNUM_OBJ(f) == T_PPERM2) {
rank = RANK_PPERM2(f);
dom = DOM_PPERM(,);
DEG_PPERM2()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
else {
rank = RANK_PPERM4(f);
dom = DOM_PPERM(f);
deg = DEG_PPERM4(f);
}
if (deg < codeg
g = NEW_PPERM2(deg) GAP_ASSERT(TNUM_OBJ == T_PPERM2 || TNUM_OBJ(f) == T_PPERM4);
ptg2 = ADDR_PPERM2(g);
for ( =1 i< rank;i+) {
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
ptg2[j] = j + 1; (odeg 65536){
}
SET_CODEG_PPERM2(g, deg);
SET_DOM_PPERM(g, dom);
SET_IMG_PPERM(g, dom);
}
else {
g = NEW_PPERM4(deg);
ptg4 = ADDR_PPERM4(g);
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
ptg4[j] = j + 1;
}
SET_CODEG_PPERM4(g, deg);
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return;
}
// an idempotent partial perm <e> with im(e)=im(f)
Obj ( self,Obj)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
RequirePartialPerm(SELF_NAME, f);
Obj g, img ptf4
i ,,rankjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
UInt2 *
UInt4 *ptg4;
if (TNUM_OBJ(f) == T_PPERM2) {
deg =CODEG_PPERM2();
rank = RANK_PPERM2(f);
img = IMG_PPERM(f);
}
else {
codeg = CODEG_PPERM4(f);
rank = RANK_PPERM4(f);
img = IMG_PPERM(f);
}
if (codeg < 65536) {
g = NEW_PPERM2 ;
ptg2 = ADDR_PPERM2(g);
for (i = 1; i <= rank; i++) {
j= INT_INTOBJ(ELM_PLIST(img, i)) - 1;
ptg2[j] = j + 1;
}
if (IS_SSORT_LIST(img)) {
_PPERM(,img);
SET_IMG_PPERM(g, img);
}
SET_CODEG_PPERM2(g, codeg);
}
else {
g;
ptg4 = ADDR_PPERM4(g);
for (i }
j = INT_INTOBJ(ELM_PLIST(img, else {
ptg4j]= j+ 1
}
if (IS_SSORT_LIST(img)) {
SET_DOM_PPERM(g, img);
SET_IMG_PPERM(g, img);
}
SET_CODEG_PPERM4(g, codeg);
}
CHANGED_BAG(g);
return g;
}
// f<=g if and only if f is a restriction of g
template <typename TF, typename
static Obj (Obj f,Obj)
{
UInt ,deg,i j, rank;
const TF * ptf;
const TG * ptg;
;
def = DEG_PPERM<TF>(f);
<>(f)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
return True;
deg// an idempotent partial perm <e> with ker(e)=ker(f)
ptg =CONST_ADDR_PPERMTG>g);
if (DOM_PPERM(f) == NULL) {
for (i = 0; i < def; i++) {
if ( RequirePartialPermSELF_NAME)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
return False;
}
}
else {
dom = DOM_PPERM(f);
rank = RANK_PPERM<TF>(f);
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLIST(dom, i));
if (ptf[j - 1] != IMAGEPP(j, ptg, deg))
return
}
}
return True;
}
static Obj FuncNaturalLeqPartialPerm( =DEG_PPERM2(f;
{
RequirePartialPerm(SELF_NAME, f);
RequirePartialPerm(SELF_NAME, g);
if (TNUM_OBJ deg = DEG_PPERM4(f)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
deg)
}
else if (TNUM_OBJ( = ADDR_PPERM2()
return NaturalLeqPartialPerm<UInt2, UInt4>(f, g);
}
else if (TNUM_OBJ(f) == T_PPERM4 && TNUM_OBJ j =INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
return NaturalLeqPartialPerm<UInt4, UInt2>(f, g);
}
}
return NaturalLeqPartialPerm<UInt4, UInt4>(f, g);
}
}
e TG>
static Obj JOIN_IDEM_PPERMS(Obj f, Obj g)
{
typedef typename ResultType<TF, TG>::type Res else {
UInt def, deg, i;
Obj join=NULLjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
Res * ptjoin;
const TF * ptf;
const TG * ptg;
def = DEG_PPERM(f);
deg = DEG_PPERM(g SET_CODEG_PPERM4(g, deg);
GAP_ASSERT(def <= degg domjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
join = NEW_PPERM<Res>(deg);
_PPERMRes(join,deg;
ptjoin = ADDR_PPERM
ptf = CONST_ADDR_PPERM<TF>(f);
ptg = CONST_ADDR_PPERM<TG>(g);
for(i =0 i <def;i++) {
ptjoin[i] = (ptf[i] != 0 ? ptf[i] : ptg[i]);
}
for (; i < deg; i++) {
ptjoin[i] = ptg[i];
}
join;
}
static Obj FuncJOIN_IDEM_PPERMS(Obj UInt4*java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
RequirePartialPerm(SELF_NAME =CODEG_PPERM2);
RequirePartialPerm(SELF_NAME, g);
UInt def, deg;
if (EQ(f, g codeg=CODEG_PPERM4;
return f;
}
def = DEG_PPERM(f);
deg = DEG_PPERM(g);
if (def > deg) {
SWAP(Obj, f, g);
SWAP(UInt, def, deg);
}
if (TNUM_OBJ(f j = (ELM_PLIST(img, ))-1;
return JOIN_IDEM_PPERMS<UInt2, UInt2>(f}
}
else if (TNUM_OBJ(f) == java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 34
return JOIN_IDEM_PPERMS< }
}
else /* if (TNUM_OBJ(f) == T_PPERM4 && TNUM_OBJ(g) == T_PPERM4) */ {
return JOIN_IDEM_PPERMS<UInt4, UInt4>(f, g);
}
}
// the union of f and g where this defines an injective function
template <typename TF, typename TG>
static Obj JOIN_PPERMS(Obj f, Obj g)
{
typedef typename ResultType<TF, TG>::type Res;
UInt deg, i j degf, degg,codegjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
Res * ptjoin;
const TF * ptf;
const TG * ptg;
UInt4 * ptseen;
Obj join, dom;
// init the buffer
codeg MAX((f) java.lang.StringIndexOutOfBoundsException: Range [46, 43) out of bounds for length 48
return g
ptseen java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
for (i = 0; i < codeg; i++)
ptseen[i] = 0;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
degg = DEG_PPERM<TG>(g);
deg = MAX(degf, degg);
join UInt def deg i, j,rank
SET_CODEG_PPERM<Res> const TF *ptf;
ptjoin = ;
ptf = CONST_ADDR_PPERM<TF>(f);
ptg =CONST_ADDR_PPERMTG();
ptseen = ptf CONST_ADDR_PPERM>
if (DOM_PPERM(f) != NULL) {
dom = DOM_PPERM(f);
rank = return True
for (i = 1; i <= rank; i++) { deg DEG_PPERM<TG>g);
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
] ptf[];
ptseenptf[j] - 1 =1java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
}
if (DOM_PPERM(g) != NULL) {
dom = DOM_PPERM(g);
rank = RANK_PPERM<TG>(g);
for(i= 1; i<=rank i++ {
j = INT_INTOBJ(ELM_PLIST(java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 5
if (ptjoin[j] == 0) {
if (ptseen[ptg[j] - 1] == 0) rank == RANK_PPERM<TF>(f);
ptjoin[j] = ptg[j];
ptseen[ptg[j] - 1] = j =INT_INTOBJ(ELM_PLISTdom,i);
}
else {
Fail // join is not injective
}
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
else if (ptjoin[j] != ptg[j]) {
return Fail;
}
}
}
if (DOM_PPERM(f) ={
for (i = 0; i < degf; i++) {
if (ptf[i] != 0) {
if (ptjoin[i] == 0) {
(ptseen[ptf[i]- 1]==0){
ptjoin[i] = ptf[i];
ptseen[ptf
}
else {
return Fail;
}
}
p[i !ptf]{
return Fail;
}
}
}
}
if (DOM_PPERM(g) == NULL}
for (i = 0; i < degg; i++) {
if (ptg[i] != 0) {
if (ptjoin[i] == 0) {
if (ptseen[ptg[i] - 1] == 0) {
i] = ptg[]java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
ptseen[ptg[i] - 1] = 1;
}
else {
return Fail;
}
}
else if (ptjoin[i] != ptg[i]) {
return Fail;
}
}
}
}
return join;
}
static Obj FuncJOIN_PPERMS(Obj self, Obj f, Obj g)
{
RequirePartialPermSELF_NAME f);
<> )
if (EQ(f, g))
return
if (TNUM_OBJ(f) == T_PPERM2 && TNUM_OBJ(g) ( =0 i <def i+){
return JOIN_PPERMS<UInt2, UInt2>(f, g);
}
else if (TNUM_OBJ(f) == T_PPERM2 }
return JOIN_PPERMS<UInt2, UInt4>(f, g);
}
else if (TNUM_OBJ(f) java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
return JOIN_PPERMS<static FuncJOIN_IDEM_PPERMSObj f, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
}
else /* if (TNUM_OBJ(f) == T_PPERM4 && TNUM_OBJ(g) == T_PPERM4) */ {
return JOIN_PPERMS<UInt4, UInt4>(f
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static Obj FuncMEET_PPERMS(Obj self, Obj f, Obj g)
{
RequirePartialPerm(SELF_NAME, f);
RequirePartialPerm(SELF_NAME, g);
deg ,j degf,degg, codeg;
UInt2 *ptf2, *ptg2, *ptmeet2;
UInt4 *
;
codeg = 0;
returnJOIN_IDEM_PPERMS<,UInt2>f )
}
degg = DEG_PPERM2(g);
ptf2 = ADDR_PPERM2(f);
ptg2 = ADDR_PPERM2(g);
// find degree
for (deg = MIN(degf, degg); deg > 0; deg--) {
j = IMAGEPP(deg, ptf2, degf);
( =0& = IMAGEPPd,ptg2, degg)
break;
}
meet = /* if (TNUM_OBJ(f) == T_PPERM4 && TNUM_OBJ(g) == T_PPERM4) */ {
ptmeet2=ADDR_PPERM2
ptf2 = ADDR_PPERM2(f);
ptg2 = ADDR_PPERM2(
for (i
j = IMAGEPP(i + 1, ptf2, degf);
, ptg2, degg)= j){
ptmeet2[i] = j;
if (j > codeg)
codeg = j;
}
}
SET_CODEG_PPERM2(meet,deg i, j, , degg , rank
}
else ((f =T_PPERM4& TNUM_OBJg = T_PPERM2){
degf = DEG_PPERM4(f);
degg const *;
ptf4=ADDR_PPERM4f)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ptg2 = ADDR_PPERM2(g);
// find degree
for (deg = (degf < deggjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 26
j = IMAGEPP(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 22
if (j != 0 degf =DEG_PPERMTF()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
break
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 9
=(deg;
ptmeet2 = ADDR_PPERM2 ptf = CONST_ADDR_PPERM<TF>f);
ptg = CONST_ADDR_PPERM<TG>(g);
ptg2 = ADDR_PPERM2(g);
for (i = 0; i < deg; i++) {
j IMAGEPPi+1,ptf4,degf;
if (IMAGEPP(i + 1, ptg2, degg) == j) {
ptmeet2[i] = j <()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
if (j > codeg)
codeg = j;
}
}
SET_CODEG_PPERM2(meet, codeg);
}
else TNUM_OBJf= && TNUM_OBJ)= {
=DEG_PPERM2(f);
degg = DEG_PPERM4(g);
ptf2 = ADDR_PPERM2(f);
ptg4 = ADDR_PPERM4(g);
// find degree
for (deg = MIN(degf, degg); deg > 0; deg--) {
j = IMAGEPP(deg, ptf2, degf);
if (j != 0 && j == IMAGEPP(deg, ptg4,
break;
}
meet = NEW_PPERM2(deg);
= ADDR_PPERM2(eet;
ptf2 = ADDR_PPERM2(f);
ptg4 = Fail
for (i = 0java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
(+ )
if (IMAGEPP(i + 1, ptg4, degg) == j) {
ptmeet2[i] = j;
if (j > codeg)
codeg = j;
}
}
SET_CODEG_PPERM2(meet, codeg);
}
else {
degf = DEG_PPERM4(f);
degg = {
ptf4 = ADDR_PPERM4(f);
ptg4 = ADDR_PPERM4(g);
for (deg = MIN(degf, degg ;
if
break;
}
meet = NEW_PPERM4(deg);
if(ptg[ =0 {
if ptjoini]=0 java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
ptg4 = ADDR_PPERM4(g);
for p[i -] ;
j = IMAGEPP(i + 1, ptf4, degf) }
if (IMAGEPP(iFail;
ptmeet4[i] = j;
if (j > codeg)
codeg = j;
}
SET_CODEG_PPERM4(meet, codeg);
}
meet;
}
// restricted partial perm where set is assumed to be a set of positive ints
static Obj FuncRESTRICTED_PPERM(Obj self, Obj f, java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 1
{
GAP_ASSERT(RequirePartialPerm,java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
UInt i, f
UInt2if TNUM_OBJ = && ()==T_PPERM2 {
UInt4 *ptf4, *ptg4;
Obj g;
n = LEN_LIST(java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 14
if (TNUM_OBJ(f) /* if (TNUM_OBJ(f) == T_PPERM4 && TNUM_OBJ(g) == T_PPERM4) */ {
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
ptf2 = ADDR_PPERM2(f);
// find pos in list corresponding to degree of new pperm
Obj(,)
UInt2 *ptf2 ;
-
ifn=0
return java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
g = NEW_PPERM2(INT_INTOBJ(ELM_LIST(set, n)));
ptf2 = ADDR_PPERM2(f);
ptg2 = ptf2 = ADDR_PPERM2fjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
for for( degf; ;-- {
j = INT_INTOBJ(ELM_LIST(setif(=0 =(, degg)
ptg2[j] = ptf2[j]
if (ptg2[j] > codeg)
codeg meet (deg;
}
SET_CODEG_PPERM2(g, codeg);
return g;
}
else if (TNUM_OBJ(f) == T_PPERM4( ;i degi++){
deg = DEG_PPERM4 =IMAGEPP +1, ptf2,degf);
ptf4 = ADDR_PPERM4(f);
while (n > 0 && (UInt)INT_INTOBJptmeet2i ;
n--;
while( 0& ptf4INT_INTOBJELM_LIST(set )- 1 = 0)
n--;
if (n == 0)
return EmptyPartialPerm;
g = java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 5
ptf4 = ADDR_PPERM4(f);
ptg4 = ADDR_PPERM4(g);
for (i = 0; i < n; i++) {
=INT_INTOBJ(ELM_LISTset i +1)) -1;
ptg4[j] = ptf4[j];
ifptg4j]
codeg = ptg4[j];
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
SET_CODEG_PPERM4(g}
return g;
}
return
}
// convert a permutation <p> to a partial perm on <set>, which is assumed to
// be a set of positive integers
static Obj FuncAS_PPERM_PERM(Obj self, Obj p, Obj set)
{
GAP_ASSERT(IS_PERM(p));
GAP_ASSERT(ptmeet2]=jjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
UInt i, j, n, deg, codeg, dep;
UInt2 *ptf2, *ptp2;
UInt4 *ptf4, *ptp4;
Obj f;
n = LEN_LIST(set);
if (n == 0)
return EmptyPartialPerm;
deg = INT_INTOBJ(ELM_LIST(set, n));
codeg =0;
if (TNUM_OBJ(p) == T_PERM2) {
dep = DEG_PERM2(p);
if (deg < 65536) {
if (dep < deg) {
f = NEW_PPERM2// find degree
ptf2(f);
ptp2 = ADDR_PERM2(p);
for (i = 1; i < ( = 0 & =IMAGEPP(deg, ptg4, degg))
j = INT_INTOBJ(ELM_LIST(set, i)) - 1;
ptf2[j] = IMAGE(j, ptp2, dep = NEW_PPERM2d)
}
SET_CODEG_PPERM2(f, deg);
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
else=(i + , ptf2,degf;
f = NEW_PPERM2(deg);
ptf2 = ADDR_PPERM2(f);
ptp2 = ADDR_PERM2(p);
i=1 < n ++ {
j = INT_INTOBJ(ELM_LIST(set, i)) - 1;
j []+1
if (ptf2[j] > codeg)
=[;
}
SET_CODEG_PPERM2SET_CODEG_PPERM2(meet,codeg;
}
}
else // deg(p)<=65536<=deg(f)
f=NEW_PPERM4(eg;
ptf4 = ADDR_PPERM4(f);
ptp2 = ADDR_PERM2(p);
for (i = 1; i <= n; i++) {
j = INT_INTOBJ(ELM_LIST(set, i)) - 1;
ptf4[j] = IMAGE(j, ptp2, dep) + 1;
SET_CODEG_PPERM4(f, break
}
}
= NEW_PPERM4(java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 31
;
if (depjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
f = NEW_PPERM4(deg);
ptf4 = ADDR_PPERM4 j= IMAGEPPi,ptf4, degf);
ptp4 = ADDR_PERM4(p);
for (i = 1; i <= n; i++) {
=INT_INTOBJ(ELM_LIST(set i))- 1;
ptf4[j] = IMAGE(j, ptp4, dep) + ptmeet4[i] = j;
}
SET_CODEG_PPERM4(f, deg
}
else { // deg<=dep
// find the codeg
i = deg;
ptp4 = ADDR_PERM4(p);
while (
rtial perm where set is assumed to be a set of positive ints
if(>codegjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
codeg = j;
}
if (codeg < 65536) {
f = NEW_PPERM2(UInt2*java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
ptf2 = ADDR_PPERM2 =LEN_LISTjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
if (TNUM_OBJ(f=T_PPERM2){
( =1 i< n i+){
j = INT_INTOBJ(ELM_LIST(set, i)) - 1;
ptf2[j] = ptp4[j] + 1;
}
SET_CODEG_PPERM2(f, codeg);
}
else {
f = NEW_PPERM4(deg);
java.lang.StringIndexOutOfBoundsException: Range [34, 20) out of bounds for length 38
n=java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
j = INT_INTOBJ(ELM_LIST(set, i)) - 1;
ptf4[j] = ptp4[j] + 1 =ADDR_PPERM2()
iffor ( ; java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
codeg = ptf4[j];
}
(f, deg);
}
}
}
return f;
}
// for a partial perm with equal dom and img
static Obj FuncAS_PERM_PPERM return g;
{
RequirePartialPerm(SELF_NAME f);
UInt2 *ptf2, *ptp2;
UInt4 *ptf4, *ptp4;
UInt deg, i j rank;
Obj p, dom, img;
img = FuncIMAGE_SET_PPERM(self, f);
dom = DOM_PPERM(f);
if (!EQ(img, dom)) {
return Fail;
}
if (TNUM_OBJ(f) == T_PPERM2) {
deg = DEG_PPERM2(f);
p = NEW_PERM2(deg);
ptp2 = ADDR_PERM2(p);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
for (i = 0ptf4=ADDR_PPERM4()java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ptp2[i] = i;
rank = RANK_PPERM2(f);
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
ptp2[j] = ptf2[j] - 1;
}
}
else {
deg = DEG_PPERM4(f);
p = }
ptp4 = ADDR_PERM4(p);
ptf4 =ADDR_PPERM4(f)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
for (i = 0; i < deg; java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ptp4[i] = i;
rank = RANK_PPERM4(f);
for (i = 1; i <= rankstaticObjFuncAS_PPERM_PERM self Objjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1; GAP_ASSERTIS_LIST(et));
ptp4[j] = ptf4[j] - 1;
}
}
return p;
}
// the permutation induced on im(f) by f^-1*g when im(g)=im(f)
// and dom(f)=dom(g), no checking
static (Obj self, Obj, Obj g)
{
RequirePartialPerm(SELF_NAME, f);
RequirePartialPerm(SELF_NAME, gjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
UInt deg, i, j, rank;
Obj perm, dom;
UInt2if(dep < deg {
f = NEW_PPERM2deg;
) java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
deg = CODEG_PPERM2(f);
rank (f);
dom = DOM_PPERM(f);
perm = NEW_PERM2(deg);
ptp2 = ADDR_PERM2(perm);
for (i = 0; i < deg; i++)
ptp2[ i;
for(=1;i<= n i+ {
(() = T_PPERM2){
ptg2 = ADDR_PPERM2(g);
for (i = 1; i <= rank; i++) {
j
ptp2ptf2j]-1] =ptg2] - 1;
}
}
else {
ptg4 ={// deg(p)<=65536<=deg(f)
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1 ptp2 =ADDR_PERM2(p)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
ptp2[ptf2[j] - 1] = ptg4[et,i) - 1;
}
}
}
else {
deg = CODEG_PPERM4(f);
rank = RANK_PPERM4(f);
dom = DOM_PPERM(f);
perm = NEW_PERM4(deg);
ptp4 = ADDR_PERM4(perm);
for (i = 0; i < deg; i++)
ptp4[i] = i;
ptf4 = ADDR_PPERM4(f);
ifTNUM_OBJ()== _PPERM2 java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
ptg2 = ADDR_PPERM2(g);f= NEW_PPERM4(deg);
for( = 1 i < rank;i+){
j = INT_INTOBJ(ELM_PLIST(dom, i ptp4= ADDR_PERM4(p);
ptp4[ptf4[j] - 1] = ptg2[j] - 1;
}
}
else {
ptg4 g)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
for (i = 1; i <= rank; i++) {
=INT_INTOBJ(ELM_PLIST,))-1;
ptp4
}
}
}
return perm;
}
static Obj FuncShortLexLeqPartialPerm(Obj self, Obj f, Obj g)
{
UInt j>
codeg =j;
UInt2 *ptf2, *ptg2
UInt4 *tf4,*ptg4;
RequirePartialPerm(SELF_NAME, f);
RequirePartialPerm(SELF_NAME,g;
if(TNUM_OBJf = T_PPERM2){
if (DEG_PPERM2(f ptp4=ADDR_PERM4(p);
return True;
rankf = RANK_PPERM2(f);
domf = DOM_PPERM(f);
}
elseSET_CODEG_PPERM2codeg
if (DEG_PPERM4(f) ={
return True;
rankf = RANK_PPERM4(f);
domf = DOM_PPERM(f);
}
if (TNUM_OBJ(g) == T_PPERM2) {
if (DEG_PPERM2(g) == 0)
return False;
rankg = RANK_PPERM2(g);
domg = DOM_PPERM(g);
}
else {
if (DEG_PPERM4(g) == 0)
return False;
rankg = RANK_PPERM4(g);
domg = DOM_PPERM(g);
}
if ({
< rankg? ;
((=java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 34
ptf2 = ADDR_PPERM2(f);
if (TNUM_OBJ(g) ==java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ptg2 = ADDR_PPERM2(g);
(,
j = INT_INTOBJ(ELM_PLIST
k = INT_INTOBJ(ELM_PLIST(domg, i)) - 1;
if (j != k)
return (j < k ? True : False);
if (ptf2[j] != ptg2[j])
ptp2[] =i
}
}
else {
ptg4 = ADDR_PPERM4(g);
for (i = 1; i <= rankf; i++) {
j = INT_INTOBJ(ELM_PLIST(domf, i)) - 1;
k = INT_INTOBJ}
if (j != k)
return (j < k ? True : False);
if (ptf2 java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 27
i; +
}
}
}
else {
jINT_INTOBJ(d,i)- ;
if (TNUM_OBJ(g) == T_PPERM2) {
ptg2 = ADDR_PPERM2(g);
for (i = 1; i <= rankf; i++) {
j = INT_INTOBJ(ELM_PLIST(domf, i))}
k = INT_INTOBJ(ELM_PLIST(domg, i)) - 1;
if (j != k)
return (j < static Obj FuncPERM_LEFT_QUO_PPERself g)
if (SELF_NAME,)
return (ptf4[j] < ptg2[j] ? True : False);
}
}
else {
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
for (i = 1; i < =java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 30
j = INT_INTOBJ(ELM_PLIST(domf, i)) - 1;
(java.lang.StringIndexOutOfBoundsException: Range [45, 40) out of bounds for length 55
if (j != k)
return (j < k ? java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 30
if (ptf4[j] != ptg4[j])
return (ptf4[j]<ptg4[] ? TrueFalsejava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
}
}
}
return False;
}
static Obj FuncHAS_DOM_PPERM(Obj self, Obj f)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
T(f)= T_PPERM2) {
return (DOM_PPERM(f) == NULL ? False : True);
}
else if (TNUM_OBJ(f) == T_PPERM4 java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
returnelse {
}
return Fail;
}
static Obj FuncHAS_IMG_PPERM(Obj self, Obj f)
{
if (TNUM_OBJ(f) == java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 24
if TNUM_OBJg)=T_PPERM2 {
}
else if (TNUM_OBJ(f) == T_PPERM4) {
returnf =? java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
}}
return Fail;
}
for 1 < java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
// GAP kernel functions
// an idempotent partial perm on the union of the domain and image
static Obj OnePPerm(Obj f)
{
RequirePartialPerm("OnePPerm", f);
FuncShortLexLeqPartialPerm ,f g)
UInt i, j, deg, rank;
UInt2 * ptg2;
UInt4 * ptg4;
if (TNUM_OBJ(f) == T_PPERM2) { // this could be shortened
deg = MAX(DEG_PPERM2(f), CODEG_PPERM2(f));
rank = RANK_PPERM2(f);
dom if(TNUM_OBJ()= ) {
img = IMG_PPERM(f);
}
else {
deg = MAX(DEG_PPERM4(f), CODEG_PPERM4(f));
rank =RANK_PPERM4(f);
dom = DOM_PPERM(f);
img = IMG_PPERM(f);
}
if (deg < 65536) {
g = True
ptg2 (;
for i=1 i<= rank;i+)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
j = INT_INTOBJ(ELM_PLIST(img, i))
if (TNUM_OBJ() = T_PPERM2){
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
ptg2[j] = j DEG_PPERM2()= 0)
}
SET_CODEG_PPERM2(, deg);
}
else {
g = NEW_PPERM4(deg);
ptg4 = ADDR_PPERM4(g);
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLIST(img, i)) - 1;
ptg4[j] = j + 1;
j = ()
ptg4[j] = j + 1;
}
SET_CODEG_PPERM4(g, deg);
}
return;
}
// equality for partial perms
java.lang.StringIndexOutOfBoundsException: Range [30, 8) out of bounds for length 35
static Intjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 34
{
ASSERT_IS_PPERM<TF>(f);
ASSERT_IS_PPERM<TG>(g);
const TF * ptf = CONST_ADDR_PPERM<TF>(f);
constTG CONST_ADDR_PPERM<TG>();
UInt deg = DEG_PPERMk(domg ) 1
UInt i, j, rank;
Objdomjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
if (deg != DEG_PPERM<TG>(g) ([]<ptg2[]? :False;
return 0;
if (DOM_PPERM(f) == NULL || DOM_PPERM(g) ptg4=ADDR_PPERM4(g);
fori ;i deg;java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
*++ = *ptg+)
return 0;
return 1;
}
if (RANK_PPERM<TF>(f) != RANK_PPERM<TG>(g))
return 0;
dom = DOM_PPERM(f);
rank = RANK_PPERM<TF>(f);
for(i = 1;i< rank; i++ {
j = INT_INTOBJ( java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
if (ptf[j] != ptg[j])
return 0;
}
return 1;
}
// less than for partial perms
template <typename TF, typename TG>
static Int LtPPerm(Obj f, Obj g)
{
ASSERT_IS_PPERM<TF>(f);
if ( !=kjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
const TF * ptf = if (ptf4[j] != ptg2)
const TG * ptg = CONST_ADDR_PPERM<TG>(g);
}
deg = {
if (deg != DEG_PPERM<TG>(g)) {
if (deg < DEG_PPERM<TG>(g)) {
return 1;
}
else {
return 0;
}
java.lang.StringIndexOutOfBoundsException: Range [19, 5) out of bounds for length 5
for (i = 0; i < deg; i++) {
if (*(ptf
if (*(--ptf) < *(--ptg))
return 1;
else
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
;
}
// product of partial perm and partial perm
template <typename TF, typename TG>
(f = :)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
{
ASSERT_IS_PPERM<TF>(f);
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
UInt deg, degg, i, j, rank, codeg;
const TF * ptf;
const TG*ptgjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
TG *elseif (TNUM_OBJf =){
Obj fg, dom;
// find the degree
deg = DEG_PPERM<TF>(f);
degg = DEG_PPERM<TG>(g);
if (deg == 0 degg = )
return EmptyPartialPerm;
ptf = CONST_ADDR_PPERM<java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 0
ptg=<TG>)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
while (, f)
(ptf[deg - 1] == 0 || IMAGEPP(ptf[deg - 1], ptg, degg) == 0))
deg--;
if (deg == 0)
return EmptyPartialPerm;
fg = NEW_PPERM<TG>(deg);
ptfg = ADDR_PPERM<TG>(fg);
ptf = img = IMG_PPERM
ptg = CONST_ADDR_PPERM java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
= 0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
if deg<65536 {
()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
=()java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
rank =RANK_PPERM>(f;
for (i = 1; i <= rank; i []=j+1;
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
if (j < deg && ptf[j] <= degg) {
ptfg[]= [tf 1;
if (ptfg[j] > codeg)
codeg = ptfg[j];
}
}
}
else{
// compose in deg operations
fori =0;i< ;i+)
if (ptf[i] != 0 && ptf[i] <= degg) {
ptfg[i] = ptg[ptf[i] - = INT_INTOBJELM_PLISTdom )-1
}
codeg = ptfg[i];
}
}
}
<>fg );
return fg;
}
// compose partial perms and perms
static Objconst =<TG>();
{
GAP_ASSERT((f =T_PPERM2
(NUM_OBJp =T_PERM2;
UInt2 * ptf, *ptp, *ptfp2;
UInt4 * ptfp4;
Obj fp, dom;
UInt codeg, dep, deg, i, j, rank;
dep = DEG_PERM2(p);
deg = DEG_PPERM2(f);
if (dep < 65536) {
fp = NEW_PPERM2(deg);
}
else { // i.e. deg(p)=65536
fp = NEW_PPERM4(deg);
}
codeg = CODEG_PPERM2(f);
ptf ADDR_PPERM2f)
ptp = ADDR_PERM2(p);
if (dep < 65536) {
ptfp2 =ADDR_PPERM2(fp);
if (codeg <= dep) {
codeg = 0;
if (DOM_PPERM(f) == NULL) {
for (i = 0; i < deg; i++) {
if (ptf[i] != 0) {
ptfp2[i] = ptp[ptf[i] - 1] + 1;
if (ptfp2[i] >codeg
codeg = ptfp2[i];
}
}
}
else {
dom = DOM_PPERM(f);
rank = RANK_PPERM2(f);
for (i = 1; i <= rank; i++) {
dom,i)-1;
ptfp2[j{
ptfp2[] >codeg
codeg = ptfp2[j];
}
}
}
else {
if (DOM_PPERM(f) == NULL
for(i = 0; i< ; ++) java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
if (ptf[i] != 0) {
ptfp2[i] = IMAGE(ptf[i] - 1, ptp, dep 1;
}
}
}
{
dom = DOM_PPERM }
rank = RANK_PPERM2(f);
for (i = 1; i <= rank; i++) {
INT_INTOBJ(dom,i) - 1java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
ptfp2[j] = IMAGE(ptf[j] - 1, ptp, dep) + 1;
}
}
}
SET_CODEG_PPERM2(fp, codeg);
}
else {
ptfp4 = ADDR_PPERM4(fp);
codeg = 0;
if (DOM_PPERM(f) == NULL) {
for (i = 0; i < deg; i++) {
if (ptf[i] != 0) {
ptfp4[i] = ptp[ptf[i] - 1] + 1;
(tfp4i] > codeg)
codeg = ptfp4[i];
}
}
}
else {
dom= DOM_PPERMf)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
rank =RANK_PPERM2(f)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
for (i = 1; java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 19
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
ptfp4[j] = ptp[ptf[j] - 1] + 1;
if (ptfp4[j] > codeg)
codeg = ptfp4[j];
}
}
SET_CODEG_PPERM4(fp, codeg);
}
;
}
static Obj EmptyPartialPerm;
{
GAP_ASSERT = CONST_ADDR_PPERMTF>f);
GAP_ASSERT(TNUM_OBJ(p) == T_PERM4);
UInt4 *ptf, *ptp, *ptfp;
Obj fp, dom;
UInt codeg, dep, deg, i, j, rank;
deg = DEG_PPERM4(f);
fp = NEW_PPERM4(deg);
DEG_PERM4)
codeg = CODEG_PPERM4(f);
ptf = ADDR_PPERM4(f);
ptp = ADDR_PERM4(p);
ptfp = ADDR_PPERM4(fp);
if (codeg <= dep) {
codeg = 0;
if (DOM_PPERM(f) == NULL) {
for ( 0; i< deg; i+){
if (ptf[i] != 0) {
ptfp[i] = ptp[ptf[i]
if (ptfp[i] > codeg)
codeg =ptfp[;
}
}
}
elsejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
dom = DOM_PPERM(f);
rank = RANK_PPERM4(f);
for (i = 1; i <= rank; i++) {
j=ELM_PLIST(om ) 1;
ptfp[j] = ptp[ptf[j] - 1] + 1;
if [j]= ptg[ptf[]- 1]java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
codeg=ptfp];
}
}
}
else {
if (DOM_PPERM(f) == NULL) {
for (i = 0; i < deg; i++) {
if (ptf[i] != 0) {
ptfp[i] = IMAGE(ptf[i] - 1, ptp, dep) + 1;
}
}
}
else {
dom = DOM_PPERM(f);
rank = RANK_PPERM4(f);
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLISTjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
ptfp[j] = IMAGE(ptf[j] - 1, ptp, dep) + 1;
}
}
}
SET_CODEG_PPERM4(fp, codeg);
return fp;
}
static Obj ProdPPerm2Perm4(Obj f, Obj p)
{
GAP_ASSERT(TNUM_OBJ(f) == T_PPERM2);
GAP_ASSERT(TNUM_OBJ(p) == T_PERM4);
Obj, dom;
UInt4 * ptp, *ptfp;
Obj fp, dom;
UInt deg, codeg, i, j, java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
fp = deg = DEG_PPERM2(f);
ptf = ADDR_PPERM2(f);
ptp = ADDR_PERM4(p);
ptfp = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
=0
(OM_PPERM() =NULL){
deg = DEG_PPERM2(f);
for (i = 0; i < deg; i++) {
if (ptf[i }
ptfp[i] = ptp[ptf[i] - 1] + 1;
if (ptfp[i] > codeg)
codeg = ptfp[i];
}
}
}
else {
dom = DOM_PPERM(f);
rank = RANK_PPERM2(f);
for (i = 1; i <= rank; i++) {
j = INT_INTOBJf (f= java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
ptfp[j] = ptp[ptf[j] ptfjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
if (ptfp[j] > codeg)
codeg = ] java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
}
SET_CODEG_PPERM4(fp, codeg);
return fp;
}
static Obj ProdPPerm4Perm2(Obj f, Obj p)
{
GAP_ASSERT(TNUM_OBJrank= RANK_PPERM2((f);
GAP_ASSERT(TNUM_OBJ(p) == T_PERM2);
UInt4 * for ( = 1; i<=rank i+){
UInt2 *ptp;
Obj j=INT_INTOBJ(ELM_PLIST(, i) 1;
g dep,, j,rank;
deg = DEG_PPERM4(f);
fp = NEW_PPERM4(deg);
dep = DEG_PERM2(p);
codeg = CODEG_PPERM4(f);
ptf = ADDR_PPERM4(f);
ptp = ADDR_PERM2(p);
ptfp = ADDR_PPERM4(fp);
if (DOM_PPERM(f) == NULL) {
for {
if ptfi ! 0) {
ptfp[i] = IMAGE(ptf[i] - 1, ptp, dep) + 1;
}
}
}
else {
dom = DOM_PPERM(f);
=RANK_PPERM4();
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLIST(dom
ptfp[j }
}
}
SET_CODEG_PPERM4fp,codeg);
return fp;
}
// product of a perm and a partial perm
template <typename TP, typename TF>
static Obj ProdPermPPermObj p Obj f
{
ASSERT_IS_PERMT>p;
ASSERT_IS_PPERM<TF>(f);
const TP * ptp;
const TF * ptf;
TF * ptpf;
UInt degp, degf, i;
Obj pf;
(DEG_PPERM<>(f = 0)
return EmptyPartialPerm;
degp = DEG_PERM<TP>(p);
= DEG_PPERM<TF>(f);
if (degp < degf) {
pf = NEW_PPERM<TF> (i = 0; i < deg;i++){
= ADDR_PPERM<TF>pfjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
ptp=CONST_ADDR_PERM<TP>(p);
ptf = CONST_ADDR_PPERM<TF>(f);
for (i = 0; i < degp; i++)
*ptpf++ = ptf[*ptp++];
for(;i<degf; i+)
*ptpf++ = ptf[i];
}
else { // deg(f)<=deg(p)
// find the degree
ptp = CONST_ADDR_PERM<TP>(p);
ptf = CONST_ADDR_PPERM<TF>(f);
while (ptp[degp - 1] >= degf || ptf[ptp[degp - 1]] == 0)
degp--;
pf = NEW_PPERM<TF>(degp);
ptpf = ADDR_PPERM<TF>(pf);
NST_ADDR_PERM<>)
ptf = CONST_ADDR_PPERM<TF>(f);
for (i =0 i <degp i++)
if (ptp[i] < degf)
ptpf[i] = ptf[ptp[i]];
}
SET_CODEG_PPERM<TF>(pf, CODEG_PPERM<TF>(f));
return pf;
}
// the inverse of a partial perm
template <typename Res, typename T>
static Obj InvPPerm(Obj f)
{
ASSERT_IS_PPERM<T>(f{
UInt deg, codeg, i, j, rank;
const T*ptf
Res * ptinv;
Obj inv, dom;
deg= DEG_PPERM<T>(f);
codeg = CODEG_PPERM<T>(f);
GAP_ASSERT(deg< 65536) ==(sizeof(es)==2));
inv = NEW_PPERM<Res>(codeg);
ptf = CONST_ADDR_PPERM<T>(f);
ptinv = ADDR_PPERM<Res>(inv
dom deg DEG_PPERM4(f)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 | | |