Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Class template unordered_multiset

Boost , The Boost C++ Libraries BoostBook Documentation Subset , Reference

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Class template unordered_multiset

boost::unordered_multiset — An unordered associative container that stores values. The same key can be stored multiple times.

Synopsis

// In header: <boost/unordered_set.hpp>
template<typename Value, typename Hash = boost::hash<Value>, 
         typename Pred = std::equal_to<Value>, 
         typename Alloc = std::allocator<Value> > 
class unordered_multiset {
public:
  // types
  typedef Value                                  key_type;            
  typedef Value                                  value_type;          
  typedef Hash                                   hasher;              
  typedef Pred                                   key_equal;           
  typedef Alloc                                  allocator_type;      
  typedef typename allocator_type::pointer       pointer;             
  typedef typename allocator_type::const_pointer const_pointer;       
  typedef value_type&                            reference;             // lvalue of value_type.
  typedef value_type const&                      const_reference;       // const lvalue of value_type.
  typedef implementation-defined                 size_type;           
  typedef implementation-defined                 difference_type;     
  typedef implementation-defined                 iterator;            
  typedef implementation-defined                 const_iterator;      
  typedef implementation-defined                 local_iterator;      
  typedef implementation-defined                 const_local_iterator;
  // construct/copy/destruct
  explicit unordered_multiset(size_type = implementation-defined, 
                              hasher const& = hasher(), 
                              key_equal const& = key_equal(), 
                              allocator_type const& = allocator_type());
  template<typename InputIterator> 
    unordered_multiset(InputIterator, InputIterator, 
                       size_type = implementation-defined, 
                       hasher const& = hasher(), 
                       key_equal const& = key_equal(), 
                       allocator_type const& = allocator_type());
  unordered_multiset(unordered_multiset const&);
  unordered_multiset(unordered_multiset &&);
  explicit unordered_multiset(Allocator const&);
  unordered_multiset(unordered_multiset const&, Allocator const&);
  ~unordered_multiset();
  unordered_multiset& operator=(unordered_multiset const&);
  unordered_multiset& operator=(unordered_multiset &&);
  allocator_type get_allocator() const;
  // size and capacity
  bool empty() const;
  size_type size() const;
  size_type max_size() const;
  // iterators
  iterator begin();
  const_iterator begin() const;
  iterator end();
  const_iterator end() const;
  const_iterator cbegin() const;
  const_iterator cend() const;
  // modifiers
  template<typename... Args> iterator emplace(Args&&...);
  template<typename... Args> iterator emplace_hint(const_iterator, Args&&...);
  iterator insert(value_type const&);
  iterator insert(value_type&&);
  iterator insert(const_iterator, value_type const&);
  iterator insert(const_iterator, value_type&&);
  template<typename InputIterator> void insert(InputIterator, InputIterator);
  iterator erase(const_iterator);
  size_type erase(key_type const&);
  iterator erase(const_iterator, const_iterator);
  void quick_erase(const_iterator);
  void erase_return_void(const_iterator);
  void clear();
  void swap(unordered_multiset&);
  // observers
  hasher hash_function() const;
  key_equal key_eq() const;
  // lookup
  iterator find(key_type const&);
  const_iterator find(key_type const&) const;
  template<typename CompatibleKey, typename CompatibleHash, 
           typename CompatiblePredicate> 
    iterator find(CompatibleKey const&, CompatibleHash const&, 
                  CompatiblePredicate const&);
  template<typename CompatibleKey, typename CompatibleHash, 
           typename CompatiblePredicate> 
    const_iterator 
    find(CompatibleKey const&, CompatibleHash const&, 
         CompatiblePredicate const&) const;
  size_type count(key_type const&) const;
  std::pair<iterator, iterator> equal_range(key_type const&);
  std::pair<const_iterator, const_iterator> equal_range(key_type const&) const;
  // bucket interface
  size_type bucket_count() const;
  size_type max_bucket_count() const;
  size_type bucket_size(size_type) const;
  size_type bucket(key_type const&) const;
  local_iterator begin(size_type);
  const_local_iterator begin(size_type) const;
  local_iterator end(size_type);
  const_local_iterator end(size_type) const;
  const_local_iterator cbegin(size_type) const;
  const_local_iterator cend(size_type);
  // hash policy
  float load_factor() const;
  float max_load_factor() const;
  void max_load_factor(float);
  void rehash(size_type);
  void reserve(size_type);
};
// Equality Comparisons
template<typename Value, typename Hash, typename Pred, typename Alloc> 
  bool operator==(unordered_multiset<Value, Hash, Pred, Alloc> const&, 
                  unordered_multiset<Value, Hash, Pred, Alloc> const&);
