lobot::PointList Class Reference

A container for storing lists of points. More...

#include <Robots/LoBot/metlog/LoPointList.H>

Collaboration diagram for lobot::PointList:
Collaboration graph
[legend]

List of all members.

Public Types

typedef List::const_reference const_reference
typedef List::const_iterator iterator

Public Member Functions

 PointList (int n=0)
void add (int x, int y)
PointListoperator+= (const PointList &)
 This operator appends the given point list to this one.
int size () const
bool empty () const
 This method checks if the point list has anything in it or not.
void clear ()
 This function deletes all the entries in the point list.
PointList find_correspondences (const PointList &P) const

iterator begin () const
iterator end () const

Detailed Description

A container for storing lists of points.

This class provides a convenient API for storing a list of points and performing some useful operations such as finding correspondences between two point lists. Additionally, though it is named PointList, it, in fact, behaves like a set, i.e., each point appears only once in the list. Thus, attempts to add duplicate points will be silently ignored.

Definition at line 79 of file LoPointList.H.


Member Typedef Documentation

typedef List::const_reference lobot::PointList::const_reference

These types are defined for STL compatibility and to allow this class to be used directly in STL algorithms.

Definition at line 111 of file LoPointList.H.


Constructor & Destructor Documentation

lobot::PointList::PointList ( int  n = 0  ) 

Initalization: creates a point list with enough memory to initially store the specified number of points. If this memory fills up, not to worry, extra memory will be automagically acquired.

Definition at line 62 of file LoPointList.C.


Member Function Documentation

void lobot::PointList::add ( int  x,
int  y 
)

This method adds a point to the point list. If the point already appears in the list, it will not be added a second time. Thus, this point list actually is a point set.

Definition at line 70 of file LoPointList.C.

Referenced by lobot::Experiment::add_trajectory(), and lobot::PointMatrix::average().

iterator lobot::PointList::begin (  )  const [inline]

These functions allow clients to walk through the point list using STL algorithms.

Definition at line 118 of file LoPointList.H.

Referenced by lobot::PointMatrix::add().

void lobot::PointList::clear (  )  [inline]

This function deletes all the entries in the point list.

Definition at line 123 of file LoPointList.H.

bool lobot::PointList::empty (  )  const [inline]

This method checks if the point list has anything in it or not.

Definition at line 106 of file LoPointList.H.

PointList lobot::PointList::find_correspondences ( const PointList P  )  const

For each point in this point list, find the closest point in the given point list P and return the resulting point list.

NOTE: If either this point list or the other point list is empty, this function will throw a lobot::misc_error with LOGIC_ERROR as the code.

Definition at line 104 of file LoPointList.C.

References transform().

PointList & lobot::PointList::operator+= ( const PointList L  ) 

This operator appends the given point list to this one.

Definition at line 78 of file LoPointList.C.

int lobot::PointList::size (  )  const [inline]

This method returns the number of points stored in this point list.

Definition at line 103 of file LoPointList.H.

Referenced by lobot::Experiment::trajectory_size().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:30:42 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3