com.aliasi.cluster
Class LeafDendrogram<E>

java.lang.Object
  extended by com.aliasi.cluster.Dendrogram<E>
      extended by com.aliasi.cluster.LeafDendrogram<E>
Type Parameters:
E - the type of objects being clustered
All Implemented Interfaces:
Scored

public class LeafDendrogram<E>
extends Dendrogram<E>

A LeafDendrogram represents a dendrogram consisting of a single object with link cost of 0.0.

Since:
LingPipe2.0
Version:
3.0
Author:
Bob Carpenter

Field Summary
 
Fields inherited from interface com.aliasi.util.Scored
REVERSE_SCORE_COMPARATOR, SCORE_COMPARATOR
 
Constructor Summary
LeafDendrogram(E object)
          Construct a leaf dendrogram containing the specified object.
 
Method Summary
 Set<E> memberSet()
          Returns the singleton member of this dendrogram.
 E object()
          Return the single object underlying this leaf dendrogram.
 double score()
          Returns 0.0, the cost of a leaf dendrogram.
 int size()
          Returns 1, the size of a leaf dendrogram.
 
Methods inherited from class com.aliasi.cluster.Dendrogram
contains, copheneticCorrelation, dereference, parent, partitionDistance, partitionK, prettyPrint, structurallyEquivalent, toString, withinClusterScatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LeafDendrogram

public LeafDendrogram(E object)
Construct a leaf dendrogram containing the specified object.

Parameters:
object - Object contained in the constructed dendrogram.
Method Detail

score

public double score()
Returns 0.0, the cost of a leaf dendrogram.

Specified by:
score in interface Scored
Specified by:
score in class Dendrogram<E>
Returns:
0.0.

object

public E object()
Return the single object underlying this leaf dendrogram.

Returns:
The object underlying this leaf dendrogram.

size

public int size()
Returns 1, the size of a leaf dendrogram.

Overrides:
size in class Dendrogram<E>
Returns:
1.

memberSet

public Set<E> memberSet()
Returns the singleton member of this dendrogram.

Specified by:
memberSet in class Dendrogram<E>
Returns:
The singleton member of this dendrogram.