1include "test.idp" 2 3cout << functionDEFINITION << ".n()" << endl; 4real t; 5 6int[int] intarray = [1, 2, 3]; 7real[int] realarray = [1.1, 2.2, 3.3]; 8int[int, int] intintarray = [[1, 2], [3, 4]]; 9real[int, int] rintintarray = [[3.1, 2.2], [4.4, 3.3], [1.1, 2.2]]; 10int size; 11 12t = clock(); 13size = intarray.n; 14t = clock() - t; 15cout << timeELAPSED << t << endl; 16test(size == 3); 17 18t = clock(); 19size = realarray.n; 20t = clock() - t; 21cout << timeELAPSED << t << endl; 22test(size == 3); 23 24t = clock(); 25size = realarray.n; 26t = clock() - t; 27cout << timeELAPSED << t << endl; 28test(size == 3); 29 30t = clock(); 31size = intintarray.n; 32t = clock() - t; 33cout << timeELAPSED << t << endl; 34test(size == 2); 35 36t = clock(); 37size = rintintarray.n; 38t = clock() - t; 39cout << timeELAPSED << t << endl; 40test(size == 3); 41