|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unibz.algorithms.types.Instance
public class Instance
This class is a representation of a clustering point. It contains also the method that calculates the eclaudean distance and a second method that tests it.
Field Summary | |
---|---|
private Cluster |
cluster
|
private double |
euclideanDistance
|
private boolean |
isClassed
|
private boolean |
isKey
|
private double |
x
|
private double |
y
|
Constructor Summary | |
---|---|
Instance(java.lang.String value,
java.lang.String value2)
This constructor sets the the coordinates of a Instance |
Method Summary | |
---|---|
void |
calcEuclideanDistance()
This method calculates the euclidean distance |
double |
getCurrentEuDt()
Returns the current euclidean distance |
double |
getX()
This method return the x coordinate |
double |
getY()
This method return the y coordinate |
boolean |
isClassed()
This method tells whether the Instance is classed or not |
boolean |
isKey()
Returns true whether if it is the key or false otherwise |
java.lang.String |
print()
This method generates a string with the coordinates |
void |
setCluster(Cluster cluster)
This method sets a new value to the cluster variable and calls the method that calculates the eucludean distance |
void |
setKey(boolean isKey)
This method sets a new value to the instance variable isKey |
double |
testEuclideanDistance(Centroid c)
This method is in charge of cheching the validity of the euclidean distance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private double x
private double y
private Cluster cluster
private double euclideanDistance
private boolean isKey
private boolean isClassed
Constructor Detail |
---|
public Instance(java.lang.String value, java.lang.String value2)
value
- coordinate xvalue2
- coordinate yMethod Detail |
---|
public boolean isKey()
public void setKey(boolean isKey)
isKey
- Booleanpublic boolean isClassed()
public void setCluster(Cluster cluster)
cluster
- cluster objectpublic void calcEuclideanDistance()
public double testEuclideanDistance(Centroid c)
c
- Centroid object
public double getX()
public double getY()
public double getCurrentEuDt()
public java.lang.String print()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |