FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
core::EventComparator Struct Reference

A custom comparator for the event priority queue. More...

#include "sim_events.h"

Public Member Functions

bool operator() (const Event &a, const Event &b) const noexcept
 Compares two events based on their timestamps.
 

Detailed Description

A custom comparator for the event priority queue.

This comparator creates a min-heap, ensuring that the event with the smallest timestamp is always at the top of the queue.

Definition at line 56 of file sim_events.h.

Member Function Documentation

◆ operator()()

bool core::EventComparator::operator() ( const Event a,
const Event b 
) const
noexcept

Compares two events based on their timestamps.

Parameters
aThe first event.
bThe second event.
Returns
True if event 'a' should occur after event 'b'.

Definition at line 64 of file sim_events.h.

64{ return a.timestamp > b.timestamp; }

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