![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/ErrorFunction.h>
Interface for an error function returning one or multiple values. More...
Interface for an error function returning one or multiple values.
Public Member Functions | |
virtual void | evaluateError (std::vector< double > &out)=0 |
Evaluate the error function. | |
virtual double | penalize (double cost, const std::vector< double > &error) |
Optionally override this method to penalize a cost function based on the error function result. | |
Static penalty tool methods that are useful elsewhere | |
static double | errorToMultPenalty (double value, double range) |
There is a margin of half the range within which the returned penalty value fades from 1 to 0 with a polynomial function, and extents below zero after 1.5x range, and is continuous in the derivative. | |
static double | errorsToMultPenalty (const std::vector< double > &error, const std::vector< double > &range) |
Return a number of error values to a combined penalty function, while properly housekeeping values < 0. | |
|
pure virtual |
Evaluate the error function.
An implementation of this method shall resize the out array and store some values in there, based on the most recent evaluation of a cost function associated with it.
Implemented in PointCorr, SweepGlobalInitAlgorithm, and SweepPointCorrAlgorithm.
|
inlinevirtual |
Optionally override this method to penalize a cost function based on the error function result.
Reimplemented in SweepGlobalInitAlgorithm, and SweepPointCorrAlgorithm.
|
static |
There is a margin of half the range within which the returned penalty value fades from 1 to 0 with a polynomial function, and extents below zero after 1.5x range, and is continuous in the derivative.
Convert error value to a multiplicative penalty value, returning a value < 1 if the range is exceeded
|
static |
Return a number of error values to a combined penalty function, while properly housekeeping values < 0.
If one or more of the error values would result in a negative penalty, those values are added up and the remaining positive ones ignored; all positive ones are multiplied together.