Lines Matching refs:min_heap_t
43 } min_heap_t; typedef
45 static inline void min_heap_ctor_(min_heap_t* s);
46 static inline void min_heap_dtor_(min_heap_t* s);
49 static inline int min_heap_empty_(min_heap_t* s);
50 static inline unsigned min_heap_size_(min_heap_t* s);
51 static inline struct event* min_heap_top_(min_heap_t* s);
52 static inline int min_heap_reserve_(min_heap_t* s, unsigned n);
53 static inline int min_heap_push_(min_heap_t* s, struct event* e);
54 static inline struct event* min_heap_pop_(min_heap_t* s);
55 static inline int min_heap_adjust_(min_heap_t *s, struct event* e);
56 static inline int min_heap_erase_(min_heap_t* s, struct event* e);
57 static inline void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e);
58 static inline void min_heap_shift_up_unconditional_(min_heap_t* s, unsigned hole_index, struct…
59 static inline void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e);
64 void min_heap_ctor_(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; } in min_heap_ctor_()
65 void min_heap_dtor_(min_heap_t* s) { if (s->p) mm_free(s->p); } in min_heap_dtor_()
67 int min_heap_empty_(min_heap_t* s) { return 0u == s->n; } in min_heap_empty_()
68 unsigned min_heap_size_(min_heap_t* s) { return s->n; } in min_heap_size_()
69 struct event* min_heap_top_(min_heap_t* s) { return s->n ? *s->p : 0; } in min_heap_top_()
71 int min_heap_push_(min_heap_t* s, struct event* e) in min_heap_push_()
79 struct event* min_heap_pop_(min_heap_t* s) in min_heap_pop_()
96 int min_heap_erase_(min_heap_t* s, struct event* e) in min_heap_erase_()
117 int min_heap_adjust_(min_heap_t *s, struct event *e) in min_heap_adjust_()
133 int min_heap_reserve_(min_heap_t* s, unsigned n) in min_heap_reserve_()
149 void min_heap_shift_up_unconditional_(min_heap_t* s, unsigned hole_index, struct event* e) in min_heap_shift_up_unconditional_()
161 void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e) in min_heap_shift_up_()
173 void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e) in min_heap_shift_down_()