7 #ifndef MIN_MATCH_LENGTH_HPP_ 8 #define MIN_MATCH_LENGTH_HPP_ 18 public std::unary_function<std::string, std::size_t> {
19 int operator()(
const int sz)
const {
return sz;}
25 public std::unary_function<std::string, std::size_t> {
31 int operator()(
const int sz)
const {
32 return std::min(sz, min_);
43 public std::unary_function<std::string, std::size_t> {
46 : min_(min), end_(end)
49 int operator()(
const int sz)
const {
67 public std::unary_function<std::string, std::size_t> {
73 BOOST_ASSERT(f_ > 0.0 && f_ <= 1.0 &&
"invalid fraction");
76 int operator()(
const int sz)
const {
94 public std::unary_function<std::string, std::size_t> {
107 if( min_ == 0 && end_ == 0 && f_ == 0.0 ) f_ = 1.0;
109 if( min_ < 0 ) BOOST_THROW_EXCEPTION(
111 << Err::msg_t(
"invalid minimal match length")
115 if( end_ < 0 ) BOOST_THROW_EXCEPTION(
117 << Err::msg_t(
"invalid ignore end length")
121 if( f_ < 0.0 || f_ > 1.0 ) BOOST_THROW_EXCEPTION(
123 << Err::msg_t(
"invalid minimal match fraction")
128 int operator()(
const int sz)
const {
Require full sequence to match.
Definition: min_match_length.hpp:17
Definition: min_match_length.hpp:96
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
Set a fraction of sequence length to match.
Definition: min_match_length.hpp:66
Definition: exception.hpp:23
Set a minimal sequence length to match allowing for some mismatch at ends.
Definition: min_match_length.hpp:42
Set a fraction of sequence length to match.
Definition: min_match_length.hpp:93
Set a minimal sequence length to match.
Definition: min_match_length.hpp:24
Definition: min_match_length.hpp:69