template<typename Value, typename Hash, typename Pred, typename Alloc> 
  bool operator!=(unordered_multiset<Value, Hash, Pred, Alloc> const&, 
                  unordered_multiset<Value, Hash, Pred, Alloc> const&);
// swap
template<typename Value, typename Hash, typename Pred, typename Alloc> 
  void swap(unordered_multiset<Value, Hash, Pred, Alloc>&, 
            unordered_multiset<Value, Hash, Pred, Alloc>&);

Description

Параметры шаблонов

Ценность <Value>должно быть<Erasable>из контейнера (т.е.<allocator_traits>может<destroy>).
Хэш Тип объекта унарной функции, который выполняет хеш-функцию для<Value>. Он принимает один аргумент типа<Value>и возвращает значение типа std::size_t.
Пред Объект двоичной функции, реализующий отношение эквивалентности по значениям типа<Value>. Объект двоичной функции, индуцирующий отношение эквивалентности на значениях типа<Value>. Он принимает два аргумента типа<Value>и возвращает значение типа bool.
Аллок Распределитель, тип значения которого совпадает с типом значения контейнера.

Элементы организованы в ведра. Ключи с одинаковым хеш-кодом хранятся в одном ведре, а элементы с эквивалентными ключами хранятся рядом друг с другом.

Количество ведер может быть автоматически увеличено путем вызова на вставку или в результате вызова рехэша.

unordered_multiset public types

  1. typedeftypenameallocator_type::pointerpointer;

    <value_type*>, если<allocator_type::pointer>не определен.

  2. typedeftypenameallocator_type::const_pointerconst_pointer;

    <boost::pointer_to_other<pointer, value_type>::type>, если<allocator_type::const_pointer>не определено.

  3. typedefреализация-определенразмер_тип;

    Неподписанный интегральный тип.

    размер_тип может представлять любое неотрицательное значение разности_типа.

  4. typedefреализация-определенdifference_type;

    Подписанный интегральный тип.

    Идентичен разностному типу итератора и const_iterator.

  5. typedefреализация-определенитератор;

    постоянный итератор, значением которого является значение_тип.

    Категория итератора является, по крайней мере, передним итератором.

    Конвертируемый в const_iterator.

  6. typedefреализация-определенconst_iterator;

    Постоянный итератор, значением которого является значение_type.

    Категория итератора является, по крайней мере, передним итератором.

  7. typedefреализация-определенлокальный_iterator;

    Итератор с тем же типом значения, типом разности и указателем и эталонным типом, что и итератор.

    Для итерации через одно ведро может использоваться локальный_итератор.

  8. typedefреализация-определенconst_local_iterator;

    Постоянный итератор с тем же типом значений, разностным типом и указателем и эталонным типом, что и const_iterator.

    Объект const_local_iterator может использоваться для итерации через одно ведро.

unordered_multiset public construct/copy/destruct

  1. Требуется:

    Требуется:

    Требуется:

If the defaults are used, hasher, key_equal and allocator_type need to be DefaultConstructible.

