Page MenuHomec4science

Test.cpp
No OneTemporary

File Metadata

Created
Fri, Nov 8, 00:24

Test.cpp

//
// Created by Arnaud Pannatier on 11.05.18.
//
#include <iostream>
#include "grid.h"
int main(){
Grid A(10,10);
Grid B(10,10);
Grid C(10,10);
Grid D(10,10);
A+=2;
A*=3;
D+=1;
D = 2*A;
for(std::size_t x(0);x<10;x++) {
for (std::size_t y (0); y < 10; y++) {
B(x,y) = y+10*x;
}
}
A+=B;
A*=B;
A=sqrt(A);
for(std::size_t x(0);x<10;x++) {
std::cout << "[ ";
for (std::size_t y (0); y < 10; y++) {
std::cout << A (x, y) << " ";
}
std::cout << "]" << std::endl;
}
std::cout << std::endl;
for(std::size_t x(0);x<10;x++) {
std::cout << "[ ";
for (std::size_t y (0); y < 10; y++) {
std::cout << B (x, y) << " ";
}
std::cout << "]" << std::endl;
}
std::cout << std::endl;
for(std::size_t x(0);x<10;x++) {
std::cout << "[ ";
for (std::size_t y (0); y < 10; y++) {
std::cout << C (x, y) << " ";
}
std::cout << "]" << std::endl;
}
std::cout << std::endl;
for(std::size_t x(0);x<10;x++) {
std::cout << "[ ";
for (std::size_t y (0); y < 10; y++) {
std::cout << D (x, y) << " ";
}
std::cout << "]" << std::endl;
}
return 0;
}

Event Timeline