|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.classification.WeightedFeatureCluster
public class WeightedFeatureCluster
Field Summary |
---|
Fields inherited from interface com.sun.labs.minion.classification.FeatureCluster |
---|
weightComparator |
Constructor Summary | |
---|---|
WeightedFeatureCluster()
|
Method Summary | |
---|---|
void |
add(Feature f)
Adds a feature to this feature cluster |
int |
compareTo(FeatureCluster o)
|
FeatureCluster |
copy()
Return a copy of this feature cluster |
Feature |
get(int id)
Gets the feature with the given id out of this cluster. |
Feature |
get(java.lang.String name)
Gets the feature with the given name out of this cluster. |
java.util.SortedSet |
getContents()
Returns a set of features that are the contents of this cluster |
java.lang.String |
getHumanReadableName()
Gets a human-readable (for example, non-stemmed) name for this cluster. |
java.lang.String |
getName()
Gets the name of this feature cluster. |
float |
getWeight()
Gets the weight associated with this feature cluster |
java.util.Iterator<Feature> |
iterator()
Gets an iterator for the contents of this cluster. |
void |
merge(FeatureCluster other)
Merge another feature cluster into this one, preventing duplicates. |
void |
setName(java.lang.String name)
Sets the name of this feature cluster. |
void |
setWeight(float weight)
Sets the weight associated with this feature cluster |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WeightedFeatureCluster()
Method Detail |
---|
public java.lang.String getName()
FeatureCluster
getName
in interface FeatureCluster
public java.lang.String getHumanReadableName()
FeatureCluster
getHumanReadableName
in interface FeatureCluster
public void setName(java.lang.String name)
FeatureCluster
setName
in interface FeatureCluster
name
- the namepublic java.util.SortedSet getContents()
FeatureCluster
getContents
in interface FeatureCluster
public float getWeight()
FeatureCluster
getWeight
in interface FeatureCluster
public void setWeight(float weight)
FeatureCluster
setWeight
in interface FeatureCluster
weight
- the new weightpublic Feature get(java.lang.String name)
FeatureCluster
get
in interface FeatureCluster
name
- the feature name
public Feature get(int id)
FeatureCluster
get
in interface FeatureCluster
id
- the feature id
public java.util.Iterator<Feature> iterator()
FeatureCluster
iterator
in interface FeatureCluster
iterator
in interface java.lang.Iterable<Feature>
public void add(Feature f)
FeatureCluster
add
in interface FeatureCluster
f
- the feature to addpublic FeatureCluster copy()
FeatureCluster
copy
in interface FeatureCluster
public void merge(FeatureCluster other)
FeatureCluster
merge
in interface FeatureCluster
other
- the other clusterpublic int size()
size
in interface FeatureCluster
public int compareTo(FeatureCluster o)
compareTo
in interface java.lang.Comparable<FeatureCluster>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |