Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES > Class Template Reference

The class realizes a table of template poses. More...

#include <LinesTables2005.h>

Inheritance diagram for LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >:

Inheritance graph
[legend]
Collaboration diagram for LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void create (const Field &field, LinesPercept::LineType type)
 The function creates the table.

Pose2D sample (double realDist) const
 The function draws a pose from the templates for a certain distance.

void write (Out &stream) const
 The function writes the contents of an object to a stream.

void read (In &stream)
 The function reads the contents of an object from a stream.


Private Types

enum  { DISTANCE_MAX = 650 }

Static Private Member Functions

int compare (const Temp *t1, const Temp *t2)
 The function is required for sorting the template poses.


Private Attributes

char templates [TEMPLATES_MAX][3]
 The template poses sorted by distance.

unsigned short distance [DISTANCE_MAX+1]
 Indices into the template table depending on the distance.


Detailed Description

template<int TEMPLATES_MAX, int POINT_RES>
class LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >

The class realizes a table of template poses.

Definition at line 143 of file LinesTables2005.h.


Member Enumeration Documentation

template<int TEMPLATES_MAX, int POINT_RES>
anonymous enum [private]
 

Enumeration values:
DISTANCE_MAX  The number of distances.

Definition at line 155 of file LinesTables2005.h.


Member Function Documentation

template<int TEMPLATES_MAX, int POINT_RES>
int LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::compare const Temp t1,
const Temp t2
[inline, static, private]
 

The function is required for sorting the template poses.

It is used as compare function for qsort.

Parameters:
t1 The first element to compare.
t2 The second element to compare.
Returns:
-1, 0, or 1 according to the specification required by qsort.

Definition at line 174 of file LinesTables2005.h.

References LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::Temp::distance.

template<int TEMPLATES_MAX, int POINT_RES>
void LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::create const Field field,
LinesPercept::LineType  type
[inline]
 

The function creates the table.

It must be called for construction.

Parameters:
field The field.
type The line type the table will be constructed for.

Definition at line 186 of file LinesTables2005.h.

References LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::Temp::distance, Field::getDistance(), pi, and Field::randomPose().

Here is the call graph for this function:

template<int TEMPLATES_MAX, int POINT_RES>
Pose2D LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::sample double  realDist  )  const [inline]
 

The function draws a pose from the templates for a certain distance.

Parameters:
realDist The distance in which a line starting from the pose should cut the closest field line.
Returns:
A pose drawn from the table.

Definition at line 233 of file LinesTables2005.h.

References pi, and random().

Here is the call graph for this function:

template<int TEMPLATES_MAX, int POINT_RES>
void LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::write Out stream  )  const [inline, virtual]
 

The function writes the contents of an object to a stream.

Parameters:
stream The stream the data is written to.

Implements LinesTables2005::TemplateTableBase.

Definition at line 246 of file LinesTables2005.h.

References Out::write().

Here is the call graph for this function:

template<int TEMPLATES_MAX, int POINT_RES>
void LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::read In stream  )  [inline, virtual]
 

The function reads the contents of an object from a stream.

Parameters:
stream The stream the data is read from.

Implements LinesTables2005::TemplateTableBase.

Definition at line 252 of file LinesTables2005.h.

References In::read().

Here is the call graph for this function:


Member Data Documentation

template<int TEMPLATES_MAX, int POINT_RES>
char LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::templates[TEMPLATES_MAX][3] [private]
 

The template poses sorted by distance.

Definition at line 164 of file LinesTables2005.h.

template<int TEMPLATES_MAX, int POINT_RES>
unsigned short LinesTables2005::TemplateTable< TEMPLATES_MAX, POINT_RES >::distance[DISTANCE_MAX + 1] [private]
 

Indices into the template table depending on the distance.

Definition at line 165 of file LinesTables2005.h.


The documentation for this class was generated from the following file:
Generated on Mon Mar 20 22:17:27 2006 for GT2005 by doxygen 1.3.6