libsequence  1.9.5
stateCounter.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 _STATE_COUNTER_H_
25 #define _STATE_COUNTER_H_
26 #include <functional>
37 namespace Sequence
38  {
39  class __attribute__ ((deprecated))stateCounter : public std::unary_function<char,void>
40  {
41  public:
42  typedef unsigned size_type;
43  size_type a,g,c,t,zero,one,gap,n;
44  bool ndna;
45  private:
46  char _gap;
47  public:
48  stateCounter(char gapchar = '-');
49  stateCounter(stateCounter &&) = default;
50  stateCounter(const stateCounter &) = default;
51  stateCounter & operator=(const stateCounter &)=default;
52  stateCounter & operator=( stateCounter &&)=default;
53  void operator()(const char &ch);
54  size_type nStates(void) const;
55  };
56 }
57 #endif
bool operator()(const std::pair< key, value > &l, const std::pair< key, value > &r) const
The namespace in which this library resides.
class __attribute__((deprecated)) FST
Functor to count the number of states, excluding gaps and missing data, in a range of characters...
Definition: FST.hpp:41