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);
}
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);
}