21 #ifndef mia_template_masked_cost_hh
22 #define mia_template_masked_cost_hh
28 #ifndef EXPORT_HANDLER
30 # define EXPORT_HANDLER __declspec(dllimport)
32 # define EXPORT_HANDLER
63 template <
typename T,
typename M,
typename V>
98 double value(
const T& mov,
const M& mask)
const;
118 virtual double do_value(
const T& a,
const T& b,
const M& mask)
const = 0;
119 virtual double do_evaluate_force(
const T& a,
const T& b,
const M& mask, V& force)
const = 0;
120 virtual void post_set_reference(
const T& ref);
The base class for all plug-in created object.
The generic cost function interface.
void set_reference(const T &ref)
double value(const T &mov, const M &mask) const
masked_cost_type plugin_type
plugin searchpath helper type
V Force
typedef for generic programming: The gradient forca type create by the cost function
T plugin_data
plugin searchpath helper type
M Mask
typedef for generic programming: The data type used by the cost function
T Data
typedef for generic programming: The data type used by the cost function
virtual ~TMaskedCost()
ensure virtual destruction, since we have virtual functions
TRefHolder< T > RData
Const reference holder TRefHolder of the cost function data.
RData::Pointer PData
Pointer to const reference holder TRefHolder of the cost function data.
double evaluate_force(const T &mov, const M &mask, V &force) const
A class to make a const reference not so const.
std::shared_ptr< TRefHolder< T > > Pointer
pointer type of this reference holder.
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
#define NS_MIA_END
conveniance define to end the mia namespace
static const char * type_descr
plugin path helper variable