|
SeqAn3 3.4.0
The Modern C++ library for sequence analysis.
|
A class that defines which positions of a pattern to hash. More...
#include <seqan3/search/kmer_index/shape.hpp>
Public Member Functions | |
Constructors, destructor and assignment | |
| constexpr | shape () noexcept=default |
| Defaulted. | |
| constexpr | shape (shape const &) noexcept=default |
| Defaulted. | |
| constexpr | shape (shape &&) noexcept=default |
| Defaulted. | |
| constexpr shape & | operator= (shape const &) noexcept=default |
| Defaulted. | |
| constexpr shape & | operator= (shape &&) noexcept=default |
| Defaulted. | |
| ~shape () noexcept=default | |
| Defaulted. | |
| constexpr | shape (ungapped k) noexcept |
| Construct an ungapped shape from a given size. | |
| constexpr | shape (bin_literal const literal) noexcept |
| Construct from a given seqan3::bin_literal. | |
| Public Member Functions inherited from seqan3::dynamic_bitset< 58 > | |
| constexpr dynamic_bitset & | operator= (dynamic_bitset const &) noexcept=default |
| Defaulted. | |
| ~dynamic_bitset () noexcept=default | |
| Defaulted. | |
| constexpr void | assign (char const(&lit)[N]) |
| Assign from literal. | |
| constexpr iterator | begin () noexcept |
| Returns the begin to the dynamic_bitset. | |
| constexpr const_iterator | cbegin () const noexcept |
| Returns the begin to the dynamic_bitset. | |
| constexpr iterator | end () noexcept |
| Returns iterator past the end of the dynamic_bitset. | |
| constexpr const_iterator | cend () const noexcept |
| Returns iterator past the end of the dynamic_bitset. | |
| constexpr dynamic_bitset & | operator&= (dynamic_bitset const &rhs) noexcept |
| Sets the bits to the result of binary AND on corresponding pairs of bits of *this and rhs. | |
| constexpr dynamic_bitset & | operator|= (dynamic_bitset const &rhs) noexcept |
| Sets the bits to the result of binary OR on corresponding pairs of bits of *this and rhs. | |
| constexpr dynamic_bitset & | operator^= (dynamic_bitset const &rhs) noexcept |
| Sets the bits to the result of binary XOR on corresponding pairs of bits of *this and rhs. | |
| constexpr dynamic_bitset | operator~ () const noexcept |
| Returns a temporary copy of *this with all bits flipped (binary NOT). | |
| constexpr dynamic_bitset & | operator<<= (size_t const count) noexcept |
| Performs binary shift left on the current object. | |
| constexpr dynamic_bitset & | operator>>= (size_t const count) noexcept |
| Performs binary shift right on the current object. | |
| constexpr dynamic_bitset | operator>> (size_t const count) const noexcept |
| Performs binary shift right. | |
| constexpr dynamic_bitset | operator<< (size_t const count) const noexcept |
| Performs binary shift left. | |
| constexpr dynamic_bitset & | set () noexcept |
| Sets all bits to 1. | |
| constexpr dynamic_bitset & | reset () noexcept |
| Sets all bits to 0. | |
| constexpr dynamic_bitset & | flip () noexcept |
| Flips all bits (binary NOT). | |
| constexpr bool | all () const noexcept |
| Checks if all bit are set. | |
| constexpr bool | any () const noexcept |
| Checks if any bit is set. | |
| constexpr bool | none () const noexcept |
| Checks if no bit is set. | |
| constexpr size_type | count () const noexcept |
| Returns the number of set bits. | |
| constexpr reference | at (size_t const i) |
| Returns the i-th element. | |
| constexpr const_reference | test (size_t const i) const |
| Returns the i-th element. | |
| constexpr reference | operator[] (size_t const i) noexcept |
| Returns the i-th element. | |
| constexpr reference | front () noexcept |
| Returns the first element. | |
| constexpr reference | back () noexcept |
| Returns the last element. | |
| constexpr bitfield * | raw_data () noexcept |
| Direct access to the underlying bit field. | |
| constexpr bool | empty () const noexcept |
| Checks whether the container is empty. | |
| constexpr size_type | size () const noexcept |
| Returns the number of elements in the container, i.e. std::distance(begin(), end()). | |
| constexpr size_type | max_size () const noexcept |
| Returns the maximum number of elements the container is able to hold and resolves to bit_capacity. | |
| constexpr size_type | capacity () const noexcept |
| Returns the number of elements that the container is able to hold and resolves to bit_capacity. | |
| constexpr void | reserve (size_t) const noexcept |
| Since the capacity is fixed on compile time, this is a no-op. | |
| constexpr void | shrink_to_fit () const noexcept |
| Since the capacity is fixed on compile time, this is a no-op. | |
| constexpr void | clear () noexcept |
| Removes all elements from the container. | |
| constexpr iterator | insert (const_iterator pos, value_type const value) noexcept |
| Inserts value before pos in the container. | |
| constexpr iterator | erase (const_iterator begin_it, const_iterator end_it) noexcept |
| Removes specified elements from the container. | |
| constexpr void | push_back (value_type const value) noexcept |
| Appends the given element value to the end of the container. | |
| constexpr void | pop_back () noexcept |
| Removes the last element of the container. | |
| constexpr void | resize (size_type const count, value_type const value=false) noexcept |
| Resizes the container to contain count elements. | |
| constexpr void | swap (dynamic_bitset &rhs) noexcept |
| Swap contents with another instance. | |
| std::string | to_string (char_t zero=char_t{ '0'}, char_t one=char_t{ '1'}) const |
| Converts the dynamic_bitset to a std::string. | |
| constexpr unsigned long | to_ulong () const |
| Converts the dynamic_bitset to an unsigned long integer. | |
| constexpr unsigned long long | to_ullong () const |
| Converts the dynamic_bitset to an unsigned long long integer. | |
Related Symbols | |
(Note that these are not member symbols.) | |
Other literals | |
| constexpr shape | operator""_shape (unsigned long long const value) |
| The seqan3::shape literal. | |
Additional Inherited Members | |
| Public Types inherited from seqan3::dynamic_bitset< 58 > | |
| using | value_type |
| Equals bool. | |
| using | reference |
| A proxy type that enables assignment. | |
| using | const_reference |
| Equals the value_type. | |
| using | iterator |
| The iterator type of this container (a random access iterator). | |
| using | const_iterator |
| The const_iterator type of this container (a random access iterator). | |
| using | difference_type |
| A std::ptrdiff_t. | |
| using | size_type |
| An unsigned integer type (usually std::size_t). | |
A class that defines which positions of a pattern to hash.
When hashing a sequence, there may be positions that do not count towards the final hash value. A shape offers an easy way to define such patterns. Given a k-mer length k (0 < k <= 58), a shape represents a binary sequence where a 0 encodes a "don't care position", i.e. a position that is not taken into account when computing the hash value. A 1 therefore translates to a position that is used to compute the hash value.
|
inlineconstexprnoexcept |
Construct an ungapped shape from a given size.
Linear in k.
No-throw guarantee.
|
inlineconstexprnoexcept |
Construct from a given seqan3::bin_literal.
Linear in the size of the bin_literal.
No-throw guarantee.
|