aboutsummaryrefslogtreecommitdiff
path: root/src/uk/ac/ox/cs/pagoda/query
diff options
context:
space:
mode:
authorRncLsn <rnc.lsn@gmail.com>2015-09-11 11:52:36 +0100
committerRncLsn <rnc.lsn@gmail.com>2015-09-11 11:52:36 +0100
commit9d7ae05224c9dd650967a1932ba76bfdd5c8d89a (patch)
tree50a8201f95554a74f77c343c8872935c6a03f4f4 /src/uk/ac/ox/cs/pagoda/query
parente617855cbfbd8839fd49a53114c7fd010fc934a4 (diff)
downloadACQuA-9d7ae05224c9dd650967a1932ba76bfdd5c8d89a.tar.gz
ACQuA-9d7ae05224c9dd650967a1932ba76bfdd5c8d89a.zip
Improved the statistics that are generated for evaluating the system; configuration file: now default and user-specified.
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/query')
-rw-r--r--src/uk/ac/ox/cs/pagoda/query/QueryRecord.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java b/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java
index f702d5c..3f73145 100644
--- a/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java
+++ b/src/uk/ac/ox/cs/pagoda/query/QueryRecord.java
@@ -31,6 +31,7 @@ public class QueryRecord extends Disposable {
31 OWLOntology relevantOntology = null; 31 OWLOntology relevantOntology = null;
32 Set<DLClause> relevantClauses = new HashSet<DLClause>(); 32 Set<DLClause> relevantClauses = new HashSet<DLClause>();
33 double[] timer; 33 double[] timer;
34 int[] gapAnswersAtStep;
34 int subID; 35 int subID;
35 DLClause queryClause = null; 36 DLClause queryClause = null;
36 int queryID = -1; 37 int queryID = -1;
@@ -80,7 +81,11 @@ public class QueryRecord extends Disposable {
80 81
81 int length = Step.values().length; 82 int length = Step.values().length;
82 timer = new double[length]; 83 timer = new double[length];
83 for(int i = 0; i < length; ++i) timer[i] = 0; 84 gapAnswersAtStep = new int[length];
85 for(int i = 0; i < length; ++i) {
86 timer[i] = 0;
87 gapAnswersAtStep[i] = 0;
88 }
84 } 89 }
85 90
86 public AnswerTuples getAnswers() { 91 public AnswerTuples getAnswers() {
@@ -280,7 +285,8 @@ public class QueryRecord extends Disposable {
280 285
281 double totalTime = 0.0; 286 double totalTime = 0.0;
282 for(Step step : Step.values()) { 287 for(Step step : Step.values()) {
283 result.put(step.toString(), Double.toString(timer[step.ordinal()])); 288 result.put(step.toString() + "_time", Double.toString(timer[step.ordinal()]));
289 result.put(step.toString() + "_gap", Integer.toString(gapAnswersAtStep[step.ordinal()]));
284 totalTime += timer[step.ordinal()]; 290 totalTime += timer[step.ordinal()];
285 } 291 }
286 result.put("totalTime", Double.toString(totalTime)); 292 result.put("totalTime", Double.toString(totalTime));
@@ -396,6 +402,10 @@ public class QueryRecord extends Disposable {
396 if(isDisposed()) throw new DisposedException(); 402 if(isDisposed()) throw new DisposedException();
397 403
398 timer[step.ordinal()] += time; 404 timer[step.ordinal()] += time;
405 if(gapAnswerTuples != null)
406 gapAnswersAtStep[step.ordinal()] = getGapAnswersCount();
407 else
408 gapAnswersAtStep[step.ordinal()] = -1;
399 } 409 }
400 410
401 public int getArity() { 411 public int getArity() {
@@ -725,9 +735,9 @@ public class QueryRecord extends Disposable {
725 SKOLEM_UPPER_BOUND, 735 SKOLEM_UPPER_BOUND,
726 EL_LOWER_BOUND, 736 EL_LOWER_BOUND,
727 FRAGMENT, 737 FRAGMENT,
728 FRAGMENT_REFINEMENT, 738// FRAGMENT_REFINEMENT,
729 SUMMARISATION, 739 SUMMARISATION,
730 DEPENDENCY, 740// DEPENDENCY,
731 FULL_REASONING; 741 FULL_REASONING;
732 742
733 @Override 743 @Override