SeqAn3
3.0.2
The Modern C++ library for sequence analysis.
▼
SeqAn3
Welcome
►
Setup
►
Tutorial
►
How-To
Cookbook
►
About
►
API Reference (Modules)
▼
API Reference (details)
►
Namespace List
►
Class List
▼
File List
►
File List
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
convert.hpp
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
15
#pragma once
16
17
#include <
array
>
18
19
#include <
seqan3/alphabet/concept.hpp
>
20
21
// ============================================================================
22
// conversion to/from char/rank types
23
// ============================================================================
24
25
namespace
seqan3::detail
26
{
27
34
template
<alphabet out_t, alphabet in_t>
35
constexpr
std::array<out_t, alphabet_size<in_t>
> convert_through_char_representation
36
{
37
[] () constexpr
38
{
39
std::array<out_t, alphabet_size<in_t>
> ret{};
40
// for (decltype(alphabet_size<in_t>) i = 0; ...) causes indefinite compilation :(
41
for
(
auto
i = decltype(alphabet_size<in_t>){0}; i < alphabet_size<in_t>; ++i)
42
assign_char_to
(
to_char
(
assign_rank_to
(i, in_t{})), ret[i]);
43
return
ret;
44
}()
45
};
46
47
}
// namespace seqan3::detail
seqan3::assign_rank_to
constexpr auto assign_rank_to
Assign a rank to an alphabet object.
Definition:
concept.hpp:239
seqan3::to_char
constexpr auto to_char
Return the char representation of an alphabet object.
Definition:
concept.hpp:321
array
seqan3::assign_char_to
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition:
concept.hpp:417
concept.hpp
Core alphabet concept and free function/type trait wrappers.
Version:
main_user
main_dev
3.4.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.2
3.0.1
3.0.0
seqan3
alphabet
detail
convert.hpp
Generated on Thu Dec 3 2020 18:58:18 for SeqAn3 by
1.8.20