From a4b30139c6e767cf243293bf20378dfe607669e3 Mon Sep 17 00:00:00 2001 From: filippo Date: Mon, 5 Dec 2016 22:35:21 +0100 Subject: [PATCH 1/3] more tests --- MyTests.js | 82 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 21 deletions(-) diff --git a/MyTests.js b/MyTests.js index dbd72d2..19f8fdc 100644 --- a/MyTests.js +++ b/MyTests.js @@ -12,6 +12,26 @@ function test(n,matrix,lines){ console.log("It tooks " + (t1 - t0) + " milliseconds.\n\n"); } + function createMatrix(n,m){ + var matrix = []; + for(var i=0; i Date: Tue, 6 Dec 2016 21:58:22 +0100 Subject: [PATCH 2/3] 9linesTest --- MyTests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MyTests.js b/MyTests.js index 19f8fdc..d7a7ad6 100644 --- a/MyTests.js +++ b/MyTests.js @@ -137,7 +137,7 @@ var lines5 = [ test(5,matrix5,lines5); /* -* Test 6: 100x100 matrix, 15 lines +* Test 6: 100x100 matrix, 8 lines */ matrix5 = createMatrix(100,100); @@ -151,8 +151,8 @@ var lines5 = [ [[3,4],[11,5]], [[10,1],[5,1]], [[11,3],[3,1]], - /*[[12,2],[3,8]], - [[13,4],[7,2]], + [[12,2],[3,8]], + /*[[13,4],[7,2]], [[14,13],[10,8]], [[15,4],[11,1]], */ From 9e96c906826e0e3f5ecf251c023684ad2c6bd9f2 Mon Sep 17 00:00:00 2001 From: filippo Date: Thu, 29 Dec 2016 12:40:28 +0100 Subject: [PATCH 3/3] test 100x100, 20 lines --- MyTests.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/MyTests.js b/MyTests.js index d7a7ad6..697ce3f 100644 --- a/MyTests.js +++ b/MyTests.js @@ -137,12 +137,12 @@ var lines5 = [ test(5,matrix5,lines5); /* -* Test 6: 100x100 matrix, 8 lines +* Test 6: 100x100 matrix, 20 lines */ -matrix5 = createMatrix(100,100); +matrix6 = createMatrix(100,100); -var lines5 = [ +var lines6 = [ [[1,1],[5,0]], [[2,3],[3,0]], [[5,2],[3,3]], @@ -152,10 +152,18 @@ var lines5 = [ [[10,1],[5,1]], [[11,3],[3,1]], [[12,2],[3,8]], - /*[[13,4],[7,2]], + [[13,4],[7,2]], [[14,13],[10,8]], [[15,4],[11,1]], - */ + [[16,2],[3,70]], + [[17,4],[7,50]], + [[18,13],[10,60]], + [[19,4],[11,80]], + [[13,2],[13,8]], + [[24,4],[20,2]], + [[26,13],[20,8]], + [[30,4],[20,1]], + ]; -test(6,matrix5,lines5); +test(6,matrix6,lines6);