Skip to content

Commit

Permalink
Add 'Diff' (including operator overload) to C++ API
Browse files Browse the repository at this point in the history
  • Loading branch information
SSoelvsten committed May 28, 2024
1 parent 2ea67dd commit c69cf30
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/calObj.hh
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,24 @@ public:
BDD Xnor(const BDD &g) const
{ return BDD(this->_bddManager, Cal_BddXnor(this->_bddManager, this->_bdd, g._bdd)); }

//////////////////////////////////////////////////////////////////////////////
/// \brief Logical Difference operation.
//////////////////////////////////////////////////////////////////////////////
BDD Diff(const BDD &g) const
{ return *this & ~g; }

//////////////////////////////////////////////////////////////////////////////
/// \see BDD::Diff()
//////////////////////////////////////////////////////////////////////////////
BDD operator- (const BDD &other) const
{ return this->Diff(other); }

//////////////////////////////////////////////////////////////////////////////
/// \see BDD::Diff()
//////////////////////////////////////////////////////////////////////////////
BDD& operator-= (const BDD &other)
{ return (*this = (*this) - other); }

//////////////////////////////////////////////////////////////////////////////
/// \brief A satisfying assignment of this BDD.
///
Expand Down

0 comments on commit c69cf30

Please sign in to comment.