Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 01e0d7bd authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- corrected two bugs in weakening (signaled by Ondrej Zamazal)

parent 1263e818
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ public class OntologyNetworkWeakener {
for ( Alignment al : on.getAlignments() ){
Alignment newal = (Alignment)al.clone();
if ( threshold ) {
newal.cut( "perc", (100.-(double)n)/100. );
newal.cut( "perc", 1.-n );
} else {
int size = newal.nbCells();
// --------------------------------------------------------------------
......@@ -87,7 +87,7 @@ public class OntologyNetworkWeakener {
array.add( c );
}
Collections.shuffle( array );
for ( int i = (int)(n*size); i > 0; i-- ){
for ( int i = (int)(n*size)-1; i >= 0; i-- ){
newal.remCell( array.get( i ) );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment