- 更新日時:
- 2014/09/25 15:11:38 (10 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/OWLClassGraph.java
r157 r159 20 20 int limit; 21 21 int th; 22 double concut; 23 double divcut; 22 int prunecut; 24 23 25 24 public class LinkAndPath{ … … 51 50 nsteps = 3; 52 51 limit = 1000; 53 //th = 0; 54 //concut = 2.0; 55 //divcut = - 2.0; 52 prunecut = 100; 56 53 } 57 54 … … 107 104 crrlp.classLink.getDirection() != classLinks[j].getDirection() && 108 105 crrlp.originalClassURI.equals( classLinks[j].getLinkedClassURI()) ){ 106 System.out.println("P1"); 107 continue; 108 } 109 if ( checkPruning(crrlp.classLink, classLinks[j]) ){ 110 System.out.println("P2"); 109 111 continue; 110 112 } … … 178 180 */ 179 181 180 /* 181 private boolean decideConvergence(ClassLink classLink){ 182 private boolean checkPruning(ClassLink classLink1, ClassLink classLink2){ 183 // true -> prune link2, false -> add link2 184 int noi1 = classLink1.getNumOfOriginInstances(); 185 int nli1 = classLink1.getNumOfLinkedInstances(); 186 int noi2 = classLink2.getNumOfOriginInstances(); 187 int nli2 = classLink2.getNumOfLinkedInstances(); 188 if ( noi1 == 0 || nli1 == 0 || noi2 == 0 || nli2 == 0 ){ 189 return true; 190 } 191 return ( noi1 / nli1 > prunecut && nli2 / noi2 > prunecut ); 192 } 193 194 /* private boolean decideConvergence(ClassLink classLink){ 182 195 double con = getValueForConvergence(classLink.getNumOfOriginInstances(), 183 196 classLink.getNumOfLinkedInstances(), … … 209 222 } 210 223 */ 224 private int getMinCutOfPath(){ 225 int min = Integer.MAX_VALUE; 226 //KOKO 227 return min; 228 } 229 211 230 }