vdj_pipe
pipeline for processing DNA sequence data
sequence_position.hpp
Go to the documentation of this file.
1 
7 #ifndef SEQUENCE_POSITION_HPP_
8 #define SEQUENCE_POSITION_HPP_
10 
11 namespace vdj_pipe{
14 template<class Id>
15 struct Seq_pos {
16  Seq_pos(const Id iid, const unsigned pos)
17  : id_(iid), pos_(pos)
18  {}
19 
20  Id id_;
21  unsigned pos_;
22 };
23 
26 
27 template<class Id>
28 inline bool operator==(Seq_pos<Id> const& rp1, Seq_pos<Id> const& rp2) {
29  return rp1.id_ == rp2.id_ && rp1.pos_ == rp2.pos_;
30 }
31 
32 template<class Id>
33 inline bool operator<(Seq_pos<Id> const& rp1, Seq_pos<Id> const& rp2) {
34  if( rp1.id_ < rp2.id_ ) return true;
35  if( rp2.id_ < rp1.id_ ) return false;
36  return rp1.pos_ < rp2.pos_;
37 }
38 
39 template<class Id>
40 inline bool operator<(Seq_pos<Id> const& rp1, const Id rp2) {
41  return rp1.id_ < rp2;
42 }
43 
44 template<class Id>
45 inline bool operator<(const Id rp1, Seq_pos<Id> const& rp2) {
46  return rp1 < rp2.id_;
47 }
48 
49 }//namespace vdj_pipe
50 #endif /* SEQUENCE_POSITION_HPP_ */
Id id_
Definition: sequence_position.hpp:20
unsigned pos_
Definition: sequence_position.hpp:21
Seq_pos< Seq_id > super_seq
Definition: sequence_position.hpp:25
Seq_pos< Read_id > sub_seq
Definition: sequence_position.hpp:24
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
Definition: sequence_position.hpp:15
Seq_pos(const Id iid, const unsigned pos)
Definition: sequence_position.hpp:16
bool operator==(Seq_entry const &se1, Seq_entry const &se2)
Definition: sequence_entry.hpp:41