diff --git a/specific/data/objective/l2distance.cpp b/specific/data/objective/l2distance.cpp index e4f7a88f058414fb25cc58cb5e5694fbc3ecda69..b100dca8d81ad76a37cd556a12b0c36dab88c25c 100644 --- a/specific/data/objective/l2distance.cpp +++ b/specific/data/objective/l2distance.cpp @@ -45,7 +45,21 @@ namespace l2distance } return _v; } + + template <Physic T_Physic> + std::vector < std::vector < std::complex<double>>> Objective<T_Physic>::improvedShotIntensity(const Data<T_Physic> &d1) const + { + throw Exception("Shot fitting only works in Physic::acoustic so far"); + //return leastSquareShotIntensity(d1, d0); + } + + template <> + std::vector<std::vector<std::complex<double>>> Objective<Physic::acoustic>::improvedShotIntensity(const Data<Physic::acoustic> &d1) const + { + return leastSquareShotIntensity(d1, d0); + } + template class Objective<Physic::acoustic>; template class Objective<Physic::electromagnetic>; template class Objective<Physic::elastodynamic>; -} +} \ No newline at end of file diff --git a/specific/data/objective/l2distance.h b/specific/data/objective/l2distance.h index 50157430f85ba0492b025aa04215b71a360b94b0..d066f0e23e0f273445ff53206ca7626a98574b38 100644 --- a/specific/data/objective/l2distance.h +++ b/specific/data/objective/l2distance.h @@ -32,6 +32,8 @@ namespace l2distance virtual double performance(const Data<T_Physic>& d); virtual const Data<T_Physic>& update(Type type, const DataStateEvaluator<T_Physic>& ds); + + std::vector<std::vector<std::complex<double>>> improvedShotIntensity(const Data<T_Physic>& d) const; }; };