-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmixer.cpp
More file actions
24 lines (20 loc) · 718 Bytes
/
mixer.cpp
File metadata and controls
24 lines (20 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <list>
#include "mixer.h"
mixer::mixer( unsigned long long mem ) {
//models.push_front( new vertical_markov_predictor( mem/10 ) );
models.push_front( new markov_predictor( mem ) );
}
float mixer::get_prediction() {
/*if ( (*models.rbegin())->get_prediction() > 0.95f || (*models.rbegin())->get_prediction() < 0.05f && (*models.rbegin())->get_likelihood() > 4 ) {
return (*models.rbegin())->get_prediction();
}
else {*/
// ToDo: fix the mixer
return (*models.begin())->get_prediction();
//}
}
void mixer::model( unsigned int bit ) {
for ( std::list< predictor* >::iterator i = models.begin(); i != models.end(); ++i ) {
(*i)->model(bit);
}
}