21#ifndef mia_core_cost_hh
22#define mia_core_cost_hh
30# define EXPORT_HANDLER __declspec(dllimport)
32# define EXPORT_HANDLER
63template <
typename T,
typename V>
94 double value(
const T& src)
const;
114 virtual double do_value(
const T& a,
const T& b)
const = 0;
115 virtual double do_evaluate_force(
const T& a,
const T& b, V& force)
const = 0;
116 virtual void post_set_reference(
const T& ref);
The base class for all plug-in created object.
The generic cost function interface.
V Force
typedef for generic programming: The gradient forca type create by the cost function
void set_reference(const T &ref)
cost_type plugin_type
plugin searchpath helper type
double value(const T &src) const
TRefHolder< T > RData
Const reference holder TRefHolder of the cost function data.
virtual ~TCost()
ensure virtual destruction, since we have virtual functions
RData::Pointer PData
Pointer to const reference holder TRefHolder of the cost function data.
double evaluate_force(const T &src, V &force) const
T plugin_data
plugin searchpath helper type
T Data
typedef for generic programming: The data type used by the cost function
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