SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
bitcompressed_vector.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
13 #pragma once
14 
15 #include <type_traits>
16 
17 #include <sdsl/int_vector.hpp>
18 
20 #include <seqan3/core/math.hpp>
26 #include <seqan3/std/concepts>
27 #include <seqan3/std/iterator>
28 #include <seqan3/std/ranges>
29 
30 namespace seqan3
31 {
32 
61 template <writable_semialphabet alphabet_type>
63  requires std::regular<alphabet_type>
66 {
67 private:
69  static constexpr size_t bits_per_letter = detail::ceil_log2(alphabet_size<alphabet_type>);
70 
71  static_assert(bits_per_letter <= 64, "alphabet must be representable in at most 64bit.");
72 
74  using data_type = sdsl::int_vector<bits_per_letter>;
75 
77  data_type data;
78 
81  class reference_proxy_type : public alphabet_proxy<reference_proxy_type, alphabet_type>
82  {
83  private:
87  friend base_t;
88 
90  std::ranges::range_reference_t<data_type> internal_proxy;
91 
93  constexpr void on_update() noexcept
94  {
95  internal_proxy = static_cast<base_t &>(*this).to_rank();
96  }
97 
98  public:
99  // Import from base:
100  using base_t::operator=;
101 
105  reference_proxy_type() = delete;
107  constexpr reference_proxy_type(reference_proxy_type const &) noexcept = default;
108  constexpr reference_proxy_type(reference_proxy_type &&) noexcept = default;
109  constexpr reference_proxy_type & operator=(reference_proxy_type const &) noexcept = default;
110  constexpr reference_proxy_type & operator=(reference_proxy_type &&) noexcept = default;
111  ~reference_proxy_type() noexcept = default;
112 
114  reference_proxy_type(std::ranges::range_reference_t<data_type> const & internal) noexcept :
115  internal_proxy{internal}
116  {
117  static_cast<base_t &>(*this).assign_rank(internal);
118  }
120  };
121 
124  //NOTE(h-2): it is entirely unclear to me why we need this
125  template <typename t>
126  requires std::is_same_v<std::ranges::range_value_t<std::remove_cvref_t<t>>, alphabet_type>
127  static constexpr bool has_same_value_type_v = true;
129 
130 public:
134  using value_type = alphabet_type;
137  using reference = reference_proxy_type;
139  using const_reference = alphabet_type;
141  using iterator = detail::random_access_iterator<bitcompressed_vector>;
143  using const_iterator = detail::random_access_iterator<bitcompressed_vector const>;
145  using difference_type = std::ranges::range_difference_t<data_type>;
147  using size_type = std::ranges::range_size_t<data_type>;
149 
151  // this signals to range-v3 that something is a container :|
152  using allocator_type = void;
154 
158  bitcompressed_vector() = default;
159  constexpr bitcompressed_vector(bitcompressed_vector const &) = default;
160  constexpr bitcompressed_vector(bitcompressed_vector &&) = default;
161  constexpr bitcompressed_vector & operator=(bitcompressed_vector const &) = default;
163  ~bitcompressed_vector() = default;
164 
178  template <std::ranges::input_range other_range_t>
180  requires has_same_value_type_v<other_range_t>
182  explicit bitcompressed_vector(other_range_t && range) :
183  bitcompressed_vector{std::ranges::begin(range), std::ranges::end(range)}
184  {}
185 
199  data(count, to_rank(value))
200  {}
201 
217  template <std::forward_iterator begin_iterator_type, typename end_iterator_type>
218  bitcompressed_vector(begin_iterator_type begin_it, end_iterator_type end_it)
220  requires std::sentinel_for<end_iterator_type, begin_iterator_type> &&
221  std::common_reference_with<std::iter_value_t<begin_iterator_type>, value_type>
223  {
224  insert(cend(), begin_it, end_it);
225  }
226 
239  bitcompressed_vector(std::begin(ilist), std::end(ilist))
240  {}
241 
254  {
255  assign(std::begin(ilist), std::end(ilist));
256  return *this;
257  }
258 
272  template <std::ranges::input_range other_range_t>
273  void assign(other_range_t && range)
275  requires std::common_reference_with<std::ranges::range_value_t<other_range_t>, value_type>
277  {
278  bitcompressed_vector rhs{std::forward<other_range_t>(range)};
279  swap(rhs);
280  }
281 
294  void assign(size_type const count, value_type const value)
295  {
296  bitcompressed_vector rhs{count, value};
297  swap(rhs);
298  }
299 
315  template <std::forward_iterator begin_iterator_type, typename end_iterator_type>
316  void assign(begin_iterator_type begin_it, end_iterator_type end_it)
318  requires std::sentinel_for<end_iterator_type, begin_iterator_type> &&
319  std::common_reference_with<std::iter_value_t<begin_iterator_type>, value_type>
321  {
322  bitcompressed_vector rhs{begin_it, end_it};
323  swap(rhs);
324  }
325 
338  {
339  assign(std::begin(ilist), std::end(ilist));
340  }
341 
343 
360  iterator begin() noexcept
361  {
362  return iterator{*this};
363  }
364 
366  const_iterator begin() const noexcept
367  {
368  return const_iterator{*this};
369  }
370 
372  const_iterator cbegin() const noexcept
373  {
374  return const_iterator{*this};
375  }
376 
390  iterator end() noexcept
391  {
392  return iterator{*this, size()};
393  }
394 
396  const_iterator end() const noexcept
397  {
398  return const_iterator{*this, size()};
399  }
400 
402  const_iterator cend() const noexcept
403  {
404  return const_iterator{*this, size()};
405  }
407 
425  {
426  if (i >= size()) // [[unlikely]]
427  {
428  throw std::out_of_range{"Trying to access element behind the last in bitcompressed_vector."};
429  }
430  return (*this)[i];
431  }
432 
434  const_reference at(size_type const i) const
435  {
436  if (i >= size()) // [[unlikely]]
437  {
438  throw std::out_of_range{"Trying to access element behind the last in bitcompressed_vector."};
439  }
440  return (*this)[i];
441  }
442 
458  reference operator[](size_type const i) noexcept
459  {
460  assert(i < size());
461  return data[i];
462  }
463 
465  const_reference operator[](size_type const i) const noexcept
466  {
467  assert(i < size());
468  return assign_rank_to(data[i], const_reference{});
469  }
470 
484  reference front() noexcept
485  {
486  assert(size() > 0);
487  return (*this)[0];
488  }
489 
491  const_reference front() const noexcept
492  {
493  assert(size() > 0);
494  return (*this)[0];
495  }
496 
510  reference back() noexcept
511  {
512  assert(size() > 0);
513  return (*this)[size()-1];
514  }
515 
517  const_reference back() const noexcept
518  {
519  assert(size() > 0);
520  return (*this)[size()-1];
521  }
522 
532  constexpr data_type & raw_data() noexcept
533  {
534  return data;
535  }
536 
538  constexpr data_type const & raw_data() const noexcept
539  {
540  return data;
541  }
543 
558  bool empty() const noexcept
559  {
560  return size() == 0;
561  }
562 
574  size_type size() const noexcept
575  {
576  return data.size();
577  }
578 
593  size_type max_size() const noexcept
594  {
595  return data.max_size();
596  }
597 
613  size_type capacity() const noexcept
614  {
615  return data.capacity();
616  }
617 
636  void reserve(size_type const new_cap)
637  {
638  data.reserve(new_cap);
639  }
640 
657  {
658  data.shrink_to_fit();
659  }
661 
676  void clear() noexcept
677  {
678  data.clear();
679  }
680 
700  {
701  return insert(pos, 1, value);
702  }
703 
724  {
725  auto const pos_as_num = std::distance(cbegin(), pos); // we want to insert BEFORE this position
726 
727  data.insert(data.begin() + pos_as_num, count, to_rank(value));
728 
729  return begin() + pos_as_num;
730  }
731 
756  template <std::forward_iterator begin_iterator_type, typename end_iterator_type>
757  iterator insert(const_iterator pos, begin_iterator_type begin_it, end_iterator_type end_it)
759  requires std::sentinel_for<end_iterator_type, begin_iterator_type> &&
760  std::common_reference_with<std::iter_value_t<begin_iterator_type>, value_type>
762  {
763  auto const pos_as_num = std::distance(cbegin(), pos);
764 
765  auto v = std::ranges::subrange<begin_iterator_type, end_iterator_type>{begin_it, end_it}
766  | views::convert<value_type>
767  | views::to_rank;
768  data.insert(data.begin() + pos_as_num, std::ranges::begin(v), std::ranges::end(v));
769 
770  return begin() + pos_as_num;
771  }
772 
792  {
793  return insert(pos, ilist.begin(), ilist.end());
794  }
795 
816  {
817  if (begin_it >= end_it) // [[unlikely]]
818  return begin() + std::distance(cbegin(), end_it);
819 
820  auto const begin_it_pos = std::distance(cbegin(), begin_it);
821  auto const end_it_pos = std::distance(cbegin(), end_it);
822 
823  data.erase(data.cbegin() + begin_it_pos,
824  data.cbegin() + end_it_pos);
825 
826  return begin() + begin_it_pos;
827  }
828 
849  {
850  return erase(pos, pos + 1);
851  }
852 
868  void push_back(value_type const value)
869  {
870  data.push_back(to_rank(value));
871  }
872 
889  void pop_back()
890  {
891  assert(size() > 0);
892  data.pop_back();
893  }
894 
921  void resize(size_type const count)
922  {
923  assert(count < max_size());
924  data.resize(count);
925  }
926 
931  void resize(size_type const count, value_type const value)
932  {
933  assert(count < max_size());
934  data.resize(count, to_rank(value));
935  }
936 
948  constexpr void swap(bitcompressed_vector & rhs) noexcept
949  {
950  std::swap(data, rhs.data);
951  }
952 
954  constexpr void swap(bitcompressed_vector && rhs) noexcept
955  {
956  std::swap(data, rhs.data);
957  }
958 
971  friend constexpr void swap(bitcompressed_vector & lhs, bitcompressed_vector & rhs) noexcept
972  {
973  std::swap(lhs, rhs);
974  }
975 
977  friend constexpr void swap(bitcompressed_vector && lhs, bitcompressed_vector && rhs) noexcept
978  {
979  std::swap(lhs, rhs);
980  }
982 
987  constexpr bool operator==(bitcompressed_vector const & rhs) const noexcept
989  {
990  return data == rhs.data;
991  }
992 
994  constexpr bool operator!=(bitcompressed_vector const & rhs) const noexcept
995  {
996  return data != rhs.data;
997  }
998 
1000  constexpr bool operator<(bitcompressed_vector const & rhs) const noexcept
1001  {
1002  return data < rhs.data;
1003  }
1004 
1006  constexpr bool operator>(bitcompressed_vector const & rhs) const noexcept
1007  {
1008  return data > rhs.data;
1009  }
1010 
1012  constexpr bool operator<=(bitcompressed_vector const & rhs) const noexcept
1013  {
1014  return data <= rhs.data;
1015  }
1016 
1018  constexpr bool operator>=(bitcompressed_vector const & rhs) const noexcept
1019  {
1020  return data >= rhs.data;
1021  }
1023 
1031  template <cereal_archive archive_t>
1032  void CEREAL_SERIALIZE_FUNCTION_NAME(archive_t & archive)
1033  {
1034  archive(data);
1035  }
1037 };
1038 
1039 } // namespace seqan3
seqan3::bitcompressed_vector::begin
const_iterator begin() const noexcept
Returns an iterator to the first element of the container.
Definition: bitcompressed_vector.hpp:366
seqan3::bitcompressed_vector::front
reference front() noexcept
Return the first element. Calling front on an empty container is undefined.
Definition: bitcompressed_vector.hpp:484
seqan3::bitcompressed_vector::insert
iterator insert(const_iterator pos, size_type const count, value_type const value)
Inserts count copies of value before position in the container.
Definition: bitcompressed_vector.hpp:723
seqan3::bitcompressed_vector::operator[]
reference operator[](size_type const i) noexcept
Return the i-th element.
Definition: bitcompressed_vector.hpp:458
seqan3::bitcompressed_vector::cend
const_iterator cend() const noexcept
Returns an iterator to the element following the last element of the container.
Definition: bitcompressed_vector.hpp:402
seqan3::bitcompressed_vector::operator!=
constexpr bool operator!=(bitcompressed_vector const &rhs) const noexcept
Checks whether *this is not equal to rhs.
Definition: bitcompressed_vector.hpp:994
seqan3::assign_rank_to
constexpr auto assign_rank_to
Assign a rank to an alphabet object.
Definition: concept.hpp:239
seqan3::bitcompressed_vector::swap
constexpr friend void swap(bitcompressed_vector &lhs, bitcompressed_vector &rhs) noexcept
Swap contents with another instance.
Definition: bitcompressed_vector.hpp:971
seqan3::bitcompressed_vector::swap
constexpr void swap(bitcompressed_vector &&rhs) noexcept
Swap contents with another instance.
Definition: bitcompressed_vector.hpp:954
seqan3::bitcompressed_vector::operator[]
const_reference operator[](size_type const i) const noexcept
Return the i-th element.
Definition: bitcompressed_vector.hpp:465
seqan3::bitcompressed_vector::swap
constexpr void swap(bitcompressed_vector &rhs) noexcept
Swap contents with another instance.
Definition: bitcompressed_vector.hpp:948
seqan3::bitcompressed_vector::assign
void assign(other_range_t &&range)
Assign from a different range.
Definition: bitcompressed_vector.hpp:273
seqan3::bitcompressed_vector::operator>
constexpr bool operator>(bitcompressed_vector const &rhs) const noexcept
Checks whether *this is greater than rhs.
Definition: bitcompressed_vector.hpp:1006
seqan3::bitcompressed_vector::pop_back
void pop_back()
Removes the last element of the container.
Definition: bitcompressed_vector.hpp:889
seqan3::bitcompressed_vector::back
reference back() noexcept
Return the last element.
Definition: bitcompressed_vector.hpp:510
iterator
Provides C++20 additions to the <iterator> header.
convert.hpp
Provides seqan3::views::convert.
seqan3::bitcompressed_vector::begin
iterator begin() noexcept
Returns an iterator to the first element of the container.
Definition: bitcompressed_vector.hpp:360
std::distance
T distance(T... args)
seqan3::bitcompressed_vector::operator=
bitcompressed_vector & operator=(std::initializer_list< value_type > ilist)
Assign from std::initializer_list.
Definition: bitcompressed_vector.hpp:253
seqan3::to_rank
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition: concept.hpp:143
seqan3::bitcompressed_vector::insert
iterator insert(const_iterator pos, value_type const value)
Inserts value before position in the container.
Definition: bitcompressed_vector.hpp:699
seqan3::bitcompressed_vector::bitcompressed_vector
bitcompressed_vector(std::initializer_list< value_type > ilist)
Construct from std::initializer_list.
Definition: bitcompressed_vector.hpp:238
seqan3::bitcompressed_vector::erase
iterator erase(const_iterator begin_it, const_iterator end_it)
Removes specified elements from the container.
Definition: bitcompressed_vector.hpp:815
seqan3::bitcompressed_vector::end
const_iterator end() const noexcept
Returns an iterator to the element following the last element of the container.
Definition: bitcompressed_vector.hpp:396
seqan3::bitcompressed_vector::operator<=
constexpr bool operator<=(bitcompressed_vector const &rhs) const noexcept
Checks whether *this is less than or equal to rhs.
Definition: bitcompressed_vector.hpp:1012
concepts
The Concepts library.
seqan3::bitcompressed_vector::const_reference
alphabet_type const_reference
Equals the alphabet_type / value_type.
Definition: bitcompressed_vector.hpp:139
seqan3::bitcompressed_vector::insert
iterator insert(const_iterator pos, std::initializer_list< value_type > const &ilist)
Inserts elements from initializer list before position in the container.
Definition: bitcompressed_vector.hpp:791
seqan3::bitcompressed_vector::operator=
constexpr bitcompressed_vector & operator=(bitcompressed_vector &&)=default
Defaulted.
seqan3::bitcompressed_vector::push_back
void push_back(value_type const value)
Appends the given element value to the end of the container.
Definition: bitcompressed_vector.hpp:868
random_access_iterator.hpp
Provides the seqan3::detail::random_access_iterator class.
seqan3::bitcompressed_vector::end
iterator end() noexcept
Returns an iterator to the element following the last element of the container.
Definition: bitcompressed_vector.hpp:390
seqan3::bitcompressed_vector::raw_data
constexpr data_type & raw_data() noexcept
Provides direct, unsafe access to underlying data structures.
Definition: bitcompressed_vector.hpp:532
seqan3::bitcompressed_vector::reference
reference_proxy_type reference
A proxy type that enables assignment, if the underlying data structure also provides a proxy.
Definition: bitcompressed_vector.hpp:137
seqan3::bitcompressed_vector::bitcompressed_vector
bitcompressed_vector()=default
Defaulted.
alphabet_proxy.hpp
Provides seqan3::alphabet_proxy.
seqan3::bitcompressed_vector::swap
constexpr friend void swap(bitcompressed_vector &&lhs, bitcompressed_vector &&rhs) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: bitcompressed_vector.hpp:977
seqan3::bitcompressed_vector::assign
void assign(begin_iterator_type begin_it, end_iterator_type end_it)
Assign from pair of iterators.
Definition: bitcompressed_vector.hpp:316
seqan3
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
seqan3::bitcompressed_vector::~bitcompressed_vector
~bitcompressed_vector()=default
Defaulted.
seqan3::bitcompressed_vector::assign
void assign(std::initializer_list< value_type > ilist)
Assign from std::initializer_list.
Definition: bitcompressed_vector.hpp:337
seqan3::bitcompressed_vector::shrink_to_fit
void shrink_to_fit()
Requests the removal of unused capacity.
Definition: bitcompressed_vector.hpp:656
seqan3::bitcompressed_vector::resize
void resize(size_type const count)
Resizes the container to contain count elements.
Definition: bitcompressed_vector.hpp:921
seqan3::bitcompressed_vector::bitcompressed_vector
bitcompressed_vector(other_range_t &&range)
Construct from a different range.
Definition: bitcompressed_vector.hpp:182
seqan3::bitcompressed_vector::operator=
constexpr bitcompressed_vector & operator=(bitcompressed_vector const &)=default
Defaulted.
seqan3::bitcompressed_vector::bitcompressed_vector
bitcompressed_vector(begin_iterator_type begin_it, end_iterator_type end_it)
Construct from pair of iterators.
Definition: bitcompressed_vector.hpp:218
seqan3::bitcompressed_vector::operator>=
constexpr bool operator>=(bitcompressed_vector const &rhs) const noexcept
Checks whether *this is greater than or equal to rhs.
Definition: bitcompressed_vector.hpp:1018
seqan3::bitcompressed_vector::bitcompressed_vector
bitcompressed_vector(size_type const count, value_type const value)
Construct with count times value.
Definition: bitcompressed_vector.hpp:198
seqan3::bitcompressed_vector::insert
iterator insert(const_iterator pos, begin_iterator_type begin_it, end_iterator_type end_it)
Inserts elements from range [begin_it, end_it) before position in the container.
Definition: bitcompressed_vector.hpp:757
seqan3::bitcompressed_vector::at
const_reference at(size_type const i) const
Return the i-th element.
Definition: bitcompressed_vector.hpp:434
std::swap
T swap(T... args)
to_char.hpp
Provides seqan3::views::to_char.
ranges
Adaptations of concepts from the Ranges TS.
seqan3::bitcompressed_vector::operator<
constexpr bool operator<(bitcompressed_vector const &rhs) const noexcept
Checks whether *this is less than rhs.
Definition: bitcompressed_vector.hpp:1000
seqan3::bitcompressed_vector::capacity
size_type capacity() const noexcept
Returns the number of elements that the container has currently allocated space for.
Definition: bitcompressed_vector.hpp:613
seqan3::bitcompressed_vector::back
const_reference back() const noexcept
Return the last element.
Definition: bitcompressed_vector.hpp:517
seqan3::bitcompressed_vector::reserve
void reserve(size_type const new_cap)
Increase the capacity to a value that's greater or equal to new_cap.
Definition: bitcompressed_vector.hpp:636
seqan3::bitcompressed_vector::assign
void assign(size_type const count, value_type const value)
Assign with count times value.
Definition: bitcompressed_vector.hpp:294
std::begin
T begin(T... args)
seqan3::bitcompressed_vector::empty
bool empty() const noexcept
Checks whether the container is empty.
Definition: bitcompressed_vector.hpp:558
std
SeqAn specific customisations in the standard namespace.
seqan3::bitcompressed_vector::operator==
constexpr bool operator==(bitcompressed_vector const &rhs) const noexcept
Checks whether *this is equal to rhs.
Definition: bitcompressed_vector.hpp:988
seqan3::alphabet_proxy::to_rank
constexpr auto to_rank() const noexcept
Returns the rank.
Definition: alphabet_proxy.hpp:219
std::out_of_range
cereal.hpp
Adaptions of concepts from the Cereal library.
seqan3::bitcompressed_vector::iterator
detail::random_access_iterator< bitcompressed_vector > iterator
The iterator type of this container (a random access iterator).
Definition: bitcompressed_vector.hpp:141
std::end
T end(T... args)
seqan3::bitcompressed_vector::const_iterator
detail::random_access_iterator< bitcompressed_vector const > const_iterator
The const_iterator type of this container (a random access iterator).
Definition: bitcompressed_vector.hpp:143
seqan3::bitcompressed_vector
A space-optimised version of std::vector that compresses multiple letters into a single byte.
Definition: bitcompressed_vector.hpp:66
seqan3::bitcompressed_vector::size
size_type size() const noexcept
Returns the number of elements in the container, i.e. std::distance(begin(), end()).
Definition: bitcompressed_vector.hpp:574
seqan3::bitcompressed_vector::difference_type
std::ranges::range_difference_t< data_type > difference_type
A signed integer type (usually std::ptrdiff_t)
Definition: bitcompressed_vector.hpp:145
seqan3::bitcompressed_vector::resize
void resize(size_type const count, value_type const value)
Resizes the container to contain count elements.
Definition: bitcompressed_vector.hpp:931
math.hpp
Provides math related functionality.
seqan3::bitcompressed_vector::raw_data
constexpr data_type const & raw_data() const noexcept
Provides direct, unsafe access to underlying data structures.
Definition: bitcompressed_vector.hpp:538
seqan3::bitcompressed_vector::max_size
size_type max_size() const noexcept
Returns the maximum number of elements the container is able to hold due to system or library impleme...
Definition: bitcompressed_vector.hpp:593
seqan3::bitcompressed_vector::clear
void clear() noexcept
Removes all elements from the container.
Definition: bitcompressed_vector.hpp:676
writable_alphabet
Refines seqan3::alphabet and adds assignability.
seqan3::bitcompressed_vector::bitcompressed_vector
constexpr bitcompressed_vector(bitcompressed_vector const &)=default
Defaulted.
seqan3::bitcompressed_vector::at
reference at(size_type const i)
Return the i-th element.
Definition: bitcompressed_vector.hpp:424
seqan3::bitcompressed_vector::size_type
std::ranges::range_size_t< data_type > size_type
An unsigned integer type (usually std::size_t)
Definition: bitcompressed_vector.hpp:147
seqan3::bitcompressed_vector::bitcompressed_vector
constexpr bitcompressed_vector(bitcompressed_vector &&)=default
Defaulted.
seqan3::pack_traits::count
constexpr ptrdiff_t count
Count the occurrences of a type in a pack.
Definition: traits.hpp:134
seqan3::bitcompressed_vector::value_type
alphabet_type value_type
Equals the alphabet_type.
Definition: bitcompressed_vector.hpp:135
seqan3::alphabet_proxy
A CRTP-base that eases the definition of proxy types returned in place of regular alphabets.
Definition: alphabet_proxy.hpp:65
seqan3::bitcompressed_vector::cbegin
const_iterator cbegin() const noexcept
Returns an iterator to the first element of the container.
Definition: bitcompressed_vector.hpp:372
seqan3::bitcompressed_vector::erase
iterator erase(const_iterator pos)
Removes specified elements from the container.
Definition: bitcompressed_vector.hpp:848
std::initializer_list
seqan3::views::to_rank
auto const to_rank
A view that calls seqan3::to_rank() on each element in the input range.
Definition: to_rank.hpp:67
seqan3::bitcompressed_vector::front
const_reference front() const noexcept
Return the first element. Calling front on an empty container is undefined.
Definition: bitcompressed_vector.hpp:491
to_rank.hpp
Provides seqan3::views::to_rank.