latest version v1.9 - last update 10 Apr 2010 |
the parameters for the class earthMoversDistance More...
#include <ltiEarthMoversDistance.h>
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
const char * | getTypeName () const |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual functor::parameters * | clone () const |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
Public Attributes | |
matrix< W > | costMatrix |
W | epsilon |
int | maxSteps |
the parameters for the class earthMoversDistance
lti::earthMoversDistance< W, C, D >::parameters::parameters | ( | void | ) | [inline] |
default constructor
Reimplemented from lti::distanceFunctor< T >::parameters.
References lti::earthMoversDistance< W, C, D >::parameters::costMatrix, lti::earthMoversDistance< W, C, D >::parameters::epsilon, and lti::earthMoversDistance< W, C, D >::parameters::maxSteps.
Referenced by lti::earthMoversDistance< W, C, D >::parameters::clone().
lti::earthMoversDistance< W, C, D >::parameters::parameters | ( | const parameters & | other | ) | [inline] |
copy constructor
other | the parameters object to be copied |
Reimplemented from lti::distanceFunctor< T >::parameters.
References lti::earthMoversDistance< W, C, D >::parameters::copy().
lti::earthMoversDistance< W, C, D >::parameters::~parameters | ( | ) | [inline, virtual] |
destructor
Reimplemented from lti::distanceFunctor< T >::parameters.
virtual functor::parameters* lti::earthMoversDistance< W, C, D >::parameters::clone | ( | ) | const [inline, virtual] |
returns a pointer to a clone of the parameters
Reimplemented from lti::distanceFunctor< T >::parameters.
References lti::earthMoversDistance< W, C, D >::parameters::parameters().
parameters& lti::earthMoversDistance< W, C, D >::parameters::copy | ( | const parameters & | other | ) | [inline] |
copy the contents of a parameters object
other | the parameters object to be copied |
Reimplemented from lti::distanceFunctor< T >::parameters.
References lti::matrix< T >::copy(), lti::earthMoversDistance< W, C, D >::parameters::costMatrix, lti::earthMoversDistance< W, C, D >::parameters::epsilon, and lti::earthMoversDistance< W, C, D >::parameters::maxSteps.
Referenced by lti::earthMoversDistance< W, C, D >::parameters::operator=(), and lti::earthMoversDistance< W, C, D >::parameters::parameters().
const char* lti::earthMoversDistance< W, C, D >::parameters::getTypeName | ( | void | ) | const [inline, virtual] |
returns name of this type
Reimplemented from lti::distanceFunctor< T >::parameters.
parameters& lti::earthMoversDistance< W, C, D >::parameters::operator= | ( | const parameters & | other | ) | [inline] |
copy the contents of a parameters object
other | the parameters object to be copied |
References lti::earthMoversDistance< W, C, D >::parameters::copy().
virtual bool lti::earthMoversDistance< W, C, D >::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [inline, virtual] |
read the parameters from the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::distanceFunctor< T >::parameters.
References lti::earthMoversDistance< W, C, D >::parameters::costMatrix, lti::earthMoversDistance< W, C, D >::parameters::epsilon, lti::earthMoversDistance< W, C, D >::parameters::maxSteps, lti::ioHandler::readBegin(), and lti::ioHandler::readEnd().
virtual bool lti::earthMoversDistance< W, C, D >::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [inline, virtual] |
write the parameters in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::distanceFunctor< T >::parameters.
References lti::earthMoversDistance< W, C, D >::parameters::costMatrix, lti::earthMoversDistance< W, C, D >::parameters::epsilon, lti::earthMoversDistance< W, C, D >::parameters::maxSteps, lti::ioHandler::writeBegin(), and lti::ioHandler::writeEnd().
matrix<W> lti::earthMoversDistance< W, C, D >::parameters::costMatrix |
Usually the template type D (for distance) of the earthMoversDistance is used to calculate the ground distance.
For some data type, espacially when comparing feature vectors, it is difficult to find a distance measure which describes the knowledge of relationship between the elements of the feature vector correctly. For these cases give the costMatrix explicitly here. The ground distance measure will be disregarded for the calculations. Note that for distances between vectors or matrices of weights the diagonal is usually 0 (no cost to move weight between equal indices). Default empty.
Referenced by lti::earthMoversDistance< W, C, D >::parameters::copy(), lti::earthMoversDistance< W, C, D >::parameters::parameters(), lti::earthMoversDistance< W, C, D >::parameters::read(), and lti::earthMoversDistance< W, C, D >::parameters::write().
W lti::earthMoversDistance< W, C, D >::parameters::epsilon |
A small value which is equal to the accepted rounding error per operation.
Default 1E-6.
Referenced by lti::earthMoversDistance< W, C, D >::parameters::copy(), lti::earthMoversDistance< W, C, D >::parameters::parameters(), lti::earthMoversDistance< W, C, D >::parameters::read(), and lti::earthMoversDistance< W, C, D >::parameters::write().
int lti::earthMoversDistance< W, C, D >::parameters::maxSteps |
maximum number of steps to find the optimal flow with the least cost.
Default 500.
Referenced by lti::earthMoversDistance< W, C, D >::parameters::copy(), lti::earthMoversDistance< W, C, D >::parameters::parameters(), lti::earthMoversDistance< W, C, D >::parameters::read(), and lti::earthMoversDistance< W, C, D >::parameters::write().