yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Minisat::IntSet< K, MkIndex > Class Template Reference

#include <IntMap.h>

+ Collaboration diagram for Minisat::IntSet< K, MkIndex >:

Public Member Functions

int size (void) const
 
void clear (bool free=false)
 
const vec< K > & toVec () const
 
operator[] (int index) const
 
void insert (K k)
 
bool has (K k)
 

Private Attributes

IntMap< K, char, MkIndex > in_set
 
vec< K > xs
 

Detailed Description

template<class K, class MkIndex = MkIndexDefault<K>>
class Minisat::IntSet< K, MkIndex >

Definition at line 59 of file IntMap.h.

Member Function Documentation

template<class K, class MkIndex = MkIndexDefault<K>>
void Minisat::IntSet< K, MkIndex >::clear ( bool  free = false)
inline

Definition at line 67 of file IntMap.h.

67  {
68  if (free)
69  in_set.clear(true);
70  else
71  for (int i = 0; i < xs.size(); i++)
72  in_set[xs[i]] = 0;
73  xs.clear(free);
74  }
void free(void *)
void clear(bool dispose=false)
Definition: IntMap.h:52
vec< K > xs
Definition: IntMap.h:62
Size size(void) const
Definition: Vec.h:64
void clear(bool dealloc=false)
Definition: Vec.h:125
IntMap< K, char, MkIndex > in_set
Definition: IntMap.h:61

+ Here is the caller graph for this function:

template<class K, class MkIndex = MkIndexDefault<K>>
bool Minisat::IntSet< K, MkIndex >::has ( k)
inline

Definition at line 85 of file IntMap.h.

85 { in_set.reserve(k, 0); return in_set[k]; }
void reserve(K key, V pad)
Definition: IntMap.h:47
IntMap< K, char, MkIndex > in_set
Definition: IntMap.h:61
template<class K, class MkIndex = MkIndexDefault<K>>
void Minisat::IntSet< K, MkIndex >::insert ( k)
inline

Definition at line 84 of file IntMap.h.

84 { in_set.reserve(k, 0); if (!in_set[k]) { in_set[k] = 1; xs.push(k); } }
void reserve(K key, V pad)
Definition: IntMap.h:47
vec< K > xs
Definition: IntMap.h:62
void push(void)
Definition: Vec.h:74
IntMap< K, char, MkIndex > in_set
Definition: IntMap.h:61

+ Here is the caller graph for this function:

template<class K, class MkIndex = MkIndexDefault<K>>
K Minisat::IntSet< K, MkIndex >::operator[] ( int  index) const
inline

Definition at line 81 of file IntMap.h.

81 { return xs[index]; }
vec< K > xs
Definition: IntMap.h:62
template<class K, class MkIndex = MkIndexDefault<K>>
int Minisat::IntSet< K, MkIndex >::size ( void  ) const
inline

Definition at line 66 of file IntMap.h.

66 { return xs.size(); }
vec< K > xs
Definition: IntMap.h:62
Size size(void) const
Definition: Vec.h:64

+ Here is the caller graph for this function:

template<class K, class MkIndex = MkIndexDefault<K>>
const vec<K>& Minisat::IntSet< K, MkIndex >::toVec ( ) const
inline

Definition at line 78 of file IntMap.h.

78 { return xs; }
vec< K > xs
Definition: IntMap.h:62

Field Documentation

template<class K, class MkIndex = MkIndexDefault<K>>
IntMap<K, char, MkIndex> Minisat::IntSet< K, MkIndex >::in_set
private

Definition at line 61 of file IntMap.h.

template<class K, class MkIndex = MkIndexDefault<K>>
vec<K> Minisat::IntSet< K, MkIndex >::xs
private

Definition at line 62 of file IntMap.h.


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