00001 /* 00002 00003 Copyright (C) 2003-2009 Kevin Thornton, krthornt[]@[]uci.edu 00004 00005 Remove the brackets to email me. 00006 00007 This file is part of libsequence. 00008 00009 libsequence is free software: you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 libsequence is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 long with libsequence. If not, see <http://www.gnu.org/licenses/>. 00021 00022 */ 00023 00024 #ifndef _STATE_COUNTER_H_ 00025 #define _STATE_COUNTER_H_ 00026 #include <functional> 00037 namespace Sequence 00038 { 00039 class stateCounter : public std::unary_function<char,void> 00040 { 00041 private: 00042 mutable char _gap; 00043 public: 00044 mutable unsigned a,g,c,t,zero,one,gap,n; 00045 mutable bool ndna; 00046 stateCounter(const char &gapchar = '-'); 00047 void operator()(const char &ch) const; 00048 unsigned nStates(void) const; 00049 }; 00050 } 00051 #endif
1.6.3