7 #ifndef BEST_MATCH_PAIR_HPP_ 8 #define BEST_MATCH_PAIR_HPP_ 10 #include "boost/assert.hpp" 17 static Score default_score() {
return std::numeric_limits<Score>::min();}
20 typedef Score score_type;
24 score1_(default_score()),
26 score2_(default_score())
29 id_type
const& id1()
const {
return id1_;}
30 id_type
const& id2()
const {
return id2_;}
31 bool has_score()
const {
return score1_ != default_score();}
32 score_type score1()
const {
return score1_;}
33 score_type score2()
const {
return score2_;}
35 bool is_acceptable(
const score_type min_score,
const bool require_best)
const {
38 score1_>= min_score &&
39 ( ! require_best || score1_ != score2_ )
49 bool combine(id_type
const&
id,
const score_type score) {
50 BOOST_ASSERT(score2_ <= score1_);
51 if( score1_ < score ) {
59 if( score2_ < score ) {
72 BOOST_ASSERT(score2_ <= score1_);
73 BOOST_ASSERT(bmp.score2_ <= bmp.score1_);
75 if( score1_ < bmp.score1_ ) {
76 if( score1_ < bmp.score2_ ) {
77 score2_ = bmp.score2_;
83 score1_ = bmp.score1_;
88 if( score2_ < bmp.score1_ ) {
89 score2_ = bmp.score1_;
Definition: best_match_pair.hpp:16
bool combine(Best_match_pair const &bmp)
Definition: best_match_pair.hpp:71
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
bool combine(id_type const &id, const score_type score)
Definition: best_match_pair.hpp:49