projects
/
satune.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a3310cd
)
more code
author
bdemsky
<bdemsky@uci.edu>
Sat, 13 Oct 2018 02:32:55 +0000
(19:32 -0700)
committer
bdemsky
<bdemsky@uci.edu>
Sat, 13 Oct 2018 02:32:55 +0000
(19:32 -0700)
src/Tuner/multituner.cc
patch
|
blob
|
history
diff --git
a/src/Tuner/multituner.cc
b/src/Tuner/multituner.cc
index 4ccd29f1f1af3123213e7e70a92ea916e5c7543d..2504110fd3fe2003c5301cf405bcce400f20ba69 100644
(file)
--- a/
src/Tuner/multituner.cc
+++ b/
src/Tuner/multituner.cc
@@
-99,7
+99,6
@@
long long MultiTuner::evaluate(Problem *problem, SearchTuner *tuner) {
void MultiTuner::tuneComp() {
Vector<TunerRecord *> *tunerV = new Vector<TunerRecord *>(&tuners);
for (uint b = 0; b < budget; b++) {
void MultiTuner::tuneComp() {
Vector<TunerRecord *> *tunerV = new Vector<TunerRecord *>(&tuners);
for (uint b = 0; b < budget; b++) {
-
uint tSize = tunerV->getSize();
for (uint i = 0; i < tSize; i++) {
SearchTuner *tmpTuner = mutateTuner(tunerV->get(i)->getTuner(), b);
uint tSize = tunerV->getSize();
for (uint i = 0; i < tSize; i++) {
SearchTuner *tmpTuner = mutateTuner(tunerV->get(i)->getTuner(), b);
@@
-127,10
+126,10
@@
void MultiTuner::tuneComp() {
places.insertAt(k, tuner);
}
}
places.insertAt(k, tuner);
}
}
- int points =
4
;
+ int points =
9
;
for (uint k = 0; k < places.getSize() && points; k++) {
TunerRecord *tuner = places.get(k);
for (uint k = 0; k < places.getSize() && points; k++) {
TunerRecord *tuner = places.get(k);
- points = points /
2
;
+ points = points /
3
;
int currScore = 0;
if (scores.contains(tuner))
currScore = scores.get(tuner);
int currScore = 0;
if (scores.contains(tuner))
currScore = scores.get(tuner);
@@
-155,6
+154,13
@@
void MultiTuner::tuneComp() {
}
ranking.insertAt(j, tuner);
}
}
ranking.insertAt(j, tuner);
}
+ for (uint i = tuners.getSize(); i < ranking.getSize(); i++) {
+ TunerRecord * tuner = ranking.get(i);
+ for(uint j = 0; j < tunerV->getSize(); j++) {
+ if (tunerV->get(j) == tuner)
+ tunerV->removeAt(j);
+ }
+ }
}
}
}
}