Class EuclideanDataObject
java.lang.Object
weka.clusterers.forOPTICSAndDBScan.DataObjects.EuclideanDataObject
- All Implemented Interfaces:
Serializable,DataObject,RevisionHandler
public class EuclideanDataObject
extends Object
implements DataObject, Serializable, RevisionHandler
EuclideanDataObject.java
Authors: Rainer Holzmann, Zhanna Melnikova-Albrecht, Matthias Schubert
Date: Aug 19, 2004
Time: 5:50:22 PM
$ Revision 1.4 $
- Version:
- $Revision: 8108 $
- Author:
- Matthias Schubert (schubert@dbs.ifi.lmu.de), Zhanna Melnikova-Albrecht (melnikov@cip.ifi.lmu.de), Rainer Holzmann (holzmann@cip.ifi.lmu.de)
- See Also:
-
Field Summary
Fields inherited from interface weka.clusterers.forOPTICSAndDBScan.DataObjects.DataObject
NOISE, UNCLASSIFIED, UNDEFINED -
Constructor Summary
ConstructorsConstructorDescriptionEuclideanDataObject(Instance originalInstance, String key, Database database) Constructs a new DataObject. -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance(DataObject dataObject) Calculates the euclidian-distance between dataObject and this.dataObjectbooleanequals(DataObject dataObject) Compares two DataObjects in respect to their attribute-valuesintReturns the clusterID, to which this DataObject belongs todoubleReturns the coreDistance for this dataObjectReturns the original instancegetKey()Returns the key for this DataObjectdoubleReturns the reachabilityDistance for this dataObjectReturns the revision string.booleanGives information about the status of a dataObjectvoidsetClusterLabel(int clusterID) Sets the clusterID (cluster), to which this DataObject belongs tovoidsetCoreDistance(double c_dist) Sets a new coreDistance for this dataObjectvoidSets the key for this DataObjectvoidsetProcessed(boolean processed) Marks this dataObject as processedvoidsetReachabilityDistance(double r_dist) Sets a new reachability-distance for this dataObjecttoString()
-
Constructor Details
-
EuclideanDataObject
Constructs a new DataObject. The original instance is kept as instance-variable- Parameters:
originalInstance- the original instance
-
-
Method Details
-
equals
Compares two DataObjects in respect to their attribute-values- Specified by:
equalsin interfaceDataObject- Parameters:
dataObject- The DataObject, that is compared with this.dataObject; now assumed to be of the same type and with the same structure- Returns:
- Returns true, if the DataObjects correspond in each value, else returns false
-
distance
Calculates the euclidian-distance between dataObject and this.dataObject- Specified by:
distancein interfaceDataObject- Parameters:
dataObject- The DataObject, that is used for distance-calculation with this.dataObject; now assumed to be of the same type and with the same structure- Returns:
- double-value The euclidian-distance between dataObject and this.dataObject
-
getInstance
Returns the original instance- Specified by:
getInstancein interfaceDataObject- Returns:
- originalInstance
-
getKey
Returns the key for this DataObject- Specified by:
getKeyin interfaceDataObject- Returns:
- key
-
setKey
Sets the key for this DataObject- Specified by:
setKeyin interfaceDataObject- Parameters:
key- The key is represented as string
-
setClusterLabel
public void setClusterLabel(int clusterID) Sets the clusterID (cluster), to which this DataObject belongs to- Specified by:
setClusterLabelin interfaceDataObject- Parameters:
clusterID- Number of the Cluster
-
getClusterLabel
public int getClusterLabel()Returns the clusterID, to which this DataObject belongs to- Specified by:
getClusterLabelin interfaceDataObject- Returns:
- clusterID
-
setProcessed
public void setProcessed(boolean processed) Marks this dataObject as processed- Specified by:
setProcessedin interfaceDataObject- Parameters:
processed- True, if the DataObject has been already processed, false else
-
isProcessed
public boolean isProcessed()Gives information about the status of a dataObject- Specified by:
isProcessedin interfaceDataObject- Returns:
- True, if this dataObject has been processed, else false
-
setCoreDistance
public void setCoreDistance(double c_dist) Sets a new coreDistance for this dataObject- Specified by:
setCoreDistancein interfaceDataObject- Parameters:
c_dist- coreDistance
-
getCoreDistance
public double getCoreDistance()Returns the coreDistance for this dataObject- Specified by:
getCoreDistancein interfaceDataObject- Returns:
- coreDistance
-
setReachabilityDistance
public void setReachabilityDistance(double r_dist) Sets a new reachability-distance for this dataObject- Specified by:
setReachabilityDistancein interfaceDataObject
-
getReachabilityDistance
public double getReachabilityDistance()Returns the reachabilityDistance for this dataObject- Specified by:
getReachabilityDistancein interfaceDataObject
-
toString
-
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-