| 1 | /* |
|---|
| 2 | Copyright (c) 2006-2018 Elmar Pruesse <elmar.pruesse@ucdenver.edu> |
|---|
| 3 | |
|---|
| 4 | This file is part of SINA. |
|---|
| 5 | SINA is free software: you can redistribute it and/or modify it under |
|---|
| 6 | the terms of the GNU General Public License as published by the Free |
|---|
| 7 | Software Foundation, either version 3 of the License, or (at your |
|---|
| 8 | option) any later version. |
|---|
| 9 | |
|---|
| 10 | SINA is distributed in the hope that it will be useful, but WITHOUT ANY |
|---|
| 11 | WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 12 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|---|
| 13 | for more details. |
|---|
| 14 | |
|---|
| 15 | You should have received a copy of the GNU General Public License |
|---|
| 16 | along with SINA. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | |
|---|
| 18 | Additional permission under GNU GPL version 3 section 7 |
|---|
| 19 | |
|---|
| 20 | If you modify SINA, or any covered work, by linking or combining it |
|---|
| 21 | with components of ARB (or a modified version of that software), |
|---|
| 22 | containing parts covered by the terms of the |
|---|
| 23 | ARB-public-library-license, the licensors of SINA grant you additional |
|---|
| 24 | permission to convey the resulting work. Corresponding Source for a |
|---|
| 25 | non-source form of such a combination shall include the source code |
|---|
| 26 | for the parts of ARB used as well as that of the covered work. |
|---|
| 27 | */ |
|---|
| 28 | |
|---|
| 29 | #ifndef _MSEQ_H_ |
|---|
| 30 | #define _MSEQ_H_ |
|---|
| 31 | |
|---|
| 32 | #include "graph.h" |
|---|
| 33 | #include "cseq.h" |
|---|
| 34 | |
|---|
| 35 | #include <vector> |
|---|
| 36 | |
|---|
| 37 | namespace sina { |
|---|
| 38 | |
|---|
| 39 | class mseq; |
|---|
| 40 | |
|---|
| 41 | class mseq_node : public aligned_base { |
|---|
| 42 | mseq_node() = delete; |
|---|
| 43 | public: |
|---|
| 44 | mseq_node(const aligned_base& b) |
|---|
| 45 | : aligned_base(b), weight(1.f) |
|---|
| 46 | {} |
|---|
| 47 | |
|---|
| 48 | mseq_node(int i, char c) |
|---|
| 49 | : aligned_base(i,c), weight(1.f) |
|---|
| 50 | {} |
|---|
| 51 | |
|---|
| 52 | float getWeight() const { |
|---|
| 53 | return weight; |
|---|
| 54 | } |
|---|
| 55 | |
|---|
| 56 | bool operator<(const mseq_node &rhs) const { |
|---|
| 57 | return aligned_base::operator<(rhs); |
|---|
| 58 | } |
|---|
| 59 | private: |
|---|
| 60 | float weight; |
|---|
| 61 | friend class mseq; |
|---|
| 62 | }; |
|---|
| 63 | |
|---|
| 64 | class mseq : public dag<mseq_node> { |
|---|
| 65 | public: |
|---|
| 66 | mseq(std::vector<const cseq*>::iterator seqs_begin, |
|---|
| 67 | std::vector<const cseq*>::iterator seqs_end, |
|---|
| 68 | float weight); |
|---|
| 69 | |
|---|
| 70 | unsigned int getWidth() { |
|---|
| 71 | return bases_width; |
|---|
| 72 | } |
|---|
| 73 | |
|---|
| 74 | private: |
|---|
| 75 | unsigned int num_seqs{0}; |
|---|
| 76 | unsigned int bases_width{0}; |
|---|
| 77 | }; |
|---|
| 78 | |
|---|
| 79 | } // namespace sina |
|---|
| 80 | |
|---|
| 81 | #endif |
|---|
| 82 | /* |
|---|
| 83 | Local Variables: |
|---|
| 84 | mode:c++ |
|---|
| 85 | c-file-style:"stroustrup" |
|---|
| 86 | c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) |
|---|
| 87 | indent-tabs-mode:nil |
|---|
| 88 | fill-column:99 |
|---|
| 89 | End: |
|---|
| 90 | */ |
|---|
| 91 | // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : |
|---|
| 92 | |
|---|