|
AntHocNet 2.0.0
Paper-faithful ant-colony ad hoc routing: the shared core and its adapters
|
#include <anthocnet/core/ant_history.h>
Public Member Functions | |
| AntHistoryTracker (std::size_t maxEntries) | |
| maxEntries == 0 means unbounded. | |
| bool | record (NodeAddress src, std::uint32_t seqNum) |
| Record (src, seq). | |
| bool | seen (NodeAddress src, std::uint32_t seqNum) const |
| Read-only membership test. | |
| std::size_t | size () const |
| void | clear () |
Definition at line 27 of file ant_history.h.
|
inlineexplicit |
maxEntries == 0 means unbounded.
Definition at line 30 of file ant_history.h.
| bool anthocnet::core::AntHistoryTracker::record | ( | NodeAddress | src, |
| std::uint32_t | seqNum | ||
| ) |
Record (src, seq).
Returns true if it was new, false if already seen (i.e. a looping/duplicate ant that should be dropped).
| bool anthocnet::core::AntHistoryTracker::seen | ( | NodeAddress | src, |
| std::uint32_t | seqNum | ||
| ) | const |
Read-only membership test.
|
inline |
Definition at line 39 of file ant_history.h.
| void anthocnet::core::AntHistoryTracker::clear | ( | ) |