/* File orblist.c. Main program for orblist command, which may be used to list the orbits of a permutation group of a set. The orbits are written to the standard output. The format of the command is:
orblist <options> <permGroup>
where the meaning of the parameters is as follows:
<permGroup>: the permutation group whose orbits are to be computed,
The options are as follows:
-t: Only the orbit lengths are listed.
-r The orbits are listed in randomized order. Ignored if -l option is present.
-gn:<str> (Set stabilizer only). The generators for the newly-created group created are given names <str>01, <str>02, ... . If omitted, the new generators are named xxxx01, xxxx02, etc., where xxxx are the first four characters of the group name.
-wp:<name> Write out the ordered partition formed by the orbits.
-wg:<name> Write out the group, following base change. This allows orblist to be used to change the base of a permutation group, or merely to construct a base and strong generating set (using random schreier method).
-ws:<name> Like -wg, except when a point list is specified, only the subgroup stabilizing that point list is written. Note -wg and -ws options are mutually exclusive.
-i Used with -wg, causes generators to be written in image format.
-f:<ptlist> Here ptlist is a comma-separated list of points. The orbits of the (pointwise) stabilizer of these points is found.
-q quite mode. Orbit information not printed.
-z Remove redundant Schreier generators before group is written out.
-s:<integer> Seed for random number generator used in conjunction with
-r option. */
/* Compute maximum degree and word length. */
options.maxWordLength = 200 + 5 * options.maxBaseSize;
options.maxDegree = MAX_INT - 2 - options.maxBaseSize;
/* -ps option requires -wo and -wno, and conversely. Check this. */ if ( writePS ^ (writeOrbit | writeMultipleOrbits) )
ERROR( "main (orblist command)", "-ps option requires -wo or -wno, and conversely")
/* If -chbase or -ptstab options has been specified, check for 3 command
line arguments. */ if ( (changeBaseOnly || ptStabOnly) && (argc - optionCountPlus1 != 3) )
ERROR( "main (orblist command)", "3 non-option parameters are needed for chbase or ptstab");
/* Compute name for group file. */
parseLibraryName( argv[optionCountPlus1], prefix, "", libFileName, libName);
/* Process the point list, if present. */ if ( argc - optionCountPlus1 >= 2 ) {
pointListOption = TRUE;
errno = 0;
j = 0;
currentPos = argv[optionCountPlus1+1]; do {
pointList[++j] = strtol( currentPos, &nextPos, 0); if ( errno )
ERROR( "main (orblist command)", "Invalid point in -f option.")
currentPos = nextPos+1;
} while ( *nextPos == ',' && j < options.maxBaseSize );
pointList[j+1] = 0; if ( *nextPos != '\0' )
ERROR( "main (orblist command)", "Pointlist invalid or too long.")
}
/* Process name of the point stabilizer to save, or the name under which
to save the group with its new base. */ if ( argc - optionCountPlus1 == 3 ) { if ( changeBaseOnly )
writeGroup = TRUE; else
writePtStab = TRUE;
parseLibraryName( argv[optionCountPlus1+2], "", "", altGroupFileName, altGroupLibName);
}
/* Read in group. */ if ( pointListOption || writeGroup || writePtStab )
G = readPermGroup( libFileName, libName, 0, "Generate"); else
G = readPermGroup( libFileName, libName, 0, "");
/* Change base if requested, and find level in new base of stabilizer
of pointList. */ if ( pointListOption ) {
changeBase( G, pointList); if ( trimStrGenSet )
removeRedunSGens( G, 1); if ( !quietOption ) {
printf( "\n New base: "); for ( j = 1 ; j <= G->baseSize ; ++j)
printf( " %u", G->base[j]);
printf( "\n");
} if ( changeBaseOnly ) {
strcpy( G->name, altGroupLibName);
G->printFormat = (imageFormatFlag ? imageFormat : cycleFormat);
nameGenerators( G, options.genNamePrefix);
writePermGroup( altGroupFileName, altGroupLibName, G, NULL); return 0;
} for ( stabLevel = 1 ; stabLevel <= G->baseSize ; ++stabLevel ) { for ( j = 1 ; pointList[j] != 0 && pointList[j] != G->base[stabLevel] ;
++j )
; if ( pointList[j] == 0 ) break;
}
} elseif ( !writeGroup && !writePtStab ) for ( gen = G->generator ; gen ; gen = gen->next )
gen->level = 0;
if ( writePtStab ) { if ( trimStrGenSet )
removeRedunSGens( G, 1); /* First remove generators from G having level less than stabLevel, and adjust the order. Note, after here, the group table is not valid,
but it is adequate for writing out (writePermGroup). */ for ( gen = G->generator ; gen ; gen = nextGen ) {
nextGen = gen->next; if ( gen->level < stabLevel ) { if ( gen->last )
gen->last->next = nextGen; else
G->generator = nextGen; if ( nextGen )
nextGen->last = gen->last;
deletePermutation( gen);
}
} for ( i = 1 ; i < stabLevel ; ++i ) {
factoredOrbLen = factorize( G->basicOrbLen[i]);
factDivide( G->order, &factoredOrbLen);
G->basicOrbLen[i] = 1;
}
/* Now write out the modified G. */
strcpy( comment, "Pointwise stabilizer in %s of "); for ( j = 1 ; pointList[j] != 0 ; ++j ) {
sprintf( tempStr, " %d", pointList[j]);
strcat( comment, tempStr);
}
strcpy( G->name, altGroupLibName);
G->printFormat = (imageFormatFlag ? imageFormat : cycleFormat);
nameGenerators( G, options.genNamePrefix);
writePermGroup( altGroupFileName, altGroupLibName, G, NULL);
}
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.