Project: engagement_recognition

License: BSD

Dependencies:

Used by: None

All Packages

Duration Class Reference

#include <duration.h>

List of all members.

Public Member Functions

 Duration ()
void event (unsigned long duration)
unsigned long getMax ()
unsigned long getMean ()
void reset ()

Private Attributes

unsigned long max_
unsigned long number_
unsigned long total_

Detailed Description

This class implements the concept of keeping track of a mean and max duration of an event. It keeps track of the total time of the event, as well as the number of events that have occurred.

Author:
Brett Ponsler (bponsler (at) wpi (dot) edu)

Definition at line 45 of file duration.h.


Constructor & Destructor Documentation

Duration::Duration (  ) 

The default constructor for the Duration class.

Definition at line 37 of file duration.cpp.


Member Function Documentation

void Duration::event ( unsigned long  duration  ) 

An event has occurred with a specific duration.

Parameters:
duration The duration of the event.

Definition at line 52 of file duration.cpp.

unsigned long Duration::getMax (  ) 

Return the maximum duration.

Returns:
The maximum duration

Definition at line 78 of file duration.cpp.

unsigned long Duration::getMean (  ) 

Return the mean duration.

Returns:
The mean duration

Definition at line 65 of file duration.cpp.

void Duration::reset (  ) 

Reset the Duration.

Definition at line 43 of file duration.cpp.


Member Data Documentation

unsigned long Duration::max_ [private]

The maximum duration of the events.

Definition at line 49 of file duration.h.

unsigned long Duration::number_ [private]

The number of events that have occurred.

Definition at line 53 of file duration.h.

unsigned long Duration::total_ [private]

The total duration of the events.

Definition at line 51 of file duration.h.


The documentation for this class was generated from the following files:
  • engagement_recognition/src/recognition/statistics/duration.h
  • engagement_recognition/src/recognition/statistics/duration.cpp

engagement_recognition
Author(s): Brett Ponsler (bponsler (at) wpi (dot) edu)
autogenerated on Fri Sep 9 10:35:49 2011