|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.classification.FeatureClusterSet
public class FeatureClusterSet
A set of feature clusters. The set is sorted based on cluster name.
| Field Summary | |
|---|---|
protected java.util.SortedSet<FeatureCluster> |
contents
|
protected HumanSelected |
hs
|
protected java.util.Map<java.lang.String,FeatureCluster> |
quickMap
|
| Constructor Summary | |
|---|---|
FeatureClusterSet()
|
|
FeatureClusterSet(java.util.Collection<FeatureCluster> clusters)
Creates a FeatureClusterSet from the contents of a Collection. |
|
FeatureClusterSet(FeatureClusterSet other)
Create a copy of the provided FeatureClusterSet |
|
| Method Summary | |
|---|---|
void |
add(FeatureCluster cluster)
Adds a feature cluster to this set. |
FeatureCluster |
get(java.lang.String name)
Gets the feature cluster with the given name. |
FeatureCluster |
getContaining(Feature feature)
Gets the feature cluster that contains the given feature. |
FeatureCluster |
getContaining(java.lang.String name)
Gets the feature cluster that contains the given feature. |
java.util.SortedSet<FeatureCluster> |
getContents()
Gets the contents of this cluster as a SortedSet |
java.util.Iterator<FeatureCluster> |
iterator()
Gets an iterator over the cluster set. |
static FeatureClusterSet |
merge(java.util.Collection<FeatureClusterSet> clusterSets)
Merge the contents of all the cluster sets. |
void |
normalize()
Normalizes the weights of the feature clusters so that the overall set has a unit length. |
void |
removeZero()
Removes feature clusters with zero weight from the set. |
void |
setHumanSelected(HumanSelected hs)
|
int |
size()
Gets the number of clusters in this cluster set |
FeatureClusterSet |
subsetFirstN(int n)
Gets a subset of this feature cluster set consisting of the first N features in the set. |
FeatureCluster[] |
toArray()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected HumanSelected hs
protected java.util.SortedSet<FeatureCluster> contents
protected java.util.Map<java.lang.String,FeatureCluster> quickMap
| Constructor Detail |
|---|
public FeatureClusterSet()
public FeatureClusterSet(java.util.Collection<FeatureCluster> clusters)
clusters - a collection of FeatureClusterspublic FeatureClusterSet(FeatureClusterSet other)
other - the set to copy| Method Detail |
|---|
public void setHumanSelected(HumanSelected hs)
public FeatureCluster get(java.lang.String name)
name - the name of the cluster to get
public FeatureCluster getContaining(Feature feature)
feature - the feature to find in a cluster
public FeatureCluster getContaining(java.lang.String name)
name - the name of the feature to find in a cluster
public static FeatureClusterSet merge(java.util.Collection<FeatureClusterSet> clusterSets)
clusterSets - other the other FCSpublic void add(FeatureCluster cluster)
cluster - the cluster to addpublic void removeZero()
public void normalize()
public java.util.Iterator<FeatureCluster> iterator()
iterator in interface java.lang.Iterable<FeatureCluster>public int size()
public java.util.SortedSet<FeatureCluster> getContents()
public FeatureCluster[] toArray()
public FeatureClusterSet subsetFirstN(int n)
n - the number of features to use in the setpublic 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 | |||||||||