Abstract 2D function. More...
#include <AbstractFunction2.h>
Public Member Functions | |
AbstractFunction2 () | |
virtual void | initGrid (int n) |
virtual void | initGrid (double x, double y, int index) |
virtual double | value (double x, double y) const =0 |
virtual double | value (double x, double y, int index) const |
virtual | ~AbstractFunction2 () |
Abstract 2D function.
This function is used by GridSearch, ConcentricSearch and DirectionalSearch. Values are required for gridded (x,y) couples and for free couples. For gridded couples, computation of values can be cached.
QGpCoreTools::AbstractFunction2::AbstractFunction2 | ( | ) | [inline] |
{}
virtual QGpCoreTools::AbstractFunction2::~AbstractFunction2 | ( | ) | [inline, virtual] |
{}
void QGpCoreTools::AbstractFunction2::initGrid | ( | int | n | ) | [inline, virtual] |
Re-implemement if the computation of value(double x, double y) requires caching for gridded couples (x,y). n is the total number of grid points: nx*ny
Reimplemented in ArrayCore::FK, PhaseShifter, PhaseShifter, and ArrayCore::FKHorizontal.
Referenced by QGpCoreTools::DirectionalSearch::setGrid(), and QGpCoreTools::GridSearch::setGrid().
{Q_UNUSED(n);}
void QGpCoreTools::AbstractFunction2::initGrid | ( | double | x, |
double | y, | ||
int | index | ||
) | [inline, virtual] |
Re-implemement if the computation of value(double x, double y) requires caching for gridded couples (x,y). This fonction initialize the cached values for x and y aligned to a grid and corresponding to index.
Reimplemented in ArrayCore::FK, PhaseShifter, PhaseShifter, and ArrayCore::FKHorizontal.
{Q_UNUSED(x); Q_UNUSED(y); Q_UNUSED(index);}
double QGpCoreTools::AbstractFunction2::value | ( | double | x, |
double | y | ||
) | const [pure virtual] |
Implemement this function to calculate the 2D function at x and y.
Implemented in ArrayCore::FK, FKArrayMap, QGpCoreWave::LoveFunction, QGpCoreWave::RayleighFunction, PhaseShifter, PhaseShifter, ArrayCore::HRFK, ArrayCore::FKHorizontal, T0Correlation, and QGpCoreWave::TheoreticalFK.
Referenced by QGpCoreTools::DirectionalSearch::globalMax(), QGpCoreTools::GridSearch::globalMax(), QGpCoreTools::DirectionalSearch::localMax(), and QGpCoreTools::GridSearch::localMax().
double QGpCoreTools::AbstractFunction2::value | ( | double | x, |
double | y, | ||
int | index | ||
) | const [inline, virtual] |
Re-mplemement this function to calculate the 2D function for x and y aligned to a grid. x and y correspond to index in the grid: index=iy * nx + ix
If nothing is cached re-implementation of this function is useless.
Reimplemented in ArrayCore::FK, PhaseShifter, PhaseShifter, ArrayCore::HRFK, ArrayCore::FKHorizontal, and T0Correlation.
References value().
Referenced by value().
{Q_UNUSED(index); return value(x, y);}