|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unibz.algorithms.types.Cluster
public class Cluster
This class represent a cluster and contains its name, a centroid object, the square sum and the data points
Field Summary | |
---|---|
private Centroid |
centroid
|
private java.util.Vector<Instance> |
Instances
|
private boolean |
isnoise
|
private java.lang.String |
name
|
Constructor Summary | |
---|---|
Cluster(java.lang.String name)
This constructor initializes the classes attributes. |
Method Summary | |
---|---|
void |
addAll(java.util.List<Instance> list)
Adds all instances to the Cluster |
void |
addInstance(Instance dp)
The method adds a specific Instance to the Cluster |
void |
clear()
Removes all Instances from the Cluster |
boolean |
contains(Instance p)
Checks if the Cluster contains a specific Instance |
Centroid |
getCentroid()
This method returns the centroid object |
Instance |
getInstance(int pos)
This method returns an indexed data point |
java.util.Vector<Instance> |
getInstances()
This method returns a vector of Instances |
java.lang.String |
getName()
This method returns the Cluster name |
int |
getNumInstances()
This method returns the number of Instances |
int |
getNumOfMinAndMaxXY()
|
boolean |
isIsnoise()
Getter for the isnoise Property |
void |
removeInstance(Instance dp)
This method removes the Instance |
void |
setCentroid(Centroid c)
This method sets the value of the centroid object |
void |
setIsnoise(boolean isnoise)
Setter for the isnoise Property |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String name
private Centroid centroid
private boolean isnoise
private java.util.Vector<Instance> Instances
Constructor Detail |
---|
public Cluster(java.lang.String name)
name
- StringMethod Detail |
---|
public void setCentroid(Centroid c)
c
- Centroid objectpublic Centroid getCentroid()
public void addInstance(Instance dp)
dp
- Instance objectpublic void removeInstance(Instance dp)
dp
- Instance objectpublic int getNumInstances()
public boolean isIsnoise()
public void setIsnoise(boolean isnoise)
public Instance getInstance(int pos)
pos
- index
public java.lang.String getName()
public java.util.Vector<Instance> getInstances()
public void clear()
public void addAll(java.util.List<Instance> list)
tmpLst
- Instances to addpublic boolean contains(Instance p)
p
- The instance to check
public int getNumOfMinAndMaxXY()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |