source: src/main/java/weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.java @ 22

Last change on this file since 22 was 4, checked in by gnappo, 14 years ago

Import di weka.

File size: 4.0 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.DataObjects;
25
26import weka.core.Instance;
27
28/**
29 * <p>
30 * DataObject.java <br/>
31 * Authors: Rainer Holzmann, Zhanna Melnikova-Albrecht, Matthias Schubert <br/>
32 * Date: Aug 19, 2004 <br/>
33 * Time: 5:48:59 PM <br/>
34 * $ Revision 1.4 $ <br/>
35 * </p>
36 *
37 * @author Matthias Schubert (schubert@dbs.ifi.lmu.de)
38 * @author Zhanna Melnikova-Albrecht (melnikov@cip.ifi.lmu.de)
39 * @author Rainer Holzmann (holzmann@cip.ifi.lmu.de)
40 * @version $Revision: 1.2 $
41 */
42public interface DataObject {
43
44    static final int UNCLASSIFIED = -1;
45    static final int NOISE = Integer.MIN_VALUE;
46    static final double UNDEFINED = Integer.MAX_VALUE;
47
48    // *****************************************************************************************************************
49    // methods
50    // *****************************************************************************************************************
51
52    /**
53     * Compares two DataObjects in respect to their attribute-values
54     * @param dataObject The DataObject, that is compared with this.dataObject
55     * @return Returns true, if the DataObjects correspond in each value, else returns false
56     */
57    boolean equals(DataObject dataObject);
58
59    /**
60     * Calculates the distance between dataObject and this.dataObject
61     * @param dataObject The DataObject, that is used for distance-calculation with this.dataObject
62     * @return double-value The distance between dataObject and this.dataObject
63     */
64    double distance(DataObject dataObject);
65
66    /**
67     * Returns the original instance
68     * @return originalInstance
69     */
70    Instance getInstance();
71
72    /**
73     * Returns the key for this DataObject
74     * @return key
75     */
76    String getKey();
77
78    /**
79     * Sets the key for this DataObject
80     * @param key The key is represented as string
81     */
82    void setKey(String key);
83
84    /**
85     * Sets the clusterID (cluster), to which this DataObject belongs to
86     * @param clusterID Number of the Cluster
87     */
88    void setClusterLabel(int clusterID);
89
90    /**
91     * Returns the clusterID, to which this DataObject belongs to
92     * @return clusterID
93     */
94    int getClusterLabel();
95
96    /**
97     * Marks this dataObject as processed
98     * @param processed True, if the DataObject has been already processed, false else
99     */
100    void setProcessed(boolean processed);
101
102    /**
103     * Gives information about the status of a dataObject
104     * @return True, if this dataObject has been processed, else false
105     */
106    boolean isProcessed();
107
108    /**
109     * Sets a new coreDistance for this dataObject
110     * @param c_dist coreDistance
111     */
112    void setCoreDistance(double c_dist);
113
114    /**
115     * Returns the coreDistance for this dataObject
116     * @return coreDistance
117     */
118    double getCoreDistance();
119
120    /**
121     * Sets a new reachability-distance for this dataObject
122     */
123    void setReachabilityDistance(double r_dist);
124
125    /**
126     * Returns the reachabilityDistance for this dataObject
127     */
128    double getReachabilityDistance();
129}
Note: See TracBrowser for help on using the repository browser.