OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
ev::Queue_< T > Class Template Reference

This class extends std::queue to implement event queues. For more information, please refer here. More...

#include <queue.hpp>

Inheritance diagram for ev::Queue_< T >:

Public Member Functions

template<std::size_t N>
void push (const Array_< T, N > &array)
 Push elements from an array of events.
 
void push (const Vector_< T > &vector)
 Push elements from a vector of events.
 
double duration () const
 Time difference between the last and the first event in the queue.
 
double rate () const
 Compute event rate as the ratio between the number of events and the time difference between the last and the first event in the queue.
 
double midTime () const
 Calculate the midpoint time between the oldest and the newest event.
 

Detailed Description

template<typename T>
class ev::Queue_< T >

This class extends std::queue to implement event queues. For more information, please refer here.

Event queues inherit all the properties from standard C++ queues. Events queues are FIFO data structures not intended to be directly iterated.

Member Function Documentation

◆ duration()

template<typename T >
double ev::Queue_< T >::duration ( ) const
inlinenodiscard

Time difference between the last and the first event in the queue.

Returns
Time difference

◆ midTime()

template<typename T >
double ev::Queue_< T >::midTime ( ) const
inlinenodiscard

Calculate the midpoint time between the oldest and the newest event.

Returns
Midpoint time.

◆ push() [1/2]

template<typename T >
template<std::size_t N>
void ev::Queue_< T >::push ( const Array_< T, N > & array)
inline

Push elements from an array of events.

Parameters
arrayEvent array to push

◆ push() [2/2]

template<typename T >
void ev::Queue_< T >::push ( const Vector_< T > & vector)
inline

Push elements from a vector of events.

Parameters
vectorEvent vector to push

◆ rate()

template<typename T >
double ev::Queue_< T >::rate ( ) const
inlinenodiscard

Compute event rate as the ratio between the number of events and the time difference between the last and the first event in the queue.

Returns
Event rate

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