PolyBoRi
TransformedSequence.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_TransformedSequence_h_
17 #define polybori_TransformedSequence_h_
18 
19 // include basic definitions
20 #include <polybori/pbori_defs.h>
22 
23 #include <vector>
24 #include <algorithm>
25 
27 
28 
33 template <class SequenceType, class OperatorType>
35 
36 public:
37  typedef SequenceType sequence_type;
38  typedef typename sequence_type::const_iterator sequence_iterator;
39  typedef OperatorType operator_type;
41 
42 
45  m_sequence(seq), m_func(func) {
46  }
47 
49 
51  return const_iterator(m_sequence.begin(), m_func); }
52 
53  const_iterator end() const {
54  return const_iterator(m_sequence.end(), m_func); }
56 
57 private:
58  sequence_type m_sequence;
59  operator_type m_func;
60 };
61 
62 
64 
65 #endif /* polybori_TransformedSequence_h_ */