/* The function isMatrix01Isomorphism( M1, M2, s) returns TRUE if permutation s is an isomorphism of the (0,1) matrix M1 to the (0,1) matrix M2 and returns
returns true otherwise. */
BOOLEAN isMatrix01Isomorphism( const Matrix_01 *const M1, const Matrix_01 *const M2, const Permutation *const s, constUnsigned monomialFlag) /* If TRUE, check that iso */ /* is monomial. */
{ Unsigned i, j, temp, mu, lambda, nRows = M1->numberOfRows;
UnsignedS *image = s->image; Unsigned collapsedDegree;
if ( M1->numberOfRows != M2->numberOfRows || M1->numberOfCols !=
M2->numberOfCols || M1->numberOfRows+M1->numberOfCols != s->degree )
ERROR( "isMatrix01Isomorphism", "Sizes or degrees not compatible.")
/* If requested, check that s satisfies the monomial property. */ if ( monomialFlag ) {
collapsedDegree = (M1->numberOfRows+M1->numberOfCols) /
(M1->setSize-1); for ( i = 1 ; i <= collapsedDegree ; ++i ) { /* Find mu,j such that s(1*i) = mu*j. */
temp = s->image[(M1->setSize-1)*(i-1)+1];
j = (temp-1) / (M1->setSize-1) + 1;
mu = (temp-1) % (M1->setSize-1) + 1; for ( lambda = 2 ; lambda < M1->setSize ; ++lambda ) if ( s->image[(M1->setSize-1)*(i-1)+lambda] !=
(M1->setSize-1)*(j-1) + M1->field->prod[lambda][mu] ) returnFALSE;
}
}
/* Now check that each M1^s = M2. */ for ( i = 1 ; i <= M1->numberOfRows ; ++i ) for ( j = 1 ; j <= M1->numberOfCols ; ++j ) if ( M1->entry[i][j] !=
M2->entry[image[i]][image[j+nRows]-nRows] ) returnFALSE;
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.