Amoeba iterations
-reopening issue #91 -passing our best guess of iteration instead of metric
This commit is contained in:
@ -148,49 +148,22 @@ public:
|
||||
case eOptimizerType::AMOEBA:
|
||||
optAm = dynamic_cast<AmoebaOptimizerPointer>(object);
|
||||
iAmoebaIterations ++;
|
||||
if(iAmoebaIterations == 100){
|
||||
iAmoebaIterations = 100;
|
||||
}
|
||||
// if(iAmoebaIterations == 100){
|
||||
// iAmoebaIterations = 100;
|
||||
// }
|
||||
|
||||
objIterUpdate->onIteration(
|
||||
eOptimType,
|
||||
optAm->GetCachedValue(),
|
||||
iAmoebaIterations, //optAm->GetCachedValue(),
|
||||
optAm->GetCachedCurrentPosition()[0],
|
||||
optAm->GetCachedCurrentPosition()[1],
|
||||
optAm->GetCachedCurrentPosition()[2]
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// auto optimizer = dynamic_cast<OptimizerPointer>(object);
|
||||
|
||||
// if (typeid(event) == typeid(itk::IterationEvent)) {
|
||||
|
||||
// //Feedback from the optimizer executed at the end of every itteration
|
||||
// // currently just print the result into the cout. We might add
|
||||
// // functionality to register and emit signals to update the UI.
|
||||
|
||||
//// std::cout << "Iteration: " << optimizer->GetCurrentIteration() << std::endl;
|
||||
//// auto oldprecision = std::cout.precision();
|
||||
//// std::cout.precision(std::numeric_limits<double>::digits10 + 2);
|
||||
//// std::cout << "Similarity: " << optimizer->GetValue() << std::endl;
|
||||
//// std::cout.precision(oldprecision);
|
||||
//// std::cout << "Position: " << optimizer->GetCurrentPosition() << std::endl;
|
||||
|
||||
//// objIterUpdate->onIteration(
|
||||
//// optimizer->GetCurrentIteration()+1,
|
||||
//// optimizer->GetCurrentPosition()[0],
|
||||
//// optimizer->GetCurrentPosition()[2],
|
||||
//// -optimizer->GetCurrentPosition()[1]
|
||||
//// );
|
||||
// objIterUpdate->onIteration(
|
||||
// optimizer->GetCurrentIteration()+1,
|
||||
// optimizer->GetCurrentPosition()[0],
|
||||
// optimizer->GetCurrentPosition()[1],
|
||||
// optimizer->GetCurrentPosition()[2]
|
||||
// );
|
||||
// }
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user