tests/geometry/test-eventqueue.cpp
author Dmitriy Morozov <dmitriy@mrzv.org>
Fri, 06 Nov 2009 14:19:08 -0800
branchdev
changeset 173 5fd3f43e6fbf
parent 55 7e71f5984931
child 200 73e8dce642be
permissions -rw-r--r--
Added arbitrary coefficients in boundaries (to C++ and Python) + cleaned up CohomologyPersistence.add overloading in Python

#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();
	}
}