BioC++ core-0.7.0
The Modern C++ libraries for Bioinformatics.
 
Loading...
Searching...
No Matches
mask.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2022 deCODE Genetics
3// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
4// Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
5// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
6// shipped with this file and also available at: https://github.com/biocpp/biocpp-core/blob/main/LICENSE.md
7// -----------------------------------------------------------------------------------------------------
8
14#pragma once
15
16#include <cassert>
17
18#include <bio/alphabet/base.hpp>
19
20namespace bio::alphabet
21{
36class mask : public base<mask, 2, void>
37{
38private:
41
43 friend base_t;
44
45public:
49 constexpr mask() = default;
50 constexpr mask(mask const &) = default;
51 constexpr mask(mask &&) noexcept = default;
52 constexpr mask & operator=(mask const &) = default;
53 constexpr mask & operator=(mask &&) noexcept = default;
54 ~mask() = default;
56
62 static const mask UNMASKED;
63 static const mask MASKED;
65};
66
67constexpr mask mask::UNMASKED{mask{}.assign_rank(0)};
68constexpr mask mask::MASKED{mask{}.assign_rank(1)};
69} // namespace bio::alphabet
Provides bio::alphabet::base.
A CRTP-base that makes defining a custom alphabet easier.
Definition: base.hpp:55
constexpr derived_type & assign_rank(rank_type const c) noexcept
Assign from a numeric value.
Definition: base.hpp:168
Implementation of a masked semialphabet to be used for tuple composites..
Definition: mask.hpp:37
constexpr mask()=default
Defaulted.
static const mask MASKED
Definition: mask.hpp:63
constexpr mask(mask const &)=default
Defaulted.
static const mask UNMASKED
Member for UNMASKED.
Definition: mask.hpp:62
constexpr mask(mask &&) noexcept=default
Defaulted.
The alphabet module's namespace.
Definition: aa10li.hpp:23