Go to the documentation of this file.
21 #ifndef mia_core_boundary_conditions_hh
22 #define mia_core_boundary_conditions_hh
70 typedef std::unique_ptr<CSplineBoundaryCondition>
Pointer;
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);
static const T & instance()
static const char *const type_descr
type portion of the plugin search path
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Base plugin for spline boundary conditions.
bool apply(CSplineKernel::VIndex &index, CSplineKernel::VWeight &weights) const
void filter_line(std::vector< double > &coeff, const std::vector< double > &poles) const
std::vector< int > VIndex
type for the index vector
CSplineBoundaryCondition plugin_type
helper typedef for plug-in handling
Abstract base class for B-spline interpolation boundary conditions.
#define NS_MIA_END
conveniance define to end the mia namespace
std::unique_ptr< CSplineBoundaryCondition > Pointer
pointer type to this boundary condition
the singleton that a plug-in handler really is
CSplineBoundaryCondition()
void filter_line(std::vector< T > &coeff, const std::vector< double > &poles) const
CSplineBoundaryCondition(const CSplineBoundaryCondition &)=delete
std::vector< double > VWeight
type for the weight vector
void template_filter_line(std::vector< T > &coeff, const std::vector< double > &poles) const
CSplineBoundaryCondition plugin_data
helper typedef for plug-in handling
The basic template of all plugin handlers.
CSplineBoundaryCondition(int width)
The base class for all plug-in created object.
Base class for all spline based interpolation kernels.
PSplineBoundaryCondition produce_spline_boundary_condition(const std::string &descr)
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
FACTORY_TRAIT(CSplineBoundaryConditionPluginHandler)
make spline boundary conditions parsable by the command line
void set_width(int width)
THandlerSingleton< TFactoryPluginHandler< CSplineBoundaryConditionPlugin > > CSplineBoundaryConditionPluginHandler
static const char *const data_descr
data portion of the plugin search path
CSplineBoundaryConditionPlugin(const char *name)
CSplineBoundaryCondition::Pointer PSplineBoundaryCondition
virtual CSplineBoundaryCondition * clone() const __attribute__((warn_unused_result))=0
This is tha base of all plugins that create "things", like filters, cost functions time step operator...