17 #ifdef _LIBCPP_VERSION 18 # include <unordered_map> 19 # include <unordered_set> 23 class Hash = std::hash<Key>,
24 class Pred = std::equal_to<Key>,
25 class Alloc = std::allocator< std::pair<const Key,T> >
27 struct unordered_map {
28 typedef std::unordered_map<Key,T,Hash,Pred,Alloc> type;
32 class Hash = std::hash<Key>,
33 class Pred = std::equal_to<Key>,
34 class Alloc = std::allocator<Key>
36 struct unordered_set {
37 typedef std::unordered_set<Key,Hash,Pred,Alloc> type;
42 # include <tr1/unordered_map> 43 # include <tr1/unordered_set> 47 class Hash = std::tr1::hash<Key>,
48 class Pred = std::equal_to<Key>,
49 class Alloc = std::allocator< std::pair<const Key,T> >
52 typedef std::tr1::unordered_map<Key,T,Hash,Pred,Alloc> type;
56 class Hash = std::tr1::hash<Key>,
57 class Pred = std::equal_to<Key>,
58 class Alloc = std::allocator<Key>
61 typedef std::tr1::unordered_set<Key,Hash,Pred,Alloc> type;
88 return p.first<<(
sizeof(size_t)/2) | p.second;
123 Gap(
size_t idx) : idx_(idx) {}
127 idx()
const {
return (
size_t)idx_; }
145 operator != (
const Gap & x)
const {
return this->idx_ != x.idx_; }
178 failure (
const std::string& msg):
std::exception(), msg_(msg) {};
194 const char* what()
const throw();
277 std::vector<std::string>
317 return i+minlen <= j+1;
345 has_prefix(
const std::string &s,
const std::string &p,
size_t start=0);
syntax_error_failure()
empty constructor
Definition: aux.hh:210
double FLT_OR_DBL
select FLT_OR_DBL
Definition: aux.hh:302
Function class definining hash function for pairs of size_t.
Definition: aux.hh:79
bool operator==(const TaintedInftyInt &x, const TaintedInftyInt &y)
Definition: infty_int.hh:598
size_type pos_type
type of a sequence position
Definition: aux.hh:97
thrown, when the format is recognized but syntax is incorrect
Definition: aux.hh:207
failure(const std::string &msg)
Construct with message.
Definition: aux.hh:178
bool is_gap_symbol(char c)
Test for gap symbol.
Definition: aux.cc:35
bool has_prefix(const std::string &s, const std::string &p, size_t start)
Test string prefix.
Definition: aux.cc:80
size_t size_type
general size type
Definition: aux.hh:94
failure()
Construct empty.
Definition: aux.hh:184
void normalize_rna_sequence(std::string &seq)
Transform an RNA sequence string.
Definition: aux.cc:72
bool frag_len_geq(size_t i, size_t j, size_t minlen)
Definition: aux.hh:316
Definition: aligner.cc:17
void split_at_separator(const std::string &s, char sep, std::vector< std::string > &v)
Tokenize string at separator symbol.
Definition: aux.cc:89
size_t idx() const
0-based index
Definition: aux.hh:127
A simple 1-based string.
Definition: string1.hh:22
"enum class" of gaps in alignment edges
Definition: aux.hh:104
static const Gap loop
gap from inserting/deleting a loop (in sparse)
Definition: aux.hh:114
Gap(size_t idx)
init from 0-based index
Definition: aux.hh:123
static size_t size
< index of enumeration value
Definition: aux.hh:109
std::string concat_with_separator(const std::vector< std::string > &v, char sep)
Tokenize string at separator symbol.
Definition: aux.cc:113
static const Gap locality
gap outside of the locally aligned region (sequence and structure local alignment) ...
Definition: aux.hh:116
syntax_error_failure(const std::string &msg)
Construct with message string.
Definition: aux.hh:218
static const Gap regular
regular gap
Definition: aux.hh:112
char special_gap_symbol(Gap gap)
special symbols of gaps
Definition: aux.cc:45
bool get_nonempty_line(std::istream &in, std::string &line)
Get next non-empty/non-comment line.
Definition: aux.cc:123
size_t frag_len(size_t i, size_t j)
Definition: aux.hh:330
double prob_exp_f(int seqlen)
expected probability of a base pair (null-model)
Definition: aux.hh:228
static const Gap other
other gaps
Definition: aux.hh:118
Simple exception class that supports a text message.
Definition: aux.hh:168
Gap gap_code(char symbol)
code of a gap symbol
Definition: aux.cc:49
size_t operator()(std::pair< size_t, size_t > p) const
Hash function for pairs of size_t.
Definition: aux.hh:87
void transform_toupper(std::string &s)
Definition: aux.cc:67
char gap_symbol(Gap gap)
simplified symbols of gaps
Definition: aux.cc:40