ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
Minisat::OccLists< Idx, Vec, Deleted > Class Template Reference

#include <SolverTypes.h>

Public Member Functions

 OccLists (const Deleted &d)
 
void init (const Idx &idx)
 
Vec & operator[] (const Idx &idx)
 
Vec & lookup (const Idx &idx)
 
void cleanAll ()
 
void clean (const Idx &idx)
 
void smudge (const Idx &idx)
 
void clear (bool free=true)
 

Detailed Description

template<class Idx, class Vec, class Deleted>
class Minisat::OccLists< Idx, Vec, Deleted >

Definition at line 258 of file SolverTypes.h.

Constructor & Destructor Documentation

◆ OccLists()

template<class Idx, class Vec, class Deleted>
Minisat::OccLists< Idx, Vec, Deleted >::OccLists ( const Deleted & d)
inline

Definition at line 266 of file SolverTypes.h.

266: deleted(d) {}

Member Function Documentation

◆ clean()

template<class Idx, class Vec, class Deleted>
void Minisat::OccLists< Idx, Vec, Deleted >::clean ( const Idx & idx)

Definition at line 302 of file SolverTypes.h.

303{
304 Vec& vec = occs[toInt(idx)];
305 int i, j;
306 for (i = j = 0; i < vec.size(); i++)
307 if (!deleted(vec[i]))
308 vec[j++] = vec[i];
309 vec.shrink(i - j);
310 dirty[toInt(idx)] = 0;
311}
int toInt(Var v)
Definition SolverTypes.h:67
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanAll()

template<class Idx, class Vec, class Deleted>
void Minisat::OccLists< Idx, Vec, Deleted >::cleanAll ( )

Definition at line 291 of file SolverTypes.h.

292{
293 for (int i = 0; i < dirties.size(); i++)
294 // Dirties may contain duplicates so check here if a variable is already cleaned:
295 if (dirty[toInt(dirties[i])])
296 clean(dirties[i]);
297 dirties.clear();
298}
void clean(const Idx &idx)
Here is the call graph for this function:

◆ clear()

template<class Idx, class Vec, class Deleted>
void Minisat::OccLists< Idx, Vec, Deleted >::clear ( bool free = true)
inline

Definition at line 282 of file SolverTypes.h.

282 {
283 occs .clear(free);
284 dirty .clear(free);
285 dirties.clear(free);
286 }
Here is the call graph for this function:

◆ init()

template<class Idx, class Vec, class Deleted>
void Minisat::OccLists< Idx, Vec, Deleted >::init ( const Idx & idx)
inline

Definition at line 268 of file SolverTypes.h.

268{ occs.growTo(toInt(idx)+1); dirty.growTo(toInt(idx)+1, 0); }
Here is the call graph for this function:

◆ lookup()

template<class Idx, class Vec, class Deleted>
Vec & Minisat::OccLists< Idx, Vec, Deleted >::lookup ( const Idx & idx)
inline

Definition at line 271 of file SolverTypes.h.

271{ if (dirty[toInt(idx)]) clean(idx); return occs[toInt(idx)]; }
Here is the call graph for this function:

◆ operator[]()

template<class Idx, class Vec, class Deleted>
Vec & Minisat::OccLists< Idx, Vec, Deleted >::operator[] ( const Idx & idx)
inline

Definition at line 270 of file SolverTypes.h.

270{ return occs[toInt(idx)]; }
Here is the call graph for this function:

◆ smudge()

template<class Idx, class Vec, class Deleted>
void Minisat::OccLists< Idx, Vec, Deleted >::smudge ( const Idx & idx)
inline

Definition at line 275 of file SolverTypes.h.

275 {
276 if (dirty[toInt(idx)] == 0){
277 dirty[toInt(idx)] = 1;
278 dirties.push(idx);
279 }
280 }
Here is the call graph for this function:

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