21 #ifndef mia_core_boundary_conditions_hh
22 #define mia_core_boundary_conditions_hh
69 typedef std::unique_ptr<CSplineBoundaryCondition>
Pointer;
99 void set_width(
int width);
116 template <
typename T>
117 void filter_line(std::vector<T>& coeff,
const std::vector<double>& poles)
const;
126 void filter_line(std::vector<double>& coeff,
const std::vector<double>& poles)
const;
135 template <
typename T>
136 void template_filter_line(std::vector<T>& coeff,
const std::vector<double>& poles)
const;
146 virtual
void test_supported(
int npoles) const = 0;
148 virtual
void do_set_width(
int width);
151 virtual
double initial_coeff(const
std::vector<
double>& coeff,
double pole) const = 0;
152 virtual
double initial_anti_coeff(const
std::vector<
double>& coeff,
double pole)const = 0;
178 virtual CSplineBoundaryCondition *do_create()
const;
180 virtual CSplineBoundaryCondition *do_create(
int width)
const = 0;
218 __attribute__((deprecated));
238 template <
typename T,
int size>
239 struct __dispatch_filter_line {
243 template <
typename T,
int size>
245 const std::vector<double>& poles)
247 std::vector<double> temp(coeff.size());
248 for (
int i = 0; i < size; ++i) {
249 std::transform(coeff.begin(), coeff.end(), temp.begin(),
250 [i](
const T& x) {
return x[i]; });
252 for (
size_t j = 0; j < coeff.size(); ++j)
253 coeff[j][i] = temp[j];
262 template <
typename T>
263 struct __dispatch_filter_line<T,1> {
271 template <
typename T>
274 typedef atomic_data<T> atom;
275 __dispatch_filter_line<T, atom::size>::apply(*
this, coeff, poles);
279 template <
typename T>
282 std::vector<double> temp(coeff.begin(), coeff.end());
283 filter_line(temp, poles);
284 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
class EXPORT_CORE CMeans private
#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
void template_filter_line(std::vector< T > &coeff, const std::vector< double > &poles) const
void filter_line(std::vector< T > &coeff, const std::vector< double > &poles) const
This is tha base of all plugins that create "things", like filters, cost functions time step operator...
std::vector< int > VIndex
type for the index vector
Abstract base class for B-spline interpolation boundary conditions.
Base class for all spline based interpolation kernels.
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()
CSplineBoundaryCondition::Pointer PSplineBoundaryCondition
#define NS_MIA_END
conveniance define to end the mia namespace