|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.classification.SimpleFeatureCluster
public class SimpleFeatureCluster
A feature cluster containing a single term and a weight assigned by a standard term weighting funciton.
| Field Summary |
|---|
| Fields inherited from interface com.sun.labs.minion.classification.FeatureCluster |
|---|
weightComparator |
| Constructor Summary | |
|---|---|
SimpleFeatureCluster()
|
|
SimpleFeatureCluster(java.lang.String name,
float weight)
Creates a SimpleFeatureCluster |
|
SimpleFeatureCluster(WeightedFeature f)
|
|
| Method Summary | |
|---|---|
void |
add(Feature f)
Adds a feature to this feature cluster |
void |
addWeight(float weight)
|
void |
combine(WeightedFeature wf)
|
int |
compareTo(FeatureCluster fc)
|
void |
computeWeight(WeightingFunction f,
WeightingComponents wc)
|
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 |
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()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleFeatureCluster()
public SimpleFeatureCluster(java.lang.String name,
float weight)
public SimpleFeatureCluster(WeightedFeature f)
| Method Detail |
|---|
public java.lang.String getName()
FeatureCluster
getName in interface FeatureClusterpublic java.lang.String getHumanReadableName()
FeatureCluster
getHumanReadableName in interface FeatureClusterpublic void setName(java.lang.String name)
FeatureCluster
setName in interface FeatureClustername - the namepublic java.util.SortedSet getContents()
FeatureCluster
getContents in interface FeatureClusterpublic float getWeight()
FeatureCluster
getWeight in interface FeatureClusterpublic void combine(WeightedFeature wf)
public void setWeight(float weight)
FeatureCluster
setWeight in interface FeatureClusterweight - the new weightpublic void addWeight(float weight)
public void computeWeight(WeightingFunction f,
WeightingComponents wc)
public Feature get(java.lang.String name)
FeatureCluster
get in interface FeatureClustername - the feature name
public Feature get(int id)
FeatureCluster
get in interface FeatureClusterid - the feature id
public java.util.Iterator iterator()
FeatureCluster
iterator in interface FeatureClusteriterator in interface java.lang.Iterable<Feature>public void add(Feature f)
FeatureCluster
add in interface FeatureClusterf - the feature to addpublic FeatureCluster copy()
FeatureCluster
copy in interface FeatureClusterpublic void merge(FeatureCluster other)
FeatureCluster
merge in interface FeatureClusterother - the other clusterpublic int size()
size in interface FeatureClusterpublic int compareTo(FeatureCluster fc)
compareTo in interface java.lang.Comparable<FeatureCluster>public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||