libsequence  1.9.5
Sites.hpp
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2003-2009 Kevin Thornton, krthornt[]@[]uci.edu
4 
5 Remove the brackets to email me.
6 
7 This file is part of libsequence.
8 
9 libsequence is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 libsequence is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 long with libsequence. If not, see <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #ifndef SITES_H
25 #define SITES_H
26 
52 #include <string>
53 #include <memory>
54 namespace Sequence
55  {
56  class Seq;
57  class RedundancyCom95;
58  class Sites
59  {
60  private:
61  struct SitesImpl;
62  std::unique_ptr<SitesImpl> impl;
63  public:
64  explicit Sites ();
65  explicit Sites(const Sequence::Seq & seq1,
66  const Sequence::Seq & seq2,
67  const RedundancyCom95 & sitesObj,
68  int maxdiffs = 3);
69  Sites(Sites &&) = default;
70  void operator()(const Sequence::Seq & seq1,
71  const Sequence::Seq & seq2,
72  const RedundancyCom95 & sitesObj,
73  int maxdiffs = 3);
74  ~Sites (void);
78  double L0(void) const;
82  double L2S(void) const;
86  double L2V(void) const;
90  double L4(void) const;
91  };
92 }
93 #endif
bool operator()(const std::pair< key, value > &l, const std::pair< key, value > &r) const
Abstract interface to sequence objects.
Definition: Seq.hpp:46
double L2V(void) const
Definition: Sites.cc:147
The namespace in which this library resides.
double L4(void) const
Definition: Sites.cc:154
Calculate length statistics for divergence calculations.
Definition: Sites.hpp:58
double L0(void) const
Definition: Sites.cc:133
double L2S(void) const
Definition: Sites.cc:140
Calculate redundancy of a genetic code using Comeron&#39;s counting scheme.