// PushFirst adds a new event to the heap with a given rank. It will be out
// before other events of same rank previously queued.
PushFirst adds a new event to the heap with a given rank. It will be out
before other events of same rank previously queued.
// PushFirst adds a new event to the heap with a given rank . It will be out // before other events of same rank previously queued .
func (eq *EventQueue) PushFirst(ev Event, rank int) {
	evr := event{Event: ev, Rank: rank, Idx: eq.Min}
	eq.Min--
	heap.Push(eq.Queue, evr)
	if eq.Min-1 > 0 {
		eq.Filter(func(ev Event) bool { return true })
	}
}
func ( eq * EventQueue ) PushFirst ( ev Event , rank int ) { evr := event { Event : ev , Rank : rank , Idx : eq . Min } eq . Min -- heap . Push ( eq . Queue , evr ) if eq . Min - 1 > 0 { eq . Filter ( func ( ev Event ) bool { return true } ) } }
PushFirst adds a new event to the heap with a given rank.
PushFirst adds a new event to the heap with a given rank .
// should not happen in practical situations