[ORIG_END] -->
  • template<typename InputIterator> 
      unordered_multiset(InputIterator f, InputIterator l, 
                         size_type n = implementation-defined, 
                         hasher const& hf = hasher(), 
                         key_equal const& eq = key_equal(), 
                         allocator_type const& a = allocator_type());

    Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.

    Требуется:

    If the defaults are used, hasher, key_equal and allocator_type need to be DefaultConstructible.

  • unordered_multiset(unordered_multiset const&);

    The copy constructor. Copies the contained elements, hash function, predicate, maximum load factor and allocator.

    If Allocator::select_on_container_copy_construction exists and has the right signature, the allocator will be constructed from its result.

    Требуется:

    <value_type>является копируемым

  • unordered_multiset(unordered_multiset &&);

    The move constructor.

    Примечания:

    This is implemented using Boost.Move.

    Требуется:

    value_type is move constructible.

    On compilers without rvalue reference support the emulation does not support moving without calling boost::move if value_type is not copyable. So, for example, you can't return the container from a function.

  • <
    explicitunordered_multiset(Allocatorconst&a);
    >

    Конструирует пустой контейнер, используя распределитель<a>

    .
  • <
    unordered_multiset(unordered_multisetconst&x,Allocatorconst&a);
    >

    Конструирует контейнер, копируя<x>элементы, хеш-функцию, предикат, максимальный коэффициент нагрузки, но используя распределитель<a>

    .
  • [

    <3

    Примечания:

    The destructor is applied to every element, and all memory is deallocated

    [ORIG_END] -->
  • unordered_multiset& operator=(unordered_multiset const&);

    Оператор назначения. Копии содержат элементы, хеш-функцию, предикат и максимальный коэффициент нагрузки, но не распределитель.

    Если<Alloc::propagate_on_container_copy_assignment>существует и<Alloc::propagate_on_container_copy_assignment::value >истинно, то распределитель перезаписывается, если не скопированные элементы создаются с помощью существующего распределителя.

    Требуется:

    <value_type>является копируемым

    unordered_multiset& operator=(unordered_multiset &&);

    Оператор переезда.

    Если<Alloc::propagate_on_container_move_assignment>существует и<Alloc::propagate_on_container_move_assignment::value >истинно, то распределитель перезаписывается, если не движущиеся элементы создаются с помощью существующего распределителя.

    Примечания:

    На компиляторах без ссылок на значение r это эмулируется с помощью Boost. Пошли. Обратите внимание, что на некоторых компиляторах оператор присвоения копий может использоваться в некоторых обстоятельствах.

    Требуется:

    <value_type>является подвижным.

    allocator_type get_allocator() const;

    unordered_multiset size and capacity

    1. <
      boolempty()const;
      >
      <size() == 0>

      Возвращение:

    2. <
      size_typesize()const;
      >

      Возвращение:

      <std::distance(begin(),end())>
    3. <
      size_typemax_size()const;
      >

      Возврат:

      <size()>самого большого контейнера.

    unordered_multiset iterators

    1. <
      iteratorbegin();
      const_iteratorbegin()const;
      >

      Возвращение:

      Итератор, относящийся к первому элементу контейнера, или если контейнер опорожняет значение прошедшего конца для контейнера.
    2. <
      iteratorend();
      const_iteratorend()const;
      >

      Возвращение:

      Итератор, который относится к последнему значению для контейнера.
    3. <
      const_iteratorcbegin()const;
      >

      Возврат:

      Постоянный итератор, относящийся к первому элементу контейнера, или если контейнер опорожняет значение «прошлый конец» для контейнера.
    4. <
      const_iteratorcend()const;
      >

      Возвращение:

      Постоянный итератор, который относится к последнему значению для контейнера.

    unordered_multiset modifiers

    1. template<typename... Args> iterator emplace(Args&&... args);

      Inserts an object, constructed with the arguments args, in the container.

      Требуется:

      value_type is EmplaceConstructible into X from args.

      Returns:

      An iterator pointing to the inserted element.

      Throws:

      If an exception is thrown by an operation other than a call to hasher the function has no effect.

      Примечания:

      Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

      Pointers and references to elements are never invalidated.

      If the compiler doesn't support variadic template arguments or rvalue references, this is emulated for up to 10 arguments, with no support for rvalue references or move semantics.

      Since existing std::pair implementations don't support std::piecewise_construct this emulates it, but using boost::unordered::piecewise_construct.

    2. template<typename... Args> 
        iterator emplace_hint(const_iterator hint, Args&&... args);

      Inserts an object, constructed with the arguments args, in the container.

      hint is a suggestion to where the element should be inserted.

      Требуется:

      value_type is EmplaceConstructible into X from args.

      Returns:

      An iterator pointing to the inserted element.

      Throws:

      If an exception is thrown by an operation other than a call to hasher the function has no effect.

      Примечания:

      The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value.

      Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

      Pointers and references to elements are never invalidated.

      If the compiler doesn't support variadic template arguments or rvalue references, this is emulated for up to 10 arguments, with no support for rvalue references or move semantics.

      Since existing std::pair implementations don't support std::piecewise_construct this emulates it, but using boost::unordered::piecewise_construct.

    3. iterator insert(value_type const& obj);

      Inserts obj in the container.

      Требуется:

      value_type is CopyInsertable.

      Returns:

      An iterator pointing to the inserted element.

      Throws:

      If an exception is thrown by an operation other than a call to hasher the function has no effect.

      Примечания:

      Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

      Pointers and references to elements are never invalidated.

    4. <
      iteratorinsert(value_type&&obj);
      >

      Вставить<obj>в контейнер.

      Требуется:

      value_type is MoveInsertable.

      Returns:

      An iterator pointing to the inserted element.

      Throws:

      If an exception is thrown by an operation other than a call to hasher the function has no effect.

      Примечания:

      Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

      Pointers and references to elements are never invalidated.

      [ORIG_END] -->
    5. <
      iteratorinsert(const_iteratorhint,value_typeconst&obj);
      >

      Вставляется<obj>в контейнер.

      подсказка - это предложение о том, где элемент должен быть вставлен.

      Требуется:

      [!-- [ORIG_BEGIN]

      Требуется:

      Требуется:

      value_type is CopyInsertable.

      Returns:

      An iterator pointing to the inserted element.

      Throws:

      If an exception is thrown by an operation other than a call to hasher the function has no effect.

      Примечания:

      The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value.

      Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

      Pointers and references to elements are never invalidated.

      [ORIG_END] -->
    6. iterator insert(const_iterator hint, value_type&& obj);

      Inserts obj in the container.

      hint is a suggestion to where the element should be inserted.

      Требуется:

      value_type is MoveInsertable.

      Returns:

      An iterator pointing to the inserted element.

      Throws:

      If an exception is thrown by an operation other than a call to hasher the function has no effect.

      Примечания:

      The standard is fairly vague on the meaning of the hint. But the only practical way to use it, and the only way that Boost.Unordered supports is to point to an existing element with the same value.

      Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

      Pointers and references to elements are never invalidated.

    7. <
      template<typenameInputIterator>
       voidinsert(InputIteratorfirst,InputIteratorlast);
      >

      В контейнер вставляется ряд элементов. Элементы вставляются тогда и только тогда, когда в контейнере нет элемента с эквивалентным значением.

      Требуется:

      value_type is EmplaceConstructible into X from *first.

      Throws:

      When inserting a single element, if an exception is thrown by an operation other than a call to hasher the function has no effect.

      Примечания:

      Can invalidate iterators, but only if the insert causes the load factor to be greater to or equal to the maximum load factor.

      Pointers and references to elements are never invalidated.

      [ORIG_END] -->
    8. <
      iteratorerase(const_iteratorposition);
      >

      Удалите элемент, на который указывает<position>.

      Возврат:

      Итератор, следующий за<position>до стирания.

      Бросает:

      Только бросает исключение, если оно брошено<hasher>или<key_equal>.

      [<3

      Примечания:

      In older versions this could be inefficient because it had to search through several buckets to find the position of the returned iterator. The data structure has been changed so that this is no longer the case, and the alternative erase methods have been deprecated.

      [ORIG_END] -->
    9. <
      size_typeerase(key_typeconst&k);
      >

      Удалите все элементы с ключом, эквивалентным<k>.

      Возврат:

      Количество элементов стерто.

      Броски:

      Только бросает исключение, если оно брошено<hasher>или<key_equal>.

    10. <
      iteratorerase(const_iteratorfirst,const_iteratorlast);
      >

      Стирает элементы в диапазоне от<first>до<last>.

      Возврат:

      Итератор, следующий за стертыми элементами — то есть<last>

      Броски:

      Только бросает исключение, если оно брошено<hasher>или<key_equal>.

      В этой реализации эта перегрузка не вызывает ни одного из методов объекта функции, поэтому это не бросок, но это может быть не так в других реализациях.

    11. <
      voidquick_erase(const_iteratorposition);
      >

      Удалите элемент, на который указывает<position>.

      Бросок:

      Исключение делается только в том случае, если его бросает<hasher>или<key_equal>

      . В этой реализации эта перегрузка не вызывает ни одного из методов объекта функции, поэтому это не бросок, но это может быть не так в других реализациях.

      <3

      Примечания:

      This method was implemented because returning an iterator to the next element from erase was expensive, but the container has been redesigned so that is no longer the case. So this method is now deprecated.

      [ORIG_END] -->
    12. void erase_return_void(const_iterator position);

      Erase the element pointed to by position.

      Throws:

      Only throws an exception if it is thrown by hasher or key_equal.

      In this implementation, this overload doesn't call either function object's methods so it is no throw, but this might not be true in other implementations.

      Примечания:

      This method was implemented because returning an iterator to the next element from erase was expensive, but the container has been redesigned so that is no longer the case. So this method is now deprecated.

    13. <
      voidclear();
      >

      Стирает все элементы в контейнере.

      Пост-условия:

      <size() == 0>

      Броски:

      Никогда не делайте исключений.

    14. <
      voidswap(unordered_multiset&);
      >

      Обменяет содержимое контейнера параметром.

      Если<Allocator::propagate_on_container_swap>объявлено и<Allocator::propagate_on_container_swap::value>истинно, то распределители контейнеров меняются. В противном случае обмен неравными распределителями приводит к неопределенному поведению.

      Броски:

      Не выбрасывает исключение, если оно не брошено конструктором копии или оператором присвоения копии<key_equal>или<hasher>.

      <3

      Примечания:

      The exception specifications aren't quite the same as the C++11 standard, as the equality predieate and hash function are swapped using their copy constructors.

      [ORIG_END] -->

    unordered_multiset observers

    1. <
      hasherhash_function()const;
      >

      Возвращение:

      Функция хеширования контейнера.
    2. <
      key_equalkey_eq()const;
      >

      Возвращение:

      Ключевой предикат равенства контейнера.

    unordered_multiset lookup

    1. <
      iteratorfind(key_typeconst&k);
      const_iteratorfind(key_typeconst&k)const;
      template<typenameCompatibleKey,typenameCompatibleHash,
              typenameCompatiblePredicate>
       iteratorfind(CompatibleKeyconst&k,CompatibleHashconst&hash,
                     CompatiblePredicateconst&eq);
      template<typenameCompatibleKey,typenameCompatibleHash,
              typenameCompatiblePredicate>
       const_iterator
       find(CompatibleKeyconst&k,CompatibleHashconst&hash,
            CompatiblePredicateconst&eq)const;
      >

      Возвращение:

      Итератор, указывающий на элемент с ключом, эквивалентным<k>, или<b.end()>, если такой элемент не существует.

      [<3

      Примечания:

      The templated overloads are a non-standard extensions which allows you to use a compatible hash function and equality predicate for a key of a different type in order to avoid an expensive type cast. In general, its use is not encouraged.

      [ORIG_END] -->
    2. <
      size_typecount(key_typeconst&k)const;
      >

      Возвращение:

      Число элементов с ключом эквивалентно<k>.

    3. <
      std::pair<iterator,iterator>equal_range(key_typeconst&k);
      std::pair<const_iterator,const_iterator>equal_range(key_typeconst&k)const;
      >

      Возвращение:

      Диапазон, содержащий все элементы с ключом, эквивалентным<k>. Если контейнер не содержит таких элементов, возвращается<std::make_pair(b.end(),b.end())>.

    unordered_multiset bucket interface

    1. <
      size_typebucket_count()const;
      >

      Возвращение:

      Число ведер.

    2. <
      size_typemax_bucket_count()const;
      >

      Возвращение:

      Верхняя граница числа ведер.

    3. Требуется:

      Требуется:

      n < bucket_count()

      Returns:

      The number of elements in bucket n.

    [ORIG_END] -->
  • <
    size_typebucket(key_typeconst&k)const;
    >

    Возвращение:

    Индекс ковша, который содержал бы элемент с ключом<k>.

    Последующие условия:

    Возвратное значение меньше<bucket_count()>

  • local_iterator begin(size_type n);
    const_local_iterator begin(size_type n) const;

    Требуется:

    n shall be in the range [0, bucket_count()).

    Returns:

    A local iterator pointing the first element in the bucket with index n.

  • local_iterator end(size_type n);
    const_local_iterator end(size_type n) const;

    Требуется:

    n shall be in the range [0, bucket_count()).

    Returns:

    A local iterator pointing the 'one past the end' element in the bucket with index n.

  • const_local_iterator cbegin(size_type n) const;

    Требуется:

    n shall be in the range [0, bucket_count()).

    Returns:

    A constant local iterator pointing the first element in the bucket with index n.

  • const_local_iterator cend(size_type n);

    Требуется:

    n shall be in the range [0, bucket_count()).

    Returns:

    A constant local iterator pointing the 'one past the end' element in the bucket with index n.

  • unordered_multiset hash policy

    1. <
      floatload_factor()const;
      >

      Возвращение:

      Среднее число элементов на ведро.

    2. <
      floatmax_load_factor()const;
      >

      Возвращение:

      Возвращает текущий максимальный коэффициент нагрузки.

    3. <
      voidmax_load_factor(floatz);
      >

      Эффекты:

      Изменяет максимальный коэффициент загрузки контейнера, используя<z>в качестве подсказки.

    4. <
      voidrehash(size_typen);
      >

      Изменяет количество ведер так, чтобы было хотя бы<n>ведер, и чтобы коэффициент нагрузки был меньше максимального коэффициента нагрузки.

      Инвалидирует итераторы и изменяет порядок элементов. Указатели и ссылки на элементы не признаются недействительными.

      Броски:

      Функция не имеет эффекта, если забрасывается исключение, если только оно не забрасывается хеш-функцией контейнера или функцией сравнения.

    5. <
      voidreserve(size_typen);
      >

      Инвалидирует итераторы и изменяет порядок элементов. Указатели и ссылки на элементы не признаются недействительными.

      Броски:

      Функция не имеет никакого эффекта, если выбрасывается исключение, если только она не выбрасывается хеш-функцией контейнера или функцией сравнения.

    unordered_multiset Equality Comparisons

    1. .<3

      Примечания:

      The behavior of this function was changed to match the C++11 standard in Boost 1.48.

      Behavior is undefined if the two containers don't have equivalent equality predicates.

    [ORIG_END] -->
  • .<3

    Примечания:

    The behavior of this function was changed to match the C++11 standard in Boost 1.48.

    Behavior is undefined if the two containers don't have equivalent equality predicates.

  • [ORIG_END] -->

    unordered_multiset swap

    1. <3

      Примечания:

      The exception specifications aren't quite the same as the C++11 standard, as the equality predieate and hash function are swapped using their copy constructors.

    [ORIG_END] -->

    PrevUpHomeNext

    Статья Class template unordered_multiset раздела The Boost C++ Libraries BoostBook Documentation Subset Reference может быть полезна для разработчиков на c++ и boost.




    Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



    :: Главная :: Reference ::


    реклама


    ©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
    Top.Mail.Ru

    Время компиляции файла: 2024-08-30 11:47:00
    2025-05-19 22:51:04/0.01297402381897/0