/* Open input file. */
libFile = fopen( libFileName, "r"); if ( libFile == NULL )
ERROR1s( "readPermutation", "File ", libFileName, " could not be opened for input.")
/* Check whether permutation is in cycle or image format, and call
appropriate function to finish read. */ switch ( token = readToken() , token.type ) { case leftParen:
unreadToken( token);
readCyclePerm( perm); break; case slash:
unreadToken( token);
readImagePerm( perm); break; default:
unreadToken( token);
ERROR( "readPermutation", "Invalid symbol at start of cycle/image field.");
}
/* Adjoin inverse, if requested. */ if ( inverseFlag ) {
perm->invImage = allocIntArrayDegree(); for ( pt = 1 ; pt <= requiredDegree ; ++pt )
perm->invImage[perm->image[pt]] = pt;
}
/* Close the input file and return. */
fclose( libFile); return perm;
}
/* Open output file. */
libFile = fopen( libFileName, options.outputFileMode); if ( libFile == NULL )
ERROR1s( "writePermutation", "File ", libFileName, " could not be opened for output.")
/* This procedure is identical to writePermutation, except that it assumes that perm fixes {1,...,restrictedDegree} (not checked!) and writes it
out as a permutation of degree restrictedDegree. */
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.