int _IsolateMinorE2(graphP theGraph) { isolatorContextP IC = &theGraph->IC; _FillVisitedFlags(theGraph, 0); IC->v = IC->uz; IC->dw = IC->dz; IC->z = IC->uz = IC->dz = NIL; theGraph->IC.minorType ^= MINORTYPE_E; theGraph->IC.minorType |= (MINORTYPE_A|MINORTYPE_E2); return _IsolateMinorA(theGraph); }
int _IsolateMinorE2(graphP theGraph) { isolatorContextP IC = &theGraph->IC; // Note: The x-y path was already marked, due to identifying E as the type of non-planarity minor, // but we're reducing to Minor A, which does not include the x-y path, so the visited flags are // cleared as a convenient, if somewhat wasteful, way to clear the marking on the x-y path _ClearVisitedFlags(theGraph); IC->v = IC->uz; IC->dw = IC->dz; IC->z = IC->uz = IC->dz = NIL; theGraph->IC.minorType ^= MINORTYPE_E; theGraph->IC.minorType |= (MINORTYPE_A|MINORTYPE_E2); return _IsolateMinorA(theGraph); }
int _IsolateKuratowskiSubgraph(graphP theGraph, int I, int R) { int RetVal; /* A subgraph homeomorphic to K_{3,3} or K_5 will be isolated by using the visited flags, 1=keep edge/vertex and 0=omit. Here we initialize to omit all, then we subsequently set visited to 1 on all edges and vertices in the homeomorph. */ _FillVisitedFlags(theGraph, 0); /* Next, we determine which of the non-planarity Minors was encountered and the principal bicomp on which the isolator will focus attention. */ if (_ChooseTypeOfNonplanarityMinor(theGraph, I, R) != OK) return NOTOK; if (_InitializeIsolatorContext(theGraph) != OK) return NOTOK; /* Call the appropriate isolator */ if (theGraph->IC.minorType & MINORTYPE_A) RetVal = _IsolateMinorA(theGraph); else if (theGraph->IC.minorType & MINORTYPE_B) RetVal = _IsolateMinorB(theGraph); else if (theGraph->IC.minorType & MINORTYPE_C) RetVal = _IsolateMinorC(theGraph); else if (theGraph->IC.minorType & MINORTYPE_D) RetVal = _IsolateMinorD(theGraph); else if (theGraph->IC.minorType & MINORTYPE_E) RetVal = _IsolateMinorE(theGraph); else RetVal = NOTOK; /* Delete the unmarked edges and vertices, and return */ if (RetVal == OK) RetVal = _DeleteUnmarkedVerticesAndEdges(theGraph); return RetVal; }