int _CheckKuratowskiSubgraphIntegrity(graphP theGraph) { int degrees[5], imageVerts[6]; if (_getImageVertices(theGraph, degrees, 4, imageVerts, 6) != OK) return NOTOK; if (_TestForCompleteGraphObstruction(theGraph, 5, degrees, imageVerts) == TRUE) { return OK; } if (_TestForK33GraphObstruction(theGraph, degrees, imageVerts) == TRUE) { return OK; } return NOTOK; }
int _K33Search_CheckObstructionIntegrity(graphP theGraph, graphP origGraph) { // When searching for K3,3, we ensure that theGraph is a subgraph of // the original graph and that it contains a K3,3 homeomorph if (theGraph->embedFlags == EMBEDFLAGS_SEARCHFORK33) { int degrees[5], imageVerts[6]; if (_TestSubgraph(theGraph, origGraph) != TRUE) { return NOTOK; } if (_getImageVertices(theGraph, degrees, 4, imageVerts, 6) != OK) { return NOTOK; } if (_TestForK33GraphObstruction(theGraph, degrees, imageVerts) == TRUE) { return OK; } return NOTOK; } // When not searching for K3,3, we let the superclass do the work else { K33SearchContext *context = NULL; gp_FindExtension(theGraph, K33SEARCH_ID, (void *)&context); if (context != NULL) { return context->functions.fpCheckObstructionIntegrity(theGraph, origGraph); } } return NOTOK; }