/* Copyright (C) 1992 by Jeffrey S. Leon. This software may be used freely foreducationalandresearchpurposes.Anyotheruserequirespermission
from the author. */
/* Main program for design/matrix automorphism group and isomorphismprograms.Theformatsforthecommandsare:
/* Provide help if no arguments are specified. Note i and j must be as
described above. */ if ( startOptions == argc ) { switch( computationType ) { case DESIGN_AUTO:
printf( "\nUsage: desauto [options] design autoGroup\n"); break; case MATRIX_AUTO:
printf( "\nUsage: matauto [options] matrix autoGroup\n"); break; case CODE_AUTO:
printf( "\nUsage: codeauto [options] code invarVectorss autoGroup\n"); break; case DESIGN_ISO:
printf( "\nUsage: desiso [options] design1 design2 isoPerm\n"); break; case MATRIX_ISO:
printf( "\nUsage: matiso [options] matrix1 matrix2 isoPerm\n"); break; case CODE_ISO:
printf( "\nUsage: codeiso [options] code1 code2 invarVectors1 invarVectors2 \n"); break;
} return0;
}
/* Check for limits option. If present in position startOptions give
limits and return. */ if ( startOptions < argc && (strcmp( argv[startOptions], "-l") == 0 ||
strcmp( argv[startOptions], "-L") == 0) ) {
showLimits(); return0;
} /* Check for verify option. If present in position startOptions, perform
verify. (Note verifyOptions terminates program). */ if ( startOptions < argc && (strcmp( argv[startOptions], "-v") == 0 ||
strcmp( argv[startOptions], "-V") == 0) )
verifyOptions();
/* Check for exactly 2 (design or matrix group), 3 (code group or design
or matrix iso), or 4 (code iso ) parameters following options. */ for ( optionCountPlus1 = startOptions ; optionCountPlus1 < argc &&
argv[optionCountPlus1][0] == '-' ; ++optionCountPlus1 )
;
/* Read in the known subgroups, if present, and the codes, if present. */ switch ( computationType ) { case DESIGN_AUTO: case MATRIX_AUTO: case CODE_AUTO: if ( knownSubgroupSpecifier[0] )
L = readPermGroup( knownSubgroupFileName, knownSubgroupLibraryName,
degree, "Generate"); break; case DESIGN_ISO: case MATRIX_ISO: case CODE_ISO: if ( knownSubgroup_L_Specifier[0] )
L_L = readPermGroup( knownSubgroup_L_FileName,
knownSubgroup_L_LibraryName, degree, "Generate"); if ( knownSubgroup_R_Specifier[0] )
L_R = readPermGroup( knownSubgroup_R_FileName,
knownSubgroup_R_LibraryName, degree, "Generate"); break;
}
/* Compute maximum base change level if not specified as option ??????. */ if ( options.maxBaseChangeLevel == UNKNOWN )
options.maxBaseChangeLevel = 0;
/* Compute the automorphism group or check isomorphism, and write out
the group or isomorphism permutation. */ switch ( computationType ) { case DESIGN_AUTO: case MATRIX_AUTO: case CODE_AUTO: if ( options.inform ) { switch ( computationType ) { case DESIGN_AUTO:
printf( "\n\n Design Automorphism Group Program: " "Design %s\n\n", matrix->name);
sprintf( comment, "The automorphism group of design %s.",
matrix->name);
options.groupOrderMessage = "Design automorphism group"; break; case MATRIX_AUTO: if ( monomialFlag ) {
printf( "\n\n Matrix Monomial Group Program: " "Matrix %s\n\n", matrix->name);
sprintf( comment, "The monomial group of matrix %s.",
matrix->name);
options.groupOrderMessage = "Matrix monomial automorphism group";
} else {
printf( "\n\n Matrix Automorphism Group Program: " "Matrix %s\n\n", matrix->name);
sprintf( comment, "The automorphism group of matrix %s.",
matrix->name);
options.groupOrderMessage = "Matrix automorphism group";
} break; case CODE_AUTO:
printf( "\n\n Code Automorphism Group Program: " "Code %s, Invariant set %s\n\n", C->name, matrix->name);
sprintf( comment, "The automorphism group of code %s.",
C->name);
options.groupOrderMessage = "Code automorphism group"; break; default: /* can not actually reach here, silence a compiler warning */ break;
} if ( L )
printf( "\nKnown Subgroup: %s\n", L->name);
printf( "\n");
} if ( (computationType == MATRIX_AUTO && matrix->setSize > 2) ||
(computationType == CODE_AUTO && C->fieldSize > 2) )
A = matrixAutoGroup( matrix, L, C, monomialFlag); else
A = designAutoGroup( matrix, L, C);
strcpy( A->name, outputObjectName);
A->printFormat = (imageFormatFlag ? imageFormat : cycleFormat); if ( pbFlag ) if ( monomialFlag )
writePermGroupRestricted( outputFileName, outputLibraryName, A,
comment, matrix->numberOfCols); else
writePermGroup( outputFileName, outputLibraryName, A, comment); else
writePermGroupRestricted( outputFileName, outputLibraryName, A,
comment, matrix->numberOfRows); break; case DESIGN_ISO: case MATRIX_ISO: case CODE_ISO: if ( options.inform ) { switch ( computationType ) { case DESIGN_ISO:
printf( "\n\n Design Isomorphism Program: " "Designs %s and %s\n\n", matrix_L->name, matrix_R->name);
sprintf( comment, "An isomorphism from design %s to design %s.",
matrix_L->name, matrix_R->name);
options.cosetRepMessage = "The designs are isomorphic. An isomorphism is:";
options.noCosetRepMessage = "The designs are not isomorphic."; break; case MATRIX_ISO: if ( monomialFlag ) {
printf( "\n\n Matrix Monomial Isomorphism Program: " "Matrices %s and %s\n\n", matrix_L->name, matrix_R->name);
sprintf( comment, "An monomial isomorphism from matrix %s to matrix %s.",
matrix_L->name, matrix_R->name);
options.cosetRepMessage = "The matrices are monomially isomorphic. An isomorphism is:";
options.noCosetRepMessage = "The designs are not monomially isomorphic.";
} else {
printf( "\n\n Matrix Isomorphism Program: " "Matrices %s and %s\n\n", matrix_L->name, matrix_R->name);
sprintf( comment, "An isomorphism from matrix %s to matrix %s.",
matrix_L->name, matrix_R->name);
options.cosetRepMessage = "The matrices are isomorphic. An isomorphism is:";
options.noCosetRepMessage = "The matrices are not isomorphic.";
} break; case CODE_ISO:
printf( "\n\n Code Isomorphism Program: " "Codes %s and %s, Invariant sets %s and %s\n\n",
C_L->name, C_R->name, matrix_L->name, matrix_R->name);
sprintf( comment, "An isomorphism from code %s to code %s.",
C_L->name, C_R->name);
options.cosetRepMessage = "The codes are isomorphic. An isomorphism is:";
options.noCosetRepMessage = "The codes are not isomorphic."; break; default: /* can not actually reach here, silence a compiler warning */ break;
} if ( L_L )
printf( "\nKnown Subgroup (left): %s", L_L->name); if ( L_R )
printf( "\nKnown Subgroup (right): %s", L_R->name); if ( L_L || L_R )
printf( "\n");
} if ( (computationType == MATRIX_ISO && matrix_L->setSize > 2) ||
(computationType == CODE_ISO && C_L->fieldSize > 2) )
y = matrixIsomorphism( matrix_L, matrix_R, L_L, L_R, C_L, C_R,
monomialFlag, pbFlag); else
y = designIsomorphism( matrix_L, matrix_R, L_L, L_R, C_L, C_R, pbFlag); if ( y ) {
strcpy( y->name, outputObjectName); if ( pbFlag ) if ( monomialFlag ) if ( imageFormatFlag )
writePermutationRestricted( outputFileName,
outputLibraryName, y, "image", comment,
matrix_L->numberOfCols); else
writePermutationRestricted( outputFileName,
outputLibraryName, y, "", comment,
matrix_L->numberOfCols); else if ( imageFormatFlag )
writePermutation( outputFileName, outputLibraryName, y, "image", comment); else
writePermutation( outputFileName, outputLibraryName, y, "", comment); else if ( imageFormatFlag )
writePermutationRestricted( outputFileName, outputLibraryName,
y, "image", comment, matrix_L->numberOfRows); else
writePermutationRestricted( outputFileName, outputLibraryName,
y, "", comment, matrix_L->numberOfRows);
} break;
}
/* Return to caller. */ if ( !imageFlag || y ) return0; else return1;
}
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.