source: branches/MetisMQI/src/main/java/weka/clusterers/forOPTICSAndDBScan/Utils/PriorityQueueElement.java

Last change on this file was 29, checked in by gnappo, 15 years ago

Taggata versione per la demo e aggiunto branch.

File size: 2.8 KB
Line 
1/*
2 *    This program is free software; you can redistribute it and/or modify
3 *    it under the terms of the GNU General Public License as published by
4 *    the Free Software Foundation; either version 2 of the License, or
5 *    (at your option) any later version.
6 *
7 *    This program is distributed in the hope that it will be useful,
8 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
9 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 *    GNU General Public License for more details.
11 *
12 *    You should have received a copy of the GNU General Public License
13 *    along with this program; if not, write to the Free Software
14 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15 */
16
17/*
18 *    Copyright (C) 2004
19 *    & Matthias Schubert (schubert@dbs.ifi.lmu.de)
20 *    & Zhanna Melnikova-Albrecht (melnikov@cip.ifi.lmu.de)
21 *    & Rainer Holzmann (holzmann@cip.ifi.lmu.de)
22 */
23
24package weka.clusterers.forOPTICSAndDBScan.Utils;
25
26import weka.core.RevisionHandler;
27import weka.core.RevisionUtils;
28
29/**
30 * <p>
31 * PriorityQueueElement.java <br/>
32 * Authors: Rainer Holzmann, Zhanna Melnikova-Albrecht, Matthias Schubert <br/>
33 * Date: Aug 31, 2004 <br/>
34 * Time: 6:43:18 PM <br/>
35 * $ Revision 1.4 $ <br/>
36 * </p>
37 *
38 * @author Matthias Schubert (schubert@dbs.ifi.lmu.de)
39 * @author Zhanna Melnikova-Albrecht (melnikov@cip.ifi.lmu.de)
40 * @author Rainer Holzmann (holzmann@cip.ifi.lmu.de)
41 * @version $Revision: 1.3 $
42 */
43public class PriorityQueueElement
44    implements RevisionHandler {
45
46    /**
47     * Holds the priority for the object (in this case: the distance)
48     */
49    private double priority;
50
51    /**
52     * Holds the original object
53     */
54    private Object o;
55
56    // *****************************************************************************************************************
57    // constructors
58    // *****************************************************************************************************************
59    public PriorityQueueElement(double priority, Object o) {
60        this.priority = priority;
61        this.o = o;
62    }
63
64    // *****************************************************************************************************************
65    // methods
66    // *****************************************************************************************************************
67
68    /**
69     * Returns the priority for this object
70     * @return priority
71     */
72    public double getPriority() {
73        return priority;
74    }
75
76    /**
77     * Returns the object
78     * @return
79     */
80    public Object getObject() {
81        return o;
82    }
83   
84    /**
85     * Returns the revision string.
86     *
87     * @return          the revision
88     */
89    public String getRevision() {
90      return RevisionUtils.extract("$Revision: 1.3 $");
91    }
92}
Note: See TracBrowser for help on using the repository browser.