abc/src/misc/mvc/mvcDivide.c
/**Function*************************************************************

  Synopsis    [Derives the quotient of division by literal.]

  Description [Reduces the cover to be the equal to the result of
  division of the given cover by the literal.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Derives the quotient of division by literal.]

Description [Reduces the cover to be the equal to the result of
division of the given cover by the literal.]




Function Synopsis [ Derives the quotient of division by literal . ] Description [ Reduces the cover to be the equal to the result of division of the given cover by the literal . ]
void Mvc_CoverDivideByLiteralQuo( Mvc_Cover_t * pCover, int iLit )
{
    Mvc_Cube_t * pCube, * pCube2, * pPrev;
    pPrev = NULL;
    Mvc_CoverForEachCubeSafe( pCover, pCube, pCube2 )
    {
        if ( Mvc_CubeBitValue( pCube, iLit ) == 0 )
        { 
            Mvc_CoverDeleteCube( pCover, pPrev, pCube );
            Mvc_CubeFree( pCover, pCube );
        }
        else
        { 
            Mvc_CubeBitRemove( pCube, iLit );
            pPrev = pCube;
        }
    }
}
void Mvc_CoverDivideByLiteralQuo ( Mvc_Cover_t * pCover , int iLit ) { Mvc_Cube_t * pCube , * pCube2 , * pPrev ; pPrev = NULL ; Mvc_CoverForEachCubeSafe ( pCover , pCube , pCube2 ) { if ( Mvc_CubeBitValue ( pCube , iLit ) == 0 ) { Mvc_CoverDeleteCube ( pCover , pPrev , pCube ) ; Mvc_CubeFree ( pCover , pCube ) ; } else { Mvc_CubeBitRemove ( pCube , iLit ) ; pPrev = pCube ; } } }
Function
Synopsis    [Derives the quotient of division by literal.]
Function Synopsis [ Derives the quotient of division by literal . ]
// delete those cubes that do not have this literal // remove this literal from other cubes // delete the cube from the cover // don't update the previous cube // delete this literal from the cube // update the previous cube