Ignore:
Timestamp:
03/05/15 11:42:26 (9 years ago)
Author:
pharms
Message:
  • extended task similarity check to handle identical tasks also correctly
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/utils/SimilarTasks.java

    r1850 r1890  
    10951095            if (isInefficientAction(path.getLast())) { 
    10961096                diffCount++; 
     1097                allCount++; 
    10971098            } 
    10981099            else { 
     
    11041105            if (isInefficientAction(path.getLast())) { 
    11051106                diffCount++; 
     1107                allCount++; 
    11061108            } 
    11071109            else { 
     
    11101112        } 
    11111113         
    1112         return (100 * diffCount) / allCount; 
     1114        if (allCount == 0) { 
     1115            // this happens, if all actions are inefficient. Return the highest diff level 
     1116            return 100; 
     1117        } 
     1118        else { 
     1119            return (100 * diffCount) / allCount; 
     1120        } 
    11131121    } 
    11141122 
Note: See TracChangeset for help on using the changeset viewer.