21 #ifndef mia_core_boundary_conditions_hh
22 #define mia_core_boundary_conditions_hh
70 typedef std::unique_ptr<CSplineBoundaryCondition>
Pointer;
102 void set_width(
int width);
120 template <
typename T>
121 void filter_line(std::vector<T>& coeff,
const std::vector<double>& poles)
const;
130 void filter_line(std::vector<double>& coeff,
const std::vector<double>& poles)
const;
139 template <
typename T>
140 void template_filter_line(std::vector<T>& coeff,
const std::vector<double>& poles)
const;
150 virtual
void test_supported(
int npoles) const = 0;
152 virtual
void do_set_width(
int width);
155 virtual
double initial_coeff(const
std::vector<
double>& coeff,
double pole) const = 0;
156 virtual
double initial_anti_coeff(const
std::vector<
double>& coeff,
double pole)const = 0;
226 __attribute__((deprecated));
246 template <
typename T,
int size>
247 struct __dispatch_filter_line {
251 template <
typename T,
int size>
253 const std::vector<double>& poles)
255 std::vector<double> temp(coeff.size());
257 for (
int i = 0; i < size; ++i) {
258 std::transform(coeff.begin(), coeff.end(), temp.begin(),
264 for (
size_t j = 0; j < coeff.size(); ++j)
265 coeff[j][i] = temp[j];
274 template <
typename T>
275 struct __dispatch_filter_line<T, 1> {
284 template <
typename T>
287 typedef atomic_data<T> atom;
288 __dispatch_filter_line<T, atom::size>::apply(*
this, coeff, poles);
292 template <
typename T>
295 std::vector<double> temp(coeff.begin(), coeff.end());
296 filter_line(temp, poles);
297 std::transform(temp.begin(), temp.end(), coeff.begin(), [](
double x) {
298 return static_cast<T>(x);