Class template flat_set

| Home | Libraries | People | FAQ | More

## Class template flat_set

boost::compute::flat_set

## Synopsis

    // In header: <boost/compute/container/flat_set.hpp>

    template<typename T>
    class flat_set {
    public:
      // types
      typedef T                                   key_type;
      typedef vector< T >::value_type             value_type;
      typedef vector< T >::size_type              size_type;
      typedef vector< T >::difference_type        difference_type;
      typedef vector< T >::reference              reference;
      typedef vector< T >::const_reference        const_reference;
      typedef vector< T >::pointer                pointer;
      typedef vector< T >::const_pointer          const_pointer;
      typedef vector< T >::iterator               iterator;
      typedef vector< T >::const_iterator         const_iterator;
      typedef vector< T >::reverse_iterator       reverse_iterator;
      typedef vector< T >::const_reverse_iterator const_reverse_iterator;

      // construct/copy/destruct
      explicit flat_set(const context & = system::default_context());
      flat_set(const flat_set< T > &);
      flat_set< T > & operator=(const flat_set< T > &);
      ~flat_set();

      // public member functions
      iterator begin();
      const_iterator begin() const;
      const_iterator cbegin() const;
      iterator end();
      const_iterator end() const;
      const_iterator cend() const;
      reverse_iterator rbegin();
      const_reverse_iterator rbegin() const;
      const_reverse_iterator crbegin() const;
      reverse_iterator rend();
      const_reverse_iterator rend() const;
      const_reverse_iterator crend() const;
      size_type size() const;
      size_type max_size() const;
      bool empty() const;
      size_type capacity() const;
      void reserve(size_type, command_queue &);
      void reserve(size_type);
      void shrink_to_fit();
      void clear();
      std::pair< iterator, bool > insert(const value_type &, command_queue &);
      std::pair< iterator, bool > insert(const value_type &);
      iterator erase(const const_iterator &, command_queue &);
      iterator erase(const const_iterator &);
      iterator erase(const const_iterator &, const const_iterator &,
                     command_queue &);
      iterator erase(const const_iterator &, const const_iterator &);
      size_type erase(const key_type &, command_queue &);
      size_type erase(const key_type &);
      iterator find(const key_type &, command_queue &);
      iterator find(const key_type &);
      const_iterator find(const key_type &, command_queue &) const;
      const_iterator find(const key_type &) const;
      size_type count(const key_type &, command_queue &) const;
      size_type count(const key_type &) const;
      iterator lower_bound(const key_type &, command_queue &);
      iterator lower_bound(const key_type &);
      const_iterator lower_bound(const key_type &, command_queue &) const;
      const_iterator lower_bound(const key_type &) const;
      iterator upper_bound(const key_type &, command_queue &);
      iterator upper_bound(const key_type &);
      const_iterator upper_bound(const key_type &, command_queue &) const;
      const_iterator upper_bound(const key_type &) const;
    };

## Description

### `flat_set` public construct/copy/destruct

1.     explicit flat_set(const context & context = system::default_context());

2.     flat_set(const flat_set< T > & other);

3.     flat_set< T > & operator=(const flat_set< T > & other);

4.     ~flat_set();

### `flat_set` public member functions

1.     iterator begin();

2.     const_iterator begin() const;

3.     const_iterator cbegin() const;

4.     iterator end();

5.     const_iterator end() const;

6.     const_iterator cend() const;

7.     reverse_iterator rbegin();

8.     const_reverse_iterator rbegin() const;

9.     const_reverse_iterator crbegin() const;

10.     reverse_iterator rend();

11.     const_reverse_iterator rend() const;

12.     const_reverse_iterator crend() const;

13.     size_type size() const;

14.     size_type max_size() const;

15.     bool empty() const;

16.     size_type capacity() const;

17.     void reserve(size_type size, command_queue & queue);

18.     void reserve(size_type size);

19.     void shrink_to_fit();

20.     void clear();

21.     std::pair< iterator, bool >
        insert(const value_type & value, command_queue & queue);

22.     std::pair< iterator, bool > insert(const value_type & value);

23.     iterator erase(const const_iterator & position, command_queue & queue);

24.     iterator erase(const const_iterator & position);

25.     iterator erase(const const_iterator & first, const const_iterator & last,
                       command_queue & queue);

26.     iterator erase(const const_iterator & first, const const_iterator & last);

27.     size_type erase(const key_type & value, command_queue & queue);

28.     size_type erase(const key_type & value);

29.     iterator find(const key_type & value, command_queue & queue);

30.     iterator find(const key_type & value);

31.     const_iterator find(const key_type & value, command_queue & queue) const;

32.     const_iterator find(const key_type & value) const;

33.     size_type count(const key_type & value, command_queue & queue) const;

34.     size_type count(const key_type & value) const;

35.     iterator lower_bound(const key_type & value, command_queue & queue);

36.     iterator lower_bound(const key_type & value);

37.     const_iterator
        lower_bound(const key_type & value, command_queue & queue) const;

38.     const_iterator lower_bound(const key_type & value) const;

39.     iterator upper_bound(const key_type & value, command_queue & queue);

40.     iterator upper_bound(const key_type & value);

41.     const_iterator
        upper_bound(const key_type & value, command_queue & queue) const;

42.     const_iterator upper_bound(const key_type & value) const;