IntaRNA 3.4.1
RNA-RNA interaction prediction | C++ API
Loading...
Searching...
No Matches
PredictorMfe.h
Go to the documentation of this file.
1
2#ifndef INTARNA_PREDICTORMFE_H_
3#define INTARNA_PREDICTORMFE_H_
4
5
6#include "IntaRNA/Predictor.h"
7
9
10#include <list>
11#include <utility>
12
13#include <boost/unordered_map.hpp>
14
15namespace IntaRNA {
16
24class PredictorMfe : public Predictor {
25
26protected:
27
32 template < class ValueType >
34 public:
35
42 BestInteraction( const ValueType val=(std::numeric_limits<ValueType>::has_infinity ? std::numeric_limits<ValueType>::infinity() : std::numeric_limits<ValueType>::max())
43 , const size_t j1=RnaSequence::lastPos, const size_t j2=RnaSequence::lastPos )
44 : val(val), j1(j1), j2(j2)
45 {}
46
47 public:
49 ValueType val;
51 size_t j1;
53 size_t j2;
54 };
55
60
61
62
63public:
64
77
78 virtual ~PredictorMfe();
79
80protected:
81
82
85
88
91
93 typedef std::list<Interaction> InteractionList;
94
97
99 typedef boost::unordered_map< Interaction::BasePair, BestInteractionE, Interaction::BasePair::Hash > HashIdx2E;
100
104
108 std::pair< IndexRangeList, IndexRangeList > reportedInteractions;
109
113 virtual
114 void
116
126 bool
127 isValidOutputSite( const size_t i1, const size_t j1,
128 const size_t i2, const size_t j2 ) const;
129
142 virtual
143 void
144 updateOptima( const size_t i1, const size_t j1
145 , const size_t i2, const size_t j2
146 , const E_type energy
147 , const bool isHybridE
148 , const bool incrementZall );
149
150
157 virtual
158 void
159 traceBack( Interaction & interaction ) = 0;
160
161
172 virtual
173 void
175
176
188 virtual
189 void
190 updateMfe4leftEnd(const size_t i1, const size_t j1
191 , const size_t i2, const size_t j2
192 , const Interaction & curInteraction );
193
200 virtual
201 void
203
204};
205
206} // namespace
207
208#endif /* INTARNA_PREDICTORMFE_H_ */
Definition InteractionEnergy.h:20
Definition Interaction.h:28
Definition OutputHandler.h:20
Definition PredictionTracker.h:15
Definition PredictorMfe.h:33
size_t j1
right end of the interaction in seq1
Definition PredictorMfe.h:51
BestInteraction(const ValueType val=(std::numeric_limits< ValueType >::has_infinity ? std::numeric_limits< ValueType >::infinity() :std::numeric_limits< ValueType >::max()), const size_t j1=RnaSequence::lastPos, const size_t j2=RnaSequence::lastPos)
Definition PredictorMfe.h:42
ValueType val
value to be stored for the interaction, e.g. energy
Definition PredictorMfe.h:49
size_t j2
right end of the interaction in seq2
Definition PredictorMfe.h:53
Definition PredictorMfe.h:24
virtual void traceBack(Interaction &interaction)=0
std::pair< IndexRangeList, IndexRangeList > reportedInteractions
Definition PredictorMfe.h:108
PredictorMfe(const InteractionEnergy &energy, OutputHandler &output, PredictionTracker *predTracker)
PredictionTracker * predTracker
access to the prediction tracker of the super class
Definition Predictor.h:91
virtual void getNextBest(Interaction &curBest)
std::list< Interaction > InteractionList
list of interactions
Definition PredictorMfe.h:93
InteractionList mfeInteractions
mfe interaction boundaries
Definition PredictorMfe.h:96
InteractionEnergyIdxOffset energy
access to the interaction energy handler of the super class
Definition Predictor.h:85
BestInteraction< E_type > BestInteractionE
BestInteraction that stores an energy value.
Definition PredictorMfe.h:57
OutputHandler & output
access to the output handler of the super class
Definition Predictor.h:88
HashIdx2E mfe4leftEnd
Definition PredictorMfe.h:103
boost::unordered_map< Interaction::BasePair, BestInteractionE, Interaction::BasePair::Hash > HashIdx2E
hash to map index pairs to BestInteractionE entries
Definition PredictorMfe.h:99
bool isValidOutputSite(const size_t i1, const size_t j1, const size_t i2, const size_t j2) const
virtual void reportOptima()
virtual void updateOptima(const size_t i1, const size_t j1, const size_t i2, const size_t j2, const E_type energy, const bool isHybridE, const bool incrementZall)
virtual void updateMfe4leftEnd(const size_t i1, const size_t j1, const size_t i2, const size_t j2, const Interaction &curInteraction)
BestInteraction< Z_type > BestInteractionZ
BestInteraction that stores a partition function value.
Definition PredictorMfe.h:59
virtual void initOptima()
Definition Predictor.h:21
void incrementZall(const Z_type partZ)
Definition Predictor.h:220
PredictionTracker * predTracker
prediction tracker to be used
Definition Predictor.h:91
InteractionEnergyIdxOffset energy
energy computation handler
Definition Predictor.h:85
OutputHandler & output
interaction output handler
Definition Predictor.h:88
Definition RnaSequence.h:29
Definition Accessibility.h:13
int E_type
type for energy values (energy + accessibility [ED]) (internally)
Definition general.h:78