~ubuntu-branches/ubuntu/vivid/elki/vivid

« back to all changes in this revision

Viewing changes to src/de/lmu/ifi/dbs/elki/database/ids/DistanceDBIDPair.java

  • Committer: Package Import Robot
  • Author(s): Erich Schubert
  • Date: 2012-12-14 20:45:15 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20121214204515-4m0d0er9ivtu5w9d
Tags: 0.5.5-1
New upstream release: 0.5.5 interim release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package de.lmu.ifi.dbs.elki.database.ids;
 
2
 
 
3
/*
 
4
 This file is part of ELKI:
 
5
 Environment for Developing KDD-Applications Supported by Index-Structures
 
6
 
 
7
 Copyright (C) 2012
 
8
 Ludwig-Maximilians-Universität München
 
9
 Lehr- und Forschungseinheit für Datenbanksysteme
 
10
 ELKI Development Team
 
11
 
 
12
 This program is free software: you can redistribute it and/or modify
 
13
 it under the terms of the GNU Affero General Public License as published by
 
14
 the Free Software Foundation, either version 3 of the License, or
 
15
 (at your option) any later version.
 
16
 
 
17
 This program is distributed in the hope that it will be useful,
 
18
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
 GNU Affero General Public License for more details.
 
21
 
 
22
 You should have received a copy of the GNU Affero General Public License
 
23
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
24
 */
 
25
 
 
26
import de.lmu.ifi.dbs.elki.distance.distancevalue.Distance;
 
27
 
 
28
/**
 
29
 * Pair containing a distance an an object ID
 
30
 * 
 
31
 * Note: there is no getter for the object, as this is a {@link DBIDRef}.
 
32
 * 
 
33
 * @author Erich Schubert
 
34
 *
 
35
 * @param <D> Distance
 
36
 */
 
37
public interface DistanceDBIDPair<D extends Distance<D>> extends DBIDRef {
 
38
  /**
 
39
   * Get the distance.
 
40
   * 
 
41
   * @return Distance
 
42
   */
 
43
  public D getDistance();
 
44
  
 
45
  /**
 
46
   * Compare to another result, by distance, smaller first.
 
47
   * 
 
48
   * @param other Other result
 
49
   * @return Comparison result
 
50
   */
 
51
  public int compareByDistance(DistanceDBIDPair<D> other);
 
52
}