ARB
AP_seq_dna.hxx
Go to the documentation of this file.
1 // =============================================================== //
2 // //
3 // File : AP_seq_dna.hxx //
4 // Purpose : //
5 // //
6 // Institute of Microbiology (Technical University Munich) //
7 // http://www.arb-home.de/ //
8 // //
9 // =============================================================== //
10 
11 #ifndef AP_SEQ_DNA_HXX
12 #define AP_SEQ_DNA_HXX
13 
14 #ifndef AP_SEQUENCE_HXX
15 #include <AP_sequence.hxx>
16 #endif
17 #ifndef DOWNCAST_H
18 #include <downcast.h>
19 #endif
20 
21 class AP_sequence_parsimony FINAL_TYPE : public AP_combinableSeq { // derived from a Noncopyable
22  void build_table();
24 
25  void set(const char *sequence) OVERRIDE;
26  void unset() OVERRIDE;
27 
28  char *seq_pars; // AP_BASES
29 
30 public:
31  static char *table;
32 
33  AP_sequence_parsimony(const AliView *aliview);
34  ~AP_sequence_parsimony() OVERRIDE;
35 
36  const char *get_sequence() const {
38  ap_assert(seq_pars);
39  return seq_pars;
40  }
41  const unsigned char *get_usequence() const { return (const unsigned char*)get_sequence(); }
42 
43  AP_combinableSeq *dup() const OVERRIDE; // used to get the real new element
44  Mutations combine_seq(const AP_combinableSeq *lefts, const AP_combinableSeq *rights, char *mutation_per_site) OVERRIDE;
45  Mutations mutations_if_combined_with(const AP_combinableSeq *other) OVERRIDE;
46  void partial_match(const AP_combinableSeq *part, long *overlap, long *penalty) const OVERRIDE;
47  uint32_t checksum() const OVERRIDE;
48  int cmp_combined(const AP_combinableSeq *other) const OVERRIDE;
49 };
50 
51 
52 #else
53 #error AP_seq_dna.hxx included twice
54 #endif // AP_SEQ_DNA_HXX
const unsigned char * get_usequence() const
Definition: AP_seq_dna.hxx:41
virtual AP_FLOAT count_weighted_bases() const =0
double AP_FLOAT
Definition: AP_matrix.hxx:27
virtual AP_combinableSeq * dup() const =0
long Mutations
Definition: AP_sequence.hxx:99
#define ap_assert(cond)
xml element
#define OVERRIDE
Definition: cxxforward.h:93
void lazy_load_sequence() const
Definition: AP_sequence.hxx:67