abc/src/opt/fxch/FxchDiv.c
/**Function*************************************************************

  Synopsis    [ Removes a divisor to the divisors hash table. ]

  Description [ This function don't effectively removes a divisor from
                the hash table (the hash table implementation don't 
                support such operation). It only assures its existence
                and decrement its weight. ]

  SideEffects [ If the fUpdate option is set, the function will also
                update the divisor priority queue. ]

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [ Removes a divisor to the divisors hash table.

Description [ This function don't effectively removes a divisor from
the hash table (the hash table implementation don't
support such operation). It only assures its existence
and decrement its weight.

SideEffects [ If the fUpdate option is set, the function will also
update the divisor priority queue.


Function Synopsis [ Removes a divisor to the divisors hash table . Description [ This function don ' t effectively removes a divisor from the hash table ( the hash table implementation don ' t support such operation ) . It only assures its existence and decrement its weight . SideEffects [ If the fUpdate option is set the function will also update the divisor priority queue .
int Fxch_DivRemove( Fxch_Man_t* pFxchMan,
                    int fUpdate,
                    int fSingleCube,
                    int fBase )
{
    int iDiv = Hsh_VecManAdd( pFxchMan->pDivHash, pFxchMan->vCubeFree );
    assert( iDiv < Vec_FltSize( pFxchMan->vDivWeights ) );
    if ( fSingleCube )
        Vec_FltAddToEntry( pFxchMan->vDivWeights, iDiv, -1 );
    else
        Vec_FltAddToEntry( pFxchMan->vDivWeights, iDiv, -( fBase + Vec_IntSize( pFxchMan->vCubeFree ) - 1 ) );
    if ( fUpdate )
        if ( pFxchMan->vDivPrio )
        {
            if ( Vec_QueIsMember( pFxchMan->vDivPrio, iDiv ) )
                Vec_QueUpdate( pFxchMan->vDivPrio, iDiv );
        }
    return iDiv;
}
int Fxch_DivRemove ( Fxch_Man_t * pFxchMan , int fUpdate , int fSingleCube , int fBase ) { int iDiv = Hsh_VecManAdd ( pFxchMan -> pDivHash , pFxchMan -> vCubeFree ) ; assert ( iDiv < Vec_FltSize ( pFxchMan -> vDivWeights ) ) ; if ( fSingleCube ) Vec_FltAddToEntry ( pFxchMan -> vDivWeights , iDiv , -1 ) ; else Vec_FltAddToEntry ( pFxchMan -> vDivWeights , iDiv , - ( fBase + Vec_IntSize ( pFxchMan -> vCubeFree ) - 1 ) ) ; if ( fUpdate ) if ( pFxchMan -> vDivPrio ) { if ( Vec_QueIsMember ( pFxchMan -> vDivPrio , iDiv ) ) Vec_QueUpdate ( pFxchMan -> vDivPrio , iDiv ) ; } return iDiv ; }
Function
Synopsis    [ Removes a divisor to the divisors hash table. ]
Function Synopsis [ Removes a divisor to the divisors hash table . ]
/* Decrement weight */