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

  Synopsis    [Count the cubes with non-trivial literals with the given value.]

  Description [The data and the cover are given (pData, pCover). Also given 
  are the variable number and the number of a value of this variable.
  This procedure returns the number of cubes having a non-trivial literal
  of this variable that have the given value present.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Count the cubes with non-trivial literals with the given value.]

Description [The data and the cover are given (pData, pCover). Also given
are the variable number and the number of a value of this variable.
This procedure returns the number of cubes having a non-trivial literal
of this variable that have the given value present.]




Function Synopsis [ Count the cubes with non - trivial literals with the given value . ] Description [ The data and the cover are given ( pData pCover ) . Also given are the variable number and the number of a value of this variable . This procedure returns the number of cubes having a non - trivial literal of this variable that have the given value present . ]
int Mvr_CoverCountLitsWithValue( Mvc_Data_t * pData, Mvc_Cover_t * pCover, int iVar, int iValue )
{
    Mvc_Cube_t * pCube;
    int iValueFirst, Res, Counter;
    Counter = 0;
    iValueFirst = Vm_VarMapReadValuesFirst( pData->pVm, iVar );
    Mvc_CoverForEachCube( pCover, pCube )
    {
        Mvc_CubeBitEqualUnderMask( Res, pCube, pData->ppMasks[iVar], pData->ppMasks[iVar] );
        if ( Res )
            continue;
        Counter += Mvc_CubeBitValue( pCube, iValueFirst + iValue );
    }
    return Counter;
}
int Mvr_CoverCountLitsWithValue ( Mvc_Data_t * pData , Mvc_Cover_t * pCover , int iVar , int iValue ) { Mvc_Cube_t * pCube ; int iValueFirst , Res , Counter ; Counter = 0 ; iValueFirst = Vm_VarMapReadValuesFirst ( pData -> pVm , iVar ) ; Mvc_CoverForEachCube ( pCover , pCube ) { Mvc_CubeBitEqualUnderMask ( Res , pCube , pData -> ppMasks [ iVar ] , pData -> ppMasks [ iVar ] ) ; if ( Res ) continue ; Counter += Mvc_CubeBitValue ( pCube , iValueFirst + iValue ) ; } return Counter ; }
Function
Synopsis    [Count the cubes with non-trivial literals with the given value.]
Function Synopsis [ Count the cubes with non - trivial literals with the given value . ]
// check if the given literal is the full literal // this literal is not a full literal; check if it has this value