38 template<
typename Key,
typename Value>
39 class MinHeap :
public std::vector<std::pair<Key,Value> >
43 bool IsEmpty()
const {
return this->empty(); }
49 this->resize(this->size()+1);
56 if(k < (*
this)[pos-1].first)
107 int Step(
bool &untilCoreStepFinished);
124 void SetTraceModeForAllMembers(
int trace_on);
128 void ResetClock(
void);
SystemClockOffset GetCurrentTime() const
Returns the current simulation time.
bool ContainsValue(Value v) const
void IncrTime(SystemClockOffset of)
Increments the current simulation time with a offset.
MinHeap< SystemClockOffset, SimulationMember * > syncMembers
earliest first
long long SystemClockOffset
void InsertInternal(Key k, Value v, unsigned pos)
Key GetMinimumKey() const
void RemoveAtPositionAndInsert(Key k, Value v, unsigned pos)
void SetCurrentTime(SystemClockOffset of)
Set the simulation time to a dedicated value.
SystemClockOffset currentTime
time in [ns] since start of simulation
void RemoveMinimumAndInsert(Key k, Value v)
std::vector< SimulationMember * > asyncMembers
List of asynchron working simulation members, will be called every step!
Class to store and manage the central simulation time.
void Insert(Key k, Value v)
Value GetMinimumValue() const
void RemoveAtPositionAndInsertInternal(Key k, Value v, unsigned pos)