|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
weka.clusterers.Cluster
Field Summary | |
int |
clusterID
corresponds to a cluster ID number, useful for identifying the cluster |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
Cluster()
Creates an empty cluster |
|
Cluster(int id)
Creates an empty cluster with an id |
|
Cluster(java.lang.Object o)
Creates a singleton cluster, assignes weight 1 to the instance |
|
Cluster(java.lang.Object o,
double wt)
Creates a singleton cluster, assignes specified weight to the instance |
Method Summary | |
boolean |
add(java.lang.Object o)
Adds an object to the cluster with default weight 1 |
boolean |
add(java.lang.Object instance,
double wt)
Adds an object to the cluster with specified weight |
void |
copyElements(Cluster old_cluster)
Adds elements from another cluster to this cluster. |
java.lang.String |
toString()
|
double |
weightAt(int index)
Returns the weight of the element at the given position. |
Methods inherited from class java.util.ArrayList |
add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
Field Detail |
public int clusterID
Constructor Detail |
public Cluster()
public Cluster(int id)
public Cluster(java.lang.Object o)
o
- object to be added to the clusterpublic Cluster(java.lang.Object o, double wt)
o
- object to be added to the clusterwt
- weight of the objectMethod Detail |
public boolean add(java.lang.Object o)
o
- object to be added to the clusterpublic boolean add(java.lang.Object instance, double wt)
wt
- weight of the objectpublic double weightAt(int index) throws java.lang.Exception
index
- the element's index
java.lang.Exception
public void copyElements(Cluster old_cluster) throws java.lang.Exception
old_cluster
- a Cluster containing elements to be added
java.lang.Exception
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |