Renamed test.java to Test.java and updated makefile accordingly. Done to keep javac...
authorstephey <stephey>
Sat, 3 Apr 2010 01:40:53 +0000 (01:40 +0000)
committerstephey <stephey>
Sat, 3 Apr 2010 01:40:53 +0000 (01:40 +0000)
Robust/src/Tests/mlp/stephen/test.java [deleted file]

diff --git a/Robust/src/Tests/mlp/stephen/test.java b/Robust/src/Tests/mlp/stephen/test.java
deleted file mode 100644 (file)
index 421292f..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-public class Test\r
-{\r
-    private final int MAX = 100000;\r
-\r
-    public Test(){}\r
-\r
-    public static void main(String args[]) {\r
-\r
-        System.out.println("# it starts");\r
-        Test t = new Test();\r
-        t.doSomeWork();\r
-\r
-    }\r
-\r
-    public void doSomeWork()\r
-    {\r
-        long sum = 0;\r
-        long time = System.currentTimeMillis();\r
-        \r
-        //I did the for loop this way so that each parallel thread would take\r
-        //about the same time \r
-        for(int i = 0; i < MAX/2 + 1; i++)\r
-        {\r
-               int innerSum = 0;\r
-               \r
-               {\r
-                       int oppositeNum = MAX - i;\r
-                       \r
-                       if(isPrime(i))\r
-                               innerSum += i;\r
-                       \r
-                       if(i != oppositeNum && isPrime(oppositeNum))\r
-                               innerSum += MAX - i;\r
-               }\r
-               \r
-               sum += innerSum;\r
-        }\r
-\r
-        System.out.println("The sum of primes from 1 to " + MAX + " is " + sum + ".");\r
-        System.out.println("Note: 1 is counted as a prime.");\r
-        System.out.println("Time Consumed (Not Parallelized): " + (System.currentTimeMillis() - time) + " ms");\r
-\r
-    }\r
-    \r
-\r
-    private boolean isPrime(int number)\r
-    {\r
-       //handles special cases\r
-        if(number < 1)\r
-            return false;\r
-\r
-        if (number < 3)\r
-               return true;\r
-\r
-        //Tests the rest of the numbers\r
-        for(int i = 2; i < number; i++)\r
-        {\r
-            if(number%i == 0)\r
-                return false;\r
-        }\r
-        \r
-        return true;\r
-    }\r
-\r
-}\r