examples/grid/test-grid2D.cpp
author Christos Mantoulidis <cmad@stanford.edu>
Tue, 28 Jul 2009 10:58:53 -0700
branchdev
changeset 153 7731c42892de
parent 5 ee9052408c40
permissions -rw-r--r--
Modified WeightedRips::generate() to incorporate the simplex-appearance-value computation (before it would have to be done explicitly by the user by a for-loop after the call to generate())

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