4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
16 Stupid Prioq. Should use Lists and STL.
17 Smallest is put at the front.
20 template<class V
, class I
>
24 Array
<I
> indices_arr_
;
26 void enter(V v
, I idx
) {
28 for (; j
< value_arr_
.size(); j
++)
29 if (indices_arr_
[j
] > idx
)
32 value_arr_
.insert(v
, j
);
33 indices_arr_
.insert(idx
, j
);
35 int size() { return value_arr_
.size(); }
36 V
front_val() { return value_arr_
[0]; }
37 I
front_idx() { return indices_arr_
[0]; }
39 V retval
= front_val();