The generic cost function interface. More...
#include <mia/core/cost.hh>
Public Types | |
typedef T | Data |
typedef for generic programming: The data type used by the cost function More... | |
typedef V | Force |
typedef for generic programming: The gradient forca type create by the cost function More... | |
typedef RData::Pointer | PData |
Pointer to const reference holder TRefHolder of the cost function data. More... | |
typedef T | plugin_data |
plugin searchpath helper type More... | |
typedef cost_type | plugin_type |
plugin searchpath helper type More... | |
typedef TRefHolder< T > | RData |
Const reference holder TRefHolder of the cost function data. More... | |
Public Types inherited from CPropertyFlagHolder | |
typedef std::set< const char * > | Set |
define the type of the set of flags More... | |
Public Member Functions | |
double | evaluate_force (const T &src, V &force) const |
void | set_reference (const T &ref) |
double | value (const T &src) const |
virtual | ~TCost () |
ensure virtual destruction, since we have virtual functions More... | |
Public Member Functions inherited from CProductBase | |
const char * | get_init_string () const |
void | set_init_string (const char *init) |
void | set_module (PPluginModule module) |
Public Member Functions inherited from CPropertyFlagHolder | |
void | add (const char *property) |
Set | get_missing_properties (const CPropertyFlagHolder &testset) const |
bool | has (const char *property) const |
bool | has_all_in (const CPropertyFlagHolder &testset) const |
virtual | ~CPropertyFlagHolder () |
The generic cost function interface.
The class defines an abstract interface for a cost function between two entities of the same type. The pure virtual functions -double do_value(const T& a, const T& b) const, and -double do_evaluate_force(const T& a, const T& b, float scale, V& force) const have to be implemented in the derived class to make it a real cost function. The virtual function
T | the data type of the objects that the cost evaluation is based on |
V | the type of the gradient force field created by this cost function |
Definition at line 64 of file core/cost.hh.
typedef for generic programming: The data type used by the cost function
Definition at line 67 of file core/cost.hh.
typedef for generic programming: The gradient forca type create by the cost function
Definition at line 70 of file core/cost.hh.
typedef RData::Pointer TCost< T, V >::PData |
Pointer to const reference holder TRefHolder of the cost function data.
Definition at line 76 of file core/cost.hh.
typedef T TCost< T, V >::plugin_data |
plugin searchpath helper type
Definition at line 79 of file core/cost.hh.
typedef cost_type TCost< T, V >::plugin_type |
plugin searchpath helper type
Definition at line 82 of file core/cost.hh.
typedef TRefHolder<T> TCost< T, V >::RData |
Const reference holder TRefHolder of the cost function data.
Definition at line 73 of file core/cost.hh.
ensure virtual destruction, since we have virtual functions
double TCost< T, V >::evaluate_force | ( | const T & | src, |
V & | force | ||
) | const |
Evaluate the value of the cost function and its gradient with respect to the given src image and the reference that was set by calling set_reference(const T& ref).
src | ||
[out] | force | gradient force |
void TCost< T, V >::set_reference | ( | const T & | ref | ) |
Set the new reference of the cost function. The virtual private function post_set_reference(const T& ref) is then called to run possible preparations on the reference image.
double TCost< T, V >::value | ( | const T & | src | ) | const |
Evaluate the value of the cost function petreen the given src image and the reference that was set by calling set_reference(const T& ref).
src |