Example #1
0
int  _IsolateMinorE1(graphP theGraph)
{
    isolatorContextP IC = &theGraph->IC;

    if (gp_GetVertexObstructionType(theGraph, IC->z) == VERTEX_OBSTRUCTIONTYPE_LOW_RXW)
    {
        gp_ResetVertexObstructionType(theGraph, IC->px, VERTEX_OBSTRUCTIONTYPE_HIGH_RXW);
        IC->x=IC->z;
        IC->ux=IC->uz;
        IC->dx=IC->dz;
    }
    else if (gp_GetVertexObstructionType(theGraph, IC->z) == VERTEX_OBSTRUCTIONTYPE_LOW_RYW)
    {
        gp_ResetVertexObstructionType(theGraph, IC->py, VERTEX_OBSTRUCTIONTYPE_HIGH_RYW);
        IC->y=IC->z;
        IC->uy=IC->uz;
        IC->dy=IC->dz;
    }
    else return NOTOK;

    // Note: The x-y path is already marked, due to identifying E as the type of non-planarity minor,
    // but the x-y path is also included in minor C, so we let it stay marked since the minor C
    // isolator also assumes the x-y path has been marked by non-planarity minor type identification
    IC->z = IC->uz = IC->dz = NIL;
    theGraph->IC.minorType ^= MINORTYPE_E;
    theGraph->IC.minorType |= (MINORTYPE_C|MINORTYPE_E1);
    return _IsolateMinorC(theGraph);
}
Example #2
0
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;
}
Example #3
0
int  _IsolateMinorE1(graphP theGraph)
{
isolatorContextP IC = &theGraph->IC;

     if (theGraph->G[IC->z].type == VERTEX_LOW_RXW)
     {
         theGraph->G[IC->px].type = VERTEX_HIGH_RXW;
         IC->x=IC->z; IC->ux=IC->uz; IC->dx=IC->dz;
     }
     else if (theGraph->G[IC->z].type == VERTEX_LOW_RYW)
     {
         theGraph->G[IC->py].type = VERTEX_HIGH_RYW;
         IC->y=IC->z; IC->uy=IC->uz; IC->dy=IC->dz;
     }
     else return NOTOK;

     IC->z = IC->uz = IC->dz = NIL;
     theGraph->IC.minorType ^= MINORTYPE_E;
     theGraph->IC.minorType |= (MINORTYPE_C|MINORTYPE_E1);
     return _IsolateMinorC(theGraph);
}
int  _IsolateMinorE1(graphP theGraph)
{
isolatorContextP IC = &theGraph->IC;

     if (gp_GetVertexObstructionType(theGraph, IC->z) == VERTEX_OBSTRUCTIONTYPE_LOW_RXW)
     {
         gp_ResetVertexObstructionType(theGraph, IC->px, VERTEX_OBSTRUCTIONTYPE_HIGH_RXW);
         IC->x=IC->z; IC->ux=IC->uz; IC->dx=IC->dz;
     }
     else if (gp_GetVertexObstructionType(theGraph, IC->z) == VERTEX_OBSTRUCTIONTYPE_LOW_RYW)
     {
         gp_ResetVertexObstructionType(theGraph, IC->py, VERTEX_OBSTRUCTIONTYPE_HIGH_RYW);
         IC->y=IC->z; IC->uy=IC->uz; IC->dy=IC->dz;
     }
     else return NOTOK;

     IC->z = IC->uz = IC->dz = NIL;
     theGraph->IC.minorType ^= MINORTYPE_E;
     theGraph->IC.minorType |= (MINORTYPE_C|MINORTYPE_E1);
     return _IsolateMinorC(theGraph);
}