File: TranscriptGroup.hpp

package info (click to toggle)
salmon 0.7.2%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,352 kB
  • ctags: 5,243
  • sloc: cpp: 42,341; ansic: 6,252; python: 228; makefile: 207; sh: 190
file content (51 lines) | stat: -rw-r--r-- 1,190 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef TRANSCRIPT_GROUP_HPP
#define TRANSCRIPT_GROUP_HPP

#include <boost/functional/hash.hpp>

#include <vector>
#include <cstdint>

class TranscriptGroup {
    public:
        TranscriptGroup();
        TranscriptGroup(std::vector<uint32_t> txpsIn);

	TranscriptGroup(
        	std::vector<uint32_t> txpsIn,
		    size_t hashIn);

        TranscriptGroup(TranscriptGroup&& other);
        TranscriptGroup(const TranscriptGroup& other);

        TranscriptGroup& operator=(const TranscriptGroup& other);
        TranscriptGroup& operator=(TranscriptGroup&& other);

        friend bool operator==(const TranscriptGroup& lhs,
                               const TranscriptGroup& rhs);

        void setValid(bool v) const;

        std::vector<uint32_t> txps;
    	size_t hash;
        double totalMass;
        mutable bool valid;
};

bool operator==(const TranscriptGroup& lhs, const TranscriptGroup& rhs);

struct TranscriptGroupHasher {
    std::size_t operator()(const TranscriptGroup & k) const
  {
	return k.hash;
    /*
    std::size_t seed{0};
    for (auto e : k.txps) {
        boost::hash_combine(seed, e);
    }
    return seed;
    */
  }
};

#endif // TRANSCRIPT_GROUP_HPP