21 #ifndef mia_core_boundary_conditions_hh 22 #define mia_core_boundary_conditions_hh 69 typedef std::unique_ptr<CSplineBoundaryCondition>
Pointer;
101 void set_width(
int width);
118 template <
typename T>
119 void filter_line(std::vector<T>& coeff,
const std::vector<double>& poles)
const;
128 void filter_line(std::vector<double>& coeff,
const std::vector<double>& poles)
const;
137 template <
typename T>
138 void template_filter_line(std::vector<T>& coeff,
const std::vector<double>& poles)
const;
148 virtual void test_supported(
int npoles)
const = 0;
150 virtual void do_set_width(
int width);
153 virtual double initial_coeff(
const std::vector<double>& coeff,
double pole)
const = 0;
154 virtual double initial_anti_coeff(
const std::vector<double>& coeff,
double pole)
const = 0;
223 __attribute__((deprecated));
243 template <
typename T,
int size>
244 struct __dispatch_filter_line {
248 template <
typename T,
int size>
250 const std::vector<double>& poles)
252 std::vector<double> temp(coeff.size());
253 for (
int i = 0; i < size; ++i) {
254 std::transform(coeff.begin(), coeff.end(), temp.begin(),
255 [i](
const T& x) {
return x[i]; });
257 for (
size_t j = 0; j < coeff.size(); ++j)
258 coeff[j][i] = temp[j];
267 template <
typename T>
268 struct __dispatch_filter_line<T,1> {
276 template <
typename T>
279 typedef atomic_data<T> atom;
280 __dispatch_filter_line<T, atom::size>::apply(*
this, coeff, poles);
284 template <
typename T>
287 std::vector<double> temp(coeff.begin(), coeff.end());
288 filter_line(temp, poles);
289 std::transform(temp.begin(), temp.end(), coeff.begin(), [](
double x) {
return static_cast<T
>(x);});
PSplineBoundaryCondition produce_spline_boundary_condition(const std::string &descr)
the singleton that a plug-in handler really is
CSplineBoundaryCondition plugin_data
helper typedef for plug-in handling
static const char *const type_descr
type portion of the plugin search path
void template_filter_line(std::vector< T > &coeff, const std::vector< double > &poles) const
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
std::vector< double > VWeight
type for the weight vector
Base plugin for spline boundary conditions.
static const char *const data_descr
data portion of the plugin search path
FACTORY_TRAIT(CSplineBoundaryConditionPluginHandler)
make spline boundary conditions parsable by the command line
std::unique_ptr< CSplineBoundaryCondition > Pointer
pointer type to this boundary condition
std::vector< int > VIndex
type for the index vector
Abstract base class for B-spline interpolation boundary conditions.
void filter_line(std::vector< T > &coeff, const std::vector< double > &poles) const
CSplineBoundaryCondition plugin_type
helper typedef for plug-in handling
THandlerSingleton< TFactoryPluginHandler< CSplineBoundaryConditionPlugin > > CSplineBoundaryConditionPluginHandler
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
The base class for all plug-in created object.
static const T & instance()
The basic template of all plugin handlers.
CSplineBoundaryCondition::Pointer PSplineBoundaryCondition
#define NS_MIA_END
conveniance define to end the mia namespace