ar-vinyeard compiles and runs:
- ar-function-kernel uses int for sign rather than bool in sign_at
- switched to dealing with a single functions themselves in value_at
- order of thresholds is handled correctly in ar-vineyard (max is the last one)
#include <utilities/eventqueue.h>
#include <functional>
#include <iostream>
int main()
{
typedef EventQueue<int, std::less<int> > EQ;
typedef EQ::iterator iterator;
EQ queue;
iterator i = queue.push(4);
queue.push(2);
queue.push(7);
iterator j = queue.push(6);
queue.push(5);
*i = 8;
queue.update(i);
queue.remove(j);
while (!queue.empty())
{
std::cout << *queue.top() << std::endl;
queue.pop();
}
}