#include <VAPoints.h>
Collaboration diagram for VAPoints:
Public Types | |
enum | { MIN_HEIGHT_FOR_MAX_VALIDITY = 4 } |
minimum height of maximum to get maximal validity More... | |
enum | { GRID_SPACING = 100 } |
The space between grid points. More... | |
enum | { NUMBER_OF_GRID_POINTS_X = (xPosFrontFlags - xPosBackFlags) / GRID_SPACING } |
The number of grid points in x-direction. More... | |
enum | { NUMBER_OF_GRID_POINTS_Y = (yPosLeftFlags - yPosRightFlags) / GRID_SPACING } |
The number of grid points in y-direction. More... | |
enum | { FADE_OUT_TIME2 = 6000 } |
Public Member Functions | |
VAPoints (int numberOfVAPoints=100, int numberOfMaxima=4) | |
Constructor. | |
~VAPoints () | |
Destructor. | |
void | addPoint (int x, int y, double validity, unsigned long timestamp) |
Adds a point to the set, if necessary an old point is overwritten. | |
int | findInsertPos () |
Returns the index of the next position in the set, where a point can be added/set. | |
void | searchMaxima () |
Searches maxima of points on the field. | |
bool | getMaximum (int index, int &x_position, int &y_position, double &validity) |
Gets the position of a maximum and stores the coordinates in x_position and y_position. | |
void | pointsToField () |
Adds the points to the field. | |
void | updateGridByPoint (int xPos, int yPos, double relevance) |
Updates the grid with one point. | |
void | incrementGridPoint (int xIndex, int yIndex, double increment) |
Increments a value in the grid. | |
void | getGridIndices (int xPos, int yPos, int &xIndex, int &yIndex) |
Get indices of the grid for positions on the field. | |
void | getFieldPoints (int xIndex, int yIndex, int &xPos, int &yPos) |
Get positions on the field for indices of the grid. | |
bool | isLokMax (int xIndex, int yIndex) |
Tests if the specified grid point is a lokal maxima. | |
Public Attributes | |
VAPoint * | points |
The Set of Points. | |
int | numberOfVAPoints |
The number of points in the set. | |
double | field [NUMBER_OF_GRID_POINTS_X][NUMBER_OF_GRID_POINTS_Y] |
The grid representing the field. | |
Maximum * | maxima |
The maxima on field. | |
int | numberOfMaxima |
Number of maxima on field. | |
unsigned long | timeOfLastMaximaSearch |
Definition at line 69 of file VAPoints.h.
|
minimum height of maximum to get maximal validity
Definition at line 74 of file VAPoints.h. |
|
The space between grid points.
Definition at line 76 of file VAPoints.h. |
|
The number of grid points in x-direction.
Definition at line 78 of file VAPoints.h. |
|
The number of grid points in y-direction.
Definition at line 80 of file VAPoints.h. |
|
Definition at line 82 of file VAPoints.h. |
|
Constructor.
Definition at line 20 of file VAPoints.cpp. References SystemCall::getCurrentSystemTime(), maxima, VAPoint::relevance, and timeOfLastMaximaSearch. |
Here is the call graph for this function:
|
Destructor.
Definition at line 46 of file VAPoints.cpp. References maxima. |
|
Adds a point to the set, if necessary an old point is overwritten.
Definition at line 52 of file VAPoints.cpp. References FADE_OUT_TIME2, SystemCall::getTimeSince(), and updateGridByPoint(). Referenced by GT2004PlayersLocator::addOppPlayerPercepts(), GT2004PlayersLocator::addOwnPlayerPercepts(), and GT2004PlayersLocator::execute(). |
Here is the call graph for this function:
|
Returns the index of the next position in the set, where a point can be added/set.
Definition at line 75 of file VAPoints.cpp. References VAPoint::getRelevance(), and numberOfVAPoints. |
Here is the call graph for this function:
|
Searches maxima of points on the field.
Definition at line 93 of file VAPoints.cpp. References FADE_OUT_TIME2, SystemCall::getCurrentSystemTime(), SystemCall::getTimeSince(), Maximum::height, isLokMax(), maxima, MIN_HEIGHT_FOR_MAX_VALIDITY, numberOfMaxima, timeOfLastMaximaSearch, Maximum::x, and Maximum::y. Referenced by GT2004PlayersLocator::execute(). |
Here is the call graph for this function:
|
Gets the position of a maximum and stores the coordinates in x_position and y_position. The parameter index is limited. If no maximum with that index exists, the return value is false.
Definition at line 179 of file VAPoints.cpp. References getFieldPoints(), Maximum::height, maxima, MIN_HEIGHT_FOR_MAX_VALIDITY, and numberOfMaxima. Referenced by GT2004PlayersLocator::execute(). |
Here is the call graph for this function:
|
Adds the points to the field.
Definition at line 202 of file VAPoints.cpp. References numberOfVAPoints, and updateGridByPoint(). |
Here is the call graph for this function:
|
Updates the grid with one point.
Definition at line 221 of file VAPoints.cpp. References GAUSS0, getGridIndices(), and incrementGridPoint(). Referenced by addPoint(), and pointsToField(). |
Here is the call graph for this function:
|
Increments a value in the grid.
Definition at line 310 of file VAPoints.cpp. References MIN_HEIGHT_FOR_MAX_VALIDITY. Referenced by updateGridByPoint(). |
|
Get indices of the grid for positions on the field.
Definition at line 322 of file VAPoints.cpp. Referenced by updateGridByPoint(). |
|
Get positions on the field for indices of the grid.
Definition at line 339 of file VAPoints.cpp. Referenced by getMaximum(). |
|
Tests if the specified grid point is a lokal maxima.
Definition at line 345 of file VAPoints.cpp. Referenced by searchMaxima(). |
|
The Set of Points.
Definition at line 171 of file VAPoints.h. Referenced by operator<<(), and operator>>(). |
|
The number of points in the set.
Definition at line 173 of file VAPoints.h. Referenced by findInsertPos(), operator<<(), operator>>(), and pointsToField(). |
|
The grid representing the field.
Definition at line 176 of file VAPoints.h. |
|
The maxima on field.
Definition at line 178 of file VAPoints.h. Referenced by getMaximum(), searchMaxima(), VAPoints(), and ~VAPoints(). |
|
Number of maxima on field.
Definition at line 180 of file VAPoints.h. Referenced by getMaximum(), and searchMaxima(). |
|
Definition at line 182 of file VAPoints.h. Referenced by searchMaxima(), and VAPoints(). |