Changeset 1974 for trunk/autoquest-core-tasktrees/src
- Timestamp:
- 06/24/15 11:27:39 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/utils/SimilarTasks.java
r1973 r1974 1151 1151 List<TaskPath> paths = (List<TaskPath>) chunk.getLines(); 1152 1152 1153 TaskPath commonPath = getCommonPath(paths);1154 1155 1153 for (TaskPath path : paths) { 1156 for (int i = commonPath.size(); i < path.size(); i++) {1154 for (int i = path.size() - 1; i >= 0; i--) { 1157 1155 // check, if the parent task covers things fully inside the delta 1158 int[] indexes = traversal.getIndexesRootedBy(path.subPath(0, i + 1)); 1156 TaskPath parentPath = path.subPath(0, i); 1157 1158 //System.out.println("checking parent path " + parentPath); 1159 int[] indexes = traversal.getIndexesRootedBy(parentPath); 1160 //System.out.println("indexes are " + indexes[0] + " " + indexes[1]); 1159 1161 1160 1162 if ((chunk.getPosition() <= indexes[0]) && // starts in the delta 1161 1163 (indexes[1] < (chunk.getPosition() + chunk.size()))) // ends in the delta 1162 1164 { 1163 // System.out.println("found path to parent task lieing completely in the " + 1164 // "delta: " + path.subPath(0, i + 1)); 1165 result.add(path.subPath(0, i + 1)); 1165 //System.out.println("found path to parent task lying completely in the " + 1166 // "delta: " + parentPath); 1167 result.add(parentPath); 1168 } 1169 else { 1170 // further parents can not be inside the delta 1166 1171 break; 1167 1172 }
Note: See TracChangeset
for help on using the changeset viewer.