From 17bd9beaf7f358a44e5bf36a5855fe6727d506dc Mon Sep 17 00:00:00 2001 From: Federico Igne Date: Tue, 10 May 2022 18:17:06 +0100 Subject: [pagoda] Move project to Scala This commit includes a few changes: - The repository still uses Maven to manage dependency but it is now a Scala project. - The code has been ported from OWLAPI 3.4.10 to 5.1.20 - A proof of concept program using both RSAComb and PAGOdA has been added. --- test/uk/ac/ox/cs/pagoda/tester/Statistics.java | 60 -------------------------- 1 file changed, 60 deletions(-) delete mode 100644 test/uk/ac/ox/cs/pagoda/tester/Statistics.java (limited to 'test/uk/ac/ox/cs/pagoda/tester/Statistics.java') diff --git a/test/uk/ac/ox/cs/pagoda/tester/Statistics.java b/test/uk/ac/ox/cs/pagoda/tester/Statistics.java deleted file mode 100644 index 13d7f90..0000000 --- a/test/uk/ac/ox/cs/pagoda/tester/Statistics.java +++ /dev/null @@ -1,60 +0,0 @@ -package uk.ac.ox.cs.pagoda.tester; - -import java.io.File; -import java.io.FileNotFoundException; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.Scanner; - -@Deprecated -public class Statistics { - - double satCheckTime; - double preprocessTime; - LinkedList number = new LinkedList(); - LinkedList time = new LinkedList(); - - public Statistics(String file) { - Scanner scanner = null; - try { - scanner = new Scanner(new File(file)); - for (String line; scanner.hasNextLine(); ) { - line = scanner.nextLine(); - if (line.contains("time for satisfiability checking")) - satCheckTime = Double.parseDouble(line.substring(line.indexOf(": ") + 2)); - else if (line.contains("Preprocessing Done in")) - preprocessTime = Double.parseDouble(line.substring(line.indexOf("in ") + 3, line.indexOf(" second"))); - else if (line.contains("The number of answer tuples:")) - number.add(Integer.parseInt(line.substring(line.indexOf(": ") + 2))); - else if (line.contains("Total time to answer this query:")) - time.add(Double.parseDouble(line.substring(line.indexOf(": ") + 2))); - } - } catch (FileNotFoundException e) { - e.printStackTrace(); - } finally { - if (scanner != null) - scanner.close(); - } - } - - public String diff(String other) { - return diff(new Statistics(other)); - } - - public String diff(Statistics other) { - if (other.number.size() != number.size()) - return "The number of query is different! " + this.number.size() + " v.s. " + other.number.size(); - int i = 0; - Iterator iter1 = number.iterator(), iter2 = other.number.iterator(); - StringBuilder diff = new StringBuilder(); - int a, b; - while (iter1.hasNext()) { - ++i; - if ((a = iter1.next()) != (b = iter2.next())) { - diff.append("Query ").append(i).append(": ").append(a).append(", reference ").append(b).append("\n"); - } - } - return diff.toString(); - } - -} -- cgit v1.2.3