-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alphabet_base expects functions instead of look-up tables. #2427
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/seqan/seqan3/FVGwq8hgw9v9qLeKd7pTPTYdQpJs |
afbbc26
to
2537f10
Compare
Codecov Report
@@ Coverage Diff @@
## master #2427 +/- ##
==========================================
+ Coverage 98.29% 98.31% +0.01%
==========================================
Files 268 269 +1
Lines 11055 11134 +79
==========================================
+ Hits 10867 10946 +79
Misses 188 188
Continue to review full report at Codecov.
|
2537f10
to
de9c83e
Compare
de9c83e
to
1cd0f8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found just one typo :)
2aafb9d
to
d270fe0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Only thing is that when I see chr
, I always think of chromosome
and not character
. Maybe its worth changing the chr
to char
. Probably just personal preference.
@simonsasse, can you approve and assign core for review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, just some documentation remarks and general questions.
This point does not need / should not be addressed in this PR:
I am missing a bit some documentation on what the advantage of this is. If there is a changelog entry, it should shortly describe why this is good?
I think doc/howto/write_an_alphabet/dna2_derive_from_base.cpp
can also shortly mention that there is an alternative to tables (it does show it, but doesn't explicitly mention it).
using index_t = std::make_unsigned_t<char_type>; | ||
index_t const id = static_cast<index_t>(chr); | ||
return derived_type::char_to_rank[id]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these lines different?
From what I've read, the bug only refers to deprecation warnings being emitted even when the code is not called.
So this block should also be
using index_t = std::make_unsigned_t<char_type>;
return derived_type::char_to_rank[static_cast<index_t>(chr)];
?
include/seqan3/alphabet/gap/gap.hpp
Outdated
@@ -43,10 +43,16 @@ class gap : public alphabet_base<gap, 1, char> | |||
friend base_t; | |||
|
|||
//!\brief Value to char conversion table. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not true anymore :)
a3e506d
to
91f8071
Compare
91f8071
to
7b001db
Compare
7b001db
to
a9ba4d7
Compare
This is part of seqan/product_backlog#295
This changes
rank_to_char
andchar_to_rank
to static member functions.Blocked by #2430.