Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MH-Tree
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
disa
public
Hulls
MH-Tree
Commits
3fe17d0b
There was an error fetching the commit references. Please try again later.
Verified
Commit
3fe17d0b
authored
4 years ago
by
David Procházka
Browse files
Options
Downloads
Patches
Plain Diff
ADD: distance measure enum, changed distance to double type
parent
ff598df0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mhtree/DistanceMeasure.java
+8
-0
8 additions, 0 deletions
src/mhtree/DistanceMeasure.java
src/mhtree/ObjectToNodeDistanceRank.java
+2
-2
2 additions, 2 deletions
src/mhtree/ObjectToNodeDistanceRank.java
with
10 additions
and
2 deletions
src/mhtree/DistanceMeasure.java
0 → 100644
+
8
−
0
View file @
3fe17d0b
package
mhtree
;
public
enum
DistanceMeasure
{
NEAREST_HULL_OBJECT
,
FURTHEST_HULL_OBJECT
,
SUM_OF_DISTANCES_TO_HULL_OBJECTS
,
MEDOID
}
This diff is collapsed.
Click to expand it.
src/mhtree/ObjectToNodeDistanceRank.java
+
2
−
2
View file @
3fe17d0b
...
...
@@ -6,7 +6,7 @@ public class ObjectToNodeDistanceRank implements Comparable<ObjectToNodeDistance
private
final
Node
node
;
private
final
LocalAbstractObject
object
;
private
final
float
distance
;
private
final
double
distance
;
public
ObjectToNodeDistanceRank
(
Node
node
,
LocalAbstractObject
object
)
{
this
.
node
=
node
;
...
...
@@ -15,7 +15,7 @@ public class ObjectToNodeDistanceRank implements Comparable<ObjectToNodeDistance
}
public
int
compareTo
(
ObjectToNodeDistanceRank
rank
)
{
return
Float
.
compare
(
distance
,
rank
.
node
.
getDistance
(
object
));
return
Double
.
compare
(
distance
,
rank
.
node
.
getDistance
(
object
));
}
public
Node
getNode
()
{
...
...
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