Sorted-by-time list of NI changes for a single band. More...
#include "interference-helper.h"
Classes | |
| struct | TimeLess |
| Comparator for heterogeneous lookup of entries by Time. More... | |
Public Types | |
| using | const_iterator = std::vector<value_type>::const_iterator |
| const iterator type | |
| using | iterator = std::vector<value_type>::iterator |
| iterator type | |
| using | size_type = std::size_t |
| size type | |
| using | value_type = std::pair<Time, NiChange> |
| (time, NI change) entry | |
Public Member Functions | |
| value_type & | at (size_type i) |
| Bounds-checked access the i-th entry. | |
| iterator | begin () |
| const_iterator | begin () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| template<typename... Args> | |
| iterator | emplace (Args &&... args) |
Construct a value_type from args and insert it at its sorted position. | |
| iterator | end () |
| const_iterator | end () const |
| iterator | erase (const_iterator first, const_iterator last) |
| Erase the entries in the range [first, last). | |
| iterator | insert (const value_type &v) |
| Sorted insert: the position is located via upper_bound, so entries with equal times keep their insertion order. | |
| iterator | insert (const_iterator hint, value_type value) |
| Insert at a caller-provided position (typically the result of upper_bound(t)). | |
| iterator | lower_bound (const Time &t) |
Locate the first entry with time greater than or equal to t. | |
| const_iterator | lower_bound (const Time &t) const |
Locate the first entry with time greater than or equal to t. | |
| value_type & | operator[] (size_type i) |
| Access the i-th entry. | |
| size_type | size () const |
| iterator | upper_bound (const Time &t) |
Locate the first entry with time strictly greater than t. | |
| const_iterator | upper_bound (const Time &t) const |
Locate the first entry with time strictly greater than t. | |
Private Attributes | |
| std::vector< value_type > | m_data |
| storage, kept in non-decreasing time order | |
Sorted-by-time list of NI changes for a single band.
Entries are kept in non-decreasing time order and duplicate times are allowed. The backing std::vector amortises allocations across growth; insert/erase shift the tail, which is cheap because the steady-state size is small (a handful of in-flight events per band).
Definition at line 410 of file interference-helper.h.
| using ns3::InterferenceHelper::NiChanges::const_iterator = std::vector<value_type>::const_iterator |
const iterator type
Definition at line 415 of file interference-helper.h.
| using ns3::InterferenceHelper::NiChanges::iterator = std::vector<value_type>::iterator |
iterator type
Definition at line 414 of file interference-helper.h.
| using ns3::InterferenceHelper::NiChanges::size_type = std::size_t |
size type
Definition at line 416 of file interference-helper.h.
| using ns3::InterferenceHelper::NiChanges::value_type = std::pair<Time, NiChange> |
(time, NI change) entry
Definition at line 413 of file interference-helper.h.
|
inline |
Bounds-checked access the i-th entry.
| i | the index of the entry |
Definition at line 475 of file interference-helper.h.
References m_data.
|
inline |
Definition at line 419 of file interference-helper.h.
References m_data.
Referenced by ns3::InterferenceHelper::CalculatePhyHeaderPer(), and ns3::InterferenceHelper::CalculatePhyHeaderSectionPsr().
|
inline |
Definition at line 431 of file interference-helper.h.
References m_data.
|
inline |
Definition at line 443 of file interference-helper.h.
References m_data.
Referenced by ns3::InterferenceHelper::CalculatePayloadPer().
|
inline |
Definition at line 449 of file interference-helper.h.
References m_data.
Referenced by ns3::InterferenceHelper::CalculatePayloadPer().
|
inline |
Construct a value_type from args and insert it at its sorted position.
| Args | types of the value_type constructor arguments |
| args | the value_type constructor arguments |
Definition at line 554 of file interference-helper.h.
References m_data, upper_bound(), and v.
Referenced by ns3::InterferenceHelper::CalculateNoiseInterferenceW().
|
inline |
Definition at line 425 of file interference-helper.h.
References m_data.
Referenced by ns3::InterferenceHelper::CalculatePhyHeaderSectionPsr().
|
inline |
Definition at line 437 of file interference-helper.h.
References m_data.
|
inline |
Erase the entries in the range [first, last).
| first | the first entry to erase |
| last | one past the last entry to erase |
Definition at line 567 of file interference-helper.h.
References m_data.
|
inline |
Sorted insert: the position is located via upper_bound, so entries with equal times keep their insertion order.
| v | the entry to insert |
Definition at line 540 of file interference-helper.h.
References m_data, upper_bound(), and v.
|
inline |
Insert at a caller-provided position (typically the result of upper_bound(t)).
May invalidate other iterators if the vector reallocates.
| hint | the position to insert at |
| value | the entry to insert |
Definition at line 528 of file interference-helper.h.
References m_data.
Referenced by ns3::InterferenceHelper::CalculateNoiseInterferenceW().
Locate the first entry with time greater than or equal to t.
| t | the time to search for |
t Definition at line 505 of file interference-helper.h.
References m_data.
|
inline |
Locate the first entry with time greater than or equal to t.
| t | the time to search for |
t Definition at line 515 of file interference-helper.h.
References m_data.
|
inline |
Access the i-th entry.
| i | the index of the entry |
Definition at line 465 of file interference-helper.h.
References m_data.
|
inline |
Definition at line 455 of file interference-helper.h.
References m_data.
Locate the first entry with time strictly greater than t.
| t | the time to search for |
t Definition at line 485 of file interference-helper.h.
References m_data.
Referenced by emplace(), and insert().
|
inline |
Locate the first entry with time strictly greater than t.
| t | the time to search for |
t Definition at line 495 of file interference-helper.h.
References m_data.
|
private |
storage, kept in non-decreasing time order
Definition at line 599 of file interference-helper.h.
Referenced by at(), begin(), begin(), cbegin(), cend(), emplace(), end(), end(), erase(), insert(), insert(), lower_bound(), lower_bound(), operator[](), size(), upper_bound(), and upper_bound().