edu.stanford.nlp.cluster
Class HardCluster

java.lang.Object
  |
  +--edu.stanford.nlp.cluster.SimpleCluster
        |
        +--edu.stanford.nlp.cluster.HardCluster
All Implemented Interfaces:
Cloneable, Cluster
Direct Known Subclasses:
HHCluster

public class HardCluster
extends SimpleCluster

Hard Cluster. Each datum belongs to only 1 cluster with probability 1. HardCluster stores term and document probabilities in SparseDoubleArrays. This is more space and time efficient for Hard Clusters, but SoftCluster should be used for clusters which are defined as a smooth probability distribution over terms,documents


Field Summary
 
Fields inherited from class edu.stanford.nlp.cluster.SimpleCluster
index, mean, nd, nt, pr_d_z, pr_w_z, pr_z, scatter
 
Constructor Summary
HardCluster(int num_terms, int num_docs)
          Allocates memory for arrays and initializes values to 0
HardCluster(int num_terms, int num_docs, int i)
          Allocates memory for arrays, sets index, and initializes values to 0
 
Method Summary
 void addDatum(int ind)
          Adds a datum to the cluster
 int[] dataIndices()
          Returns an array of indices of the data that are contained in this cluster
 
Methods inherited from class edu.stanford.nlp.cluster.SimpleCluster
clearData, clone, equals, evaluateIntraSimilarity, evaluateWeightedMean, get_pr_d_z, get_pr_d_z, get_pr_w_z, get_pr_w_z, get_pr_z, getIndex, getIntraSimilarity, getMean, set_pr_d_z, set_pr_d_z, set_pr_w_z, set_pr_w_z, set_pr_z, setIndex, toString, toString, toXMLString, toXMLString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HardCluster

public HardCluster(int num_terms,
                   int num_docs)
Allocates memory for arrays and initializes values to 0


HardCluster

public HardCluster(int num_terms,
                   int num_docs,
                   int i)
Allocates memory for arrays, sets index, and initializes values to 0

Method Detail

dataIndices

public int[] dataIndices()
Returns an array of indices of the data that are contained in this cluster


addDatum

public void addDatum(int ind)
Adds a datum to the cluster



Stanford NLP Group