ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
Transduction::ManUtil< Man, lit, LitMax > Class Template Reference

#include <giaTransduction.h>

Inheritance diagram for Transduction::ManUtil< Man, lit, LitMax >:

Protected Member Functions

void IncRef (lit x) const
 
void DecRef (lit x) const
 
void Update (lit &x, lit y) const
 
void DelVec (std::vector< lit > &v) const
 
void DelVec (std::vector< std::vector< lit > > &v) const
 
void CopyVec (std::vector< lit > &v, std::vector< lit > const &u) const
 
void CopyVec (std::vector< std::vector< lit > > &v, std::vector< std::vector< lit > > const &u) const
 
bool LitVecIsEq (std::vector< lit > const &v, std::vector< lit > const &u) const
 
bool LitVecIsEq (std::vector< std::vector< lit > > const &v, std::vector< std::vector< lit > > const &u) const
 
lit Xor (lit x, lit y) const
 

Protected Attributes

Man * man
 

Detailed Description

template<class Man, class lit, lit LitMax>
class Transduction::ManUtil< Man, lit, LitMax >

Definition at line 43 of file giaTransduction.h.

Member Function Documentation

◆ CopyVec() [1/2]

template<class Man, class lit, lit LitMax>
void Transduction::ManUtil< Man, lit, LitMax >::CopyVec ( std::vector< lit > & v,
std::vector< lit > const & u ) const
inlineprotected

Definition at line 69 of file giaTransduction.h.

69 {
70 DelVec(v);
71 v = u;
72 for(unsigned i = 0; i < v.size(); i++)
73 IncRef(v[i]);
74 }
void DelVec(std::vector< lit > &v) const
void IncRef(lit x) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyVec() [2/2]

template<class Man, class lit, lit LitMax>
void Transduction::ManUtil< Man, lit, LitMax >::CopyVec ( std::vector< std::vector< lit > > & v,
std::vector< std::vector< lit > > const & u ) const
inlineprotected

Definition at line 75 of file giaTransduction.h.

75 {
76 for(unsigned i = u.size(); i < v.size(); i++)
77 DelVec(v[i]);
78 v.resize(u.size());
79 for(unsigned i = 0; i < v.size(); i++)
80 CopyVec(v[i], u[i]);
81 }
void CopyVec(std::vector< lit > &v, std::vector< lit > const &u) const
Here is the call graph for this function:

◆ DecRef()

template<class Man, class lit, lit LitMax>
void Transduction::ManUtil< Man, lit, LitMax >::DecRef ( lit x) const
inlineprotected

Definition at line 50 of file giaTransduction.h.

50 {
51 if(x != LitMax)
52 man->DecRef(x);
53 }
Here is the caller graph for this function:

◆ DelVec() [1/2]

template<class Man, class lit, lit LitMax>
void Transduction::ManUtil< Man, lit, LitMax >::DelVec ( std::vector< lit > & v) const
inlineprotected

Definition at line 59 of file giaTransduction.h.

59 {
60 for(unsigned i = 0; i < v.size(); i++)
61 DecRef(v[i]);
62 v.clear();
63 }
void DecRef(lit x) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DelVec() [2/2]

template<class Man, class lit, lit LitMax>
void Transduction::ManUtil< Man, lit, LitMax >::DelVec ( std::vector< std::vector< lit > > & v) const
inlineprotected

Definition at line 64 of file giaTransduction.h.

64 {
65 for(unsigned i = 0; i < v.size(); i++)
66 DelVec(v[i]);
67 v.clear();
68 }
Here is the call graph for this function:

◆ IncRef()

template<class Man, class lit, lit LitMax>
void Transduction::ManUtil< Man, lit, LitMax >::IncRef ( lit x) const
inlineprotected

Definition at line 46 of file giaTransduction.h.

46 {
47 if(x != LitMax)
48 man->IncRef(x);
49 }
Here is the caller graph for this function:

◆ LitVecIsEq() [1/2]

template<class Man, class lit, lit LitMax>
bool Transduction::ManUtil< Man, lit, LitMax >::LitVecIsEq ( std::vector< lit > const & v,
std::vector< lit > const & u ) const
inlineprotected

Definition at line 82 of file giaTransduction.h.

82 {
83 if(v.size() != u.size())
84 return false;
85 for(unsigned i = 0; i < v.size(); i++)
86 if(!man->LitIsEq(v[i], u[i]))
87 return false;
88 return true;
89 }
Here is the caller graph for this function:

◆ LitVecIsEq() [2/2]

template<class Man, class lit, lit LitMax>
bool Transduction::ManUtil< Man, lit, LitMax >::LitVecIsEq ( std::vector< std::vector< lit > > const & v,
std::vector< std::vector< lit > > const & u ) const
inlineprotected

Definition at line 90 of file giaTransduction.h.

90 {
91 if(v.size() != u.size())
92 return false;
93 for(unsigned i = 0; i < v.size(); i++)
94 if(!LitVecIsEq(v[i], u[i]))
95 return false;
96 return true;
97 }
bool LitVecIsEq(std::vector< lit > const &v, std::vector< lit > const &u) const
Here is the call graph for this function:

◆ Update()

template<class Man, class lit, lit LitMax>
void Transduction::ManUtil< Man, lit, LitMax >::Update ( lit & x,
lit y ) const
inlineprotected

Definition at line 54 of file giaTransduction.h.

54 {
55 DecRef(x);
56 x = y;
57 IncRef(x);
58 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Xor()

template<class Man, class lit, lit LitMax>
lit Transduction::ManUtil< Man, lit, LitMax >::Xor ( lit x,
lit y ) const
inlineprotected

Definition at line 98 of file giaTransduction.h.

98 {
99 lit f = man->And(x, man->LitNot(y));
100 man->IncRef(f);
101 lit g = man->And(man->LitNot(x), y);
102 man->IncRef(g);
103 lit r = man->Or(f, g);
104 man->DecRef(f);
105 man->DecRef(g);
106 return r;
107 }
Here is the caller graph for this function:

Member Data Documentation

◆ man

template<class Man, class lit, lit LitMax>
Man* Transduction::ManUtil< Man, lit, LitMax >::man
protected

Definition at line 45 of file giaTransduction.h.


The documentation for this class was generated from the following file: