examples/grid/test-grid2D.cpp
author Dmitriy Morozov <dmitriy@mrzv.org>
Thu, 18 Dec 2008 16:43:42 -0800
branchdev
changeset 97 0a9bd3f34419
parent 5 ee9052408c40
permissions -rw-r--r--
Intermediate commit while converting to the new architecture * Converted Filtration into StaticPersistence and DynamicPersistenceTrails (both right now work with the underlying std::vector rather than std::list order) * Filtration is now just an auxilliary glue (a map between Complex and Persistence) * Whether chains are vectors or lists can be interchanged * Added PersistenceDiagram with a simple bottleneck_distance() function * Converted triangle, alphashapes3d, and cech-complex examples * Lots of organizational changes (factoring utilities out into containers.h, indirect.h, property-maps.h) * Trying to document along the way with NaturalDocs-type comments

#include "grid2D.h"
#include <iostream>

int main()
{
	Grid2D grid(40,60);
	int i = 0;
	for (int x = 0; x < 40; ++x)
		for (int y = 0; y < 60; ++y)
		{
			grid(x,y) = i++;
		}

	std::cout << grid(20,30) << std::endl;
	std::cout << grid << std::endl;
}