From: <jen...@us...> - 2008-09-29 19:27:27
|
Revision: 1311 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1311&view=rev Author: jenslehmann Date: 2008-09-29 19:27:01 +0000 (Mon, 29 Sep 2008) Log Message: ----------- split computation bug fix Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-09-29 19:21:58 UTC (rev 1310) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2008-09-29 19:27:01 UTC (rev 1311) @@ -873,10 +873,12 @@ if(useDoubleDatatypes) { Set<DatatypeProperty> doubleDPs = rs.getDoubleDatatypeProperties(); for(DatatypeProperty dp : doubleDPs) { - DoubleMaxValue max = new DoubleMaxValue(splits.get(dp).get(splits.get(dp).size()-1)); - DoubleMinValue min = new DoubleMinValue(splits.get(dp).get(0)); - m3.add(new DatatypeSomeRestriction(dp,max)); - m3.add(new DatatypeSomeRestriction(dp,min)); + if(splits.get(dp).size()>0) { + DoubleMaxValue max = new DoubleMaxValue(splits.get(dp).get(splits.get(dp).size()-1)); + DoubleMinValue min = new DoubleMinValue(splits.get(dp).get(0)); + m3.add(new DatatypeSomeRestriction(dp,max)); + m3.add(new DatatypeSomeRestriction(dp,min)); + } } } @@ -975,10 +977,12 @@ // System.out.println("mgdd " + mgdd); for(DatatypeProperty dp : doubleDPs) { - DoubleMaxValue max = new DoubleMaxValue(splits.get(dp).get(splits.get(dp).size()-1)); - DoubleMinValue min = new DoubleMinValue(splits.get(dp).get(0)); - m3.add(new DatatypeSomeRestriction(dp,max)); - m3.add(new DatatypeSomeRestriction(dp,min)); + if(splits.get(dp).size() > 0) { + DoubleMaxValue max = new DoubleMaxValue(splits.get(dp).get(splits.get(dp).size()-1)); + DoubleMinValue min = new DoubleMinValue(splits.get(dp).get(0)); + m3.add(new DatatypeSomeRestriction(dp,max)); + m3.add(new DatatypeSomeRestriction(dp,min)); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |