examples/pl-functions/test-grid2D.cpp
author "Arnur Nigmetov <a.nigmetov@gmail.com>"
Mon, 02 Mar 2015 13:20:51 +0100
branchdev
changeset 281 6e883f004ebe
parent 183 0ca59b0ebc47
permissions -rw-r--r--
Added executable to compute Wasserstein distance. Powering to 1/q is done in output. Maybe, should be changed in the function itself?

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