ManhattanDataObject (original) (raw)
java.lang.Object
- weka.clusterers.forOPTICSAndDBScan.DataObjects.ManhattanDataObject
All Implemented Interfaces:
java.io.Serializable, DataObject, RevisionHandler
public class ManhattanDataObject
extends java.lang.Object
implements DataObject, java.io.Serializable, RevisionHandler
ManhattanDataObject.java
Authors: Rainer Holzmann, Zhanna Melnikova-Albrecht, Matthias Schubert
Date: Aug 19, 2004
Time: 5:50:22 PM
$ Revision 1.4 $
Version: Revision:10571Revision: 10571 Revision:10571
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:
Serialized Form
Field Summary
* ### Fields inherited from interface weka.clusterers.forOPTICSAndDBScan.DataObjects.[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects") `[NOISE](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#NOISE), [UNCLASSIFIED](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#UNCLASSIFIED), [UNDEFINED](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#UNDEFINED)`
Constructor Summary
Constructors
Constructor and Description ManhattanDataObject(Instance originalInstance, java.lang.String key,Database database) Constructs a new DataObject. Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type Method and Description double distance(DataObject dataObject) Calculates the manhattan-distance between dataObject and this.dataObject boolean equals(DataObject dataObject) Compares two DataObjects in respect to their attribute-values int getClusterLabel() Returns the clusterID, to which this DataObject belongs to double getCoreDistance() Returns the coreDistance for this dataObject Instance getInstance() Returns the original instance java.lang.String getKey() Returns the key for this DataObject double getReachabilityDistance() Returns the reachabilityDistance for this dataObject java.lang.String getRevision() Returns the revision string. boolean isProcessed() Gives information about the status of a dataObject void setClusterLabel(int clusterID) Sets the clusterID (cluster), to which this DataObject belongs to void setCoreDistance(double c_dist) Sets a new coreDistance for this dataObject void setKey(java.lang.String key) Sets the key for this DataObject void setProcessed(boolean processed) Marks this dataObject as processed void setReachabilityDistance(double r_dist) Sets a new reachability-distance for this dataObject java.lang.String toString() * ### Methods inherited from class java.lang.Object `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`
Constructor Detail
* #### ManhattanDataObject public ManhattanDataObject([Instance](../../../../weka/core/Instance.html "class in weka.core") originalInstance, java.lang.String key, [Database](../../../../weka/clusterers/forOPTICSAndDBScan/Databases/Database.html "interface in weka.clusterers.forOPTICSAndDBScan.Databases") database) Constructs a new DataObject. The original instance is kept as instance-variable Parameters: `originalInstance` \- the original instance
Method Detail
* #### equals public boolean equals([DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects") dataObject) Compares two DataObjects in respect to their attribute-values Specified by: `[equals](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#equals-weka.clusterers.forOPTICSAndDBScan.DataObjects.DataObject-)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` 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 public double distance([DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects") dataObject) Calculates the manhattan-distance between dataObject and this.dataObject Specified by: `[distance](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#distance-weka.clusterers.forOPTICSAndDBScan.DataObjects.DataObject-)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` 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 manhattan-distance between dataObject and this.dataObject NaN, if the computation could not be performed * #### getInstance public [Instance](../../../../weka/core/Instance.html "class in weka.core") getInstance() Returns the original instance Specified by: `[getInstance](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#getInstance--)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` Returns: originalInstance * #### getKey public java.lang.String getKey() Returns the key for this DataObject Specified by: `[getKey](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#getKey--)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` Returns: key * #### setKey public void setKey(java.lang.String key) Sets the key for this DataObject Specified by: `[setKey](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#setKey-java.lang.String-)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` 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: `[setClusterLabel](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#setClusterLabel-int-)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` Parameters: `clusterID` \- Number of the Cluster * #### getClusterLabel public int getClusterLabel() Returns the clusterID, to which this DataObject belongs to Specified by: `[getClusterLabel](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#getClusterLabel--)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` Returns: clusterID * #### setProcessed public void setProcessed(boolean processed) Marks this dataObject as processed Specified by: `[setProcessed](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#setProcessed-boolean-)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` 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: `[isProcessed](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#isProcessed--)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` 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: `[setCoreDistance](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#setCoreDistance-double-)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` Parameters: `c_dist` \- coreDistance * #### getCoreDistance public double getCoreDistance() Returns the coreDistance for this dataObject Specified by: `[getCoreDistance](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#getCoreDistance--)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` Returns: coreDistance * #### setReachabilityDistance public void setReachabilityDistance(double r_dist) Sets a new reachability-distance for this dataObject Specified by: `[setReachabilityDistance](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#setReachabilityDistance-double-)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` * #### getReachabilityDistance public double getReachabilityDistance() Returns the reachabilityDistance for this dataObject Specified by: `[getReachabilityDistance](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html#getReachabilityDistance--)` in interface `[DataObject](../../../../weka/clusterers/forOPTICSAndDBScan/DataObjects/DataObject.html "interface in weka.clusterers.forOPTICSAndDBScan.DataObjects")` * #### toString public java.lang.String toString() Overrides: `toString` in class `java.lang.Object` * #### getRevision public java.lang.String getRevision() Returns the revision string. Specified by: `[getRevision](../../../../weka/core/RevisionHandler.html#getRevision--)` in interface `[RevisionHandler](../../../../weka/core/RevisionHandler.html "interface in weka.core")` Returns: the revision