Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Alignment API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
moex
Alignment API
Commits
3cf30085
Commit
3cf30085
authored
14 years ago
by
Jérôme Euzenat
Browse files
Options
Downloads
Patches
Plain Diff
- added drop by n correspondences in addition to by n% correspondences
parent
fcdfe558
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fr/inrialpes/exmo/align/util/OntologyNetworkWeakener.java
+11
-2
11 additions, 2 deletions
...fr/inrialpes/exmo/align/util/OntologyNetworkWeakener.java
with
11 additions
and
2 deletions
src/fr/inrialpes/exmo/align/util/OntologyNetworkWeakener.java
+
11
−
2
View file @
3cf30085
/*
/*
* $Id$
* $Id$
*
*
* Copyright (C) INRIA, 2009
* Copyright (C) INRIA, 2009
-2010
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* modify it under the terms of the GNU Lesser General Public License
...
@@ -102,9 +102,16 @@ public class OntologyNetworkWeakener {
...
@@ -102,9 +102,16 @@ public class OntologyNetworkWeakener {
* Returns a brand new BasicOntologyNetwork (with the initial alignments)
* Returns a brand new BasicOntologyNetwork (with the initial alignments)
*/
*/
public
static
OntologyNetwork
dropAlignments
(
OntologyNetwork
on
,
double
n
)
throws
AlignmentException
{
public
static
OntologyNetwork
dropAlignments
(
OntologyNetwork
on
,
double
n
)
throws
AlignmentException
{
System
.
err
.
println
(
" >>>> "
+
n
);
//
System.err.println( " >>>> "+n );
if
(
n
<
0
.
||
n
>
1
.
)
if
(
n
<
0
.
||
n
>
1
.
)
throw
new
AlignmentException
(
"Argument must be between 0 and 1.: "
+
n
);
throw
new
AlignmentException
(
"Argument must be between 0 and 1.: "
+
n
);
return
dropAlignments
(
on
,
(
int
)(
n
*
on
.
getAlignments
().
size
())
);
}
public
static
OntologyNetwork
dropAlignments
(
OntologyNetwork
on
,
int
n
)
throws
AlignmentException
{
//System.err.println( " >>>> "+n );
if
(
n
<
0
||
n
>
on
.
getAlignments
().
size
()
)
throw
new
AlignmentException
(
"Argument must be a positive integer: "
+
n
);
OntologyNetwork
newon
=
new
BasicOntologyNetwork
();
OntologyNetwork
newon
=
new
BasicOntologyNetwork
();
for
(
URI
ontouri
:
on
.
getOntologies
()
){
for
(
URI
ontouri
:
on
.
getOntologies
()
){
newon
.
addOntology
(
ontouri
);
newon
.
addOntology
(
ontouri
);
...
@@ -121,4 +128,6 @@ public class OntologyNetworkWeakener {
...
@@ -121,4 +128,6 @@ public class OntologyNetworkWeakener {
}
}
return
newon
;
return
newon
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment