Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Member Functions
pcl::EventFrequency Class Reference

A helper class to measure frequency of a certain event. More...

#include <pcl/common/time.h>

Public Member Functions

 EventFrequency (size_t window_size=30)
 Constructor. More...
 
void event ()
 Notifies the class that the event occurred. More...
 
double getFrequency () const
 Retrieve the estimated frequency. More...
 
void reset ()
 Reset frequency computation. More...
 

Detailed Description

A helper class to measure frequency of a certain event.

To use this class create an instance and call event() function every time the event in question occurs. The estimated frequency can be retrieved with getFrequency() function.

Author
Sergey Alexandrov

Definition at line 137 of file time.h.

Constructor & Destructor Documentation

pcl::EventFrequency::EventFrequency ( size_t  window_size = 30)
inline

Constructor.

Parameters
[in]window_sizenumber of most recent events that are considered in frequency estimation (default: 30)

Definition at line 146 of file time.h.

Member Function Documentation

void pcl::EventFrequency::event ( )
inline

Notifies the class that the event occurred.

Definition at line 153 of file time.h.

double pcl::EventFrequency::getFrequency ( ) const
inline

Retrieve the estimated frequency.

Definition at line 162 of file time.h.

void pcl::EventFrequency::reset ( )
inline

Reset frequency computation.

Definition at line 171 of file time.h.


The documentation for this class was generated from the following file: