| 
    Vaucanson
    1.4.1
    
   | 
 
Dynamic bitset class. More...
Public Member Functions | |
| Bitset (size_type max) | |
| Default constructor.   | |
| Bitset (size_type max, const data_type *data) | |
| Constructor with user-provided bit field.  | |
| Bitset (const Bitset &bs) | |
| Copy constructor.  | |
| template<class InputIterator > | |
| Bitset (InputIterator first, InputIterator last) | |
| Constructor from Input Iterators.  | |
| ~Bitset () | |
| Standard destructor.  | |
| Bitset & | operator= (const Bitset &rhs) | 
| Affectation.  | |
| void | swap (Bitset &other) | 
| Swap with another Bitset.  | |
| void | clear () | 
| Clear the set.  | |
| iterator | find (const key_type &x) const | 
| Find an element in the set.  | |
| size_type | count (const key_type &x) const | 
| Used for compatibility with std::set. Returns 0 or 1.  | |
| bool | operator[] (const key_type &x) const | 
| Returns the xth bit.  | |
| Bitset | project (const Bitset &b) const | 
| Project the set onto another bitset. The result is space-optimized.  | |
| Bitset | unproject (const Bitset &b) const | 
| Inverse function of project.   | |
| unsigned | to_unsigned () const | 
| Reinterpret bits as unsigned int.  | |
| template<typename Type > | |
| const Type | cast () const | 
| Reinterpret bits as another type.  | |
| std::ostream & | print (std::ostream &ostr) const | 
| Print the set.  | |
| iterator | begin () | 
| Iterators.   | |
| const_iterator | begin () const | 
| Iterators.   | |
| iterator | end () | 
| Iterators.   | |
| const_iterator | end () const | 
| Iterators.   | |
| reverse_iterator | rbegin () | 
| Reverse iterators.   | |
| const_reverse_iterator | rbegin () const | 
| Reverse iterators.   | |
| reverse_iterator | rend () | 
| Reverse iterators.   | |
| const_reverse_iterator | rend () const | 
| Reverse iterators.   | |
| std::pair< iterator, bool > | insert (const value_type &x) | 
| Insert an element into the set.   | |
| iterator | insert (iterator position, const value_type &x) | 
| Insert an element into the set.   | |
| template<class InputIterator > | |
| void | insert (InputIterator first, InputIterator last) | 
| Insert an element into the set.   | |
| void | erase (iterator position) | 
| Erase an element from the set.   | |
| size_type | erase (const key_type &x) | 
| Erase an element from the set.   | |
| void | erase (iterator first, iterator last) | 
| Erase an element from the set.   | |
Protected Member Functions | |
| bool | get_bit (size_type index, size_type bit) const | 
| Get a bit inside data_.  | |
| size_type | compute_size () const | 
| Recalculate the set's size when invalid.  | |
| bool | get_bit (const bit_iterator &it) const | 
| Get a bit inside data_ given an iterator.  | |
| template<class BitAction > | |
| bool | do_on_bit (BitAction &action, const key_type &x) | 
| Perform an action onto the bit corresponding to an element.   | |
| template<class BitAction > | |
| bool | do_on_bit (BitAction &action, const bit_iterator &it) | 
| Perform an action onto the bit corresponding to an element.   | |
| template<class ConstBitAction > | |
| bool | do_on_bit (ConstBitAction &action, const key_type &x) const | 
| Perform an action onto the bit corresponding to an element, const.   | |
| template<class ConstBitAction > | |
| bool | do_on_bit (ConstBitAction &action, const bit_iterator &it) const | 
| Perform an action onto the bit corresponding to an element, const.   | |
Static Protected Member Functions | |
| static size_type | get_data_size (size_type max) | 
| Calculates the number of data_type needed for the set.  | |
| static size_type | get_index (const key_type &x) | 
| Get the index of x in the data_ attribute.  | |
| static size_type | get_bitnum (const key_type &x) | 
| Get the bit number of x inside the data_[i] attribute.  | |
Dynamic bitset class.
This is a dynamic bitset implementation which behave almost like a std::set<int>.
      
  | 
  inline | 
Default constructor.
| max | The highest integer which could be inserted into the set. | 
Definition at line 43 of file bitset.hxx.
      
  | 
  inline | 
      
  | 
  inline | 
Iterators.
Definition at line 137 of file bitset.hxx.
      
  | 
  inline | 
Iterators.
Definition at line 145 of file bitset.hxx.
Referenced by Bitset::insert(), and Bitset::rbegin().
      
  | 
  inline | 
Iterators.
Definition at line 152 of file bitset.hxx.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Insert an element into the set.
Definition at line 225 of file bitset.hxx.
References Bitset::end(), Bitset::get_bit(), Bitset::get_bitnum(), and Bitset::get_index().
Referenced by Bitset::Bitset(), vcsn::confirm_and_report_match(), Bitset::insert(), and Bitset::project().
      
  | 
  inline | 
Insert an element into the set.
Definition at line 245 of file bitset.hxx.
References Bitset::insert().
| void insert | ( | InputIterator | first, | 
| InputIterator | last | ||
| ) | 
Insert an element into the set.
Definition at line 252 of file bitset.hxx.
References Bitset::insert().
      
  | 
  inline | 
Erase an element from the set.
Definition at line 267 of file bitset.hxx.
Referenced by Bitset::erase().
      
  | 
  inline | 
Erase an element from the set.
Definition at line 276 of file bitset.hxx.
References Bitset::get_bit(), Bitset::get_bitnum(), and Bitset::get_index().
      
  | 
  inline | 
Erase an element from the set.
Definition at line 296 of file bitset.hxx.
References Bitset::erase().
Inverse function of project.
S.project (T).unproject (T) == S cap T
Definition at line 558 of file bitset.hxx.
References Bitset::do_on_bit(), and Bitset::get_bit().
      
  | 
  protected | 
Perform an action onto the bit corresponding to an element.
Definition at line 796 of file bitset.hxx.
References Bitset::get_bit(), Bitset::get_bitnum(), and Bitset::get_index().
Referenced by Bitset::compute_size(), Bitset::project(), and Bitset::unproject().
      
  | 
  protected | 
Perform an action onto the bit corresponding to an element.
Definition at line 808 of file bitset.hxx.
References Bitset::get_bit().
      
  | 
  protected | 
Perform an action onto the bit corresponding to an element, const.
Definition at line 816 of file bitset.hxx.
References Bitset::get_bit(), Bitset::get_bitnum(), and Bitset::get_index().
      
  | 
  protected | 
Perform an action onto the bit corresponding to an element, const.
Definition at line 828 of file bitset.hxx.
References Bitset::get_bit().
 1.8.1.1