Click or drag to resize

ClusterTInstance Class

Represents a set of TInstance elements arranged in a hierarchical form.
Inheritance Hierarchy
SystemObject
  AglomeraClusterTInstance

Namespace:  Aglomera
Assembly:  Aglomera (in Aglomera.dll) Version: 1.1.0
Syntax
C#
public class Cluster<TInstance> : IEnumerable<TInstance>, 
	IEnumerable, IEquatable<Cluster<TInstance>>, IComparable<Cluster<TInstance>>
where TInstance : Object, IComparable<TInstance>
Request Example View Source

Type Parameters

TInstance
The type of instance considered.

The ClusterTInstance type exposes the following members.

Constructors
  NameDescription
Public methodClusterTInstance(ClusterTInstance)
Creates a new ClusterTInstance which is an exact copy of the given cluster.
Public methodClusterTInstance(IEnumerableTInstance, Double)
Creates a new ClusterTInstance with the given TInstance elements.
Public methodClusterTInstance(TInstance, Double)
Creates a new ClusterTInstance with a single TInstance element.
Public methodClusterTInstance(ClusterTInstance, ClusterTInstance, Double)
Creates a new ClusterTInstance by joining the two given clusters.
Top
Properties
  NameDescription
Public propertyCount
Gets the number of elements in this cluster.
Public propertyDissimilarity
Gets the dissimilarity / distance at which this cluster was found by the clustering algorithm.
Public propertyParent1
Gets this cluster's first parent, if the cluster was formed by joining two existing clusters. Otherwise returns null.
Public propertyParent2
Gets this cluster's second parent, if the cluster was formed by joining two existing clusters. Otherwise returns null.
Top
Methods
  NameDescription
Public methodClone
Creates a new ClusterTInstance which is an exact copy of this cluster.
Public methodCompareTo
Compares this cluster with another cluster instance. Comparison is performed by count (number of items) first, then by string representation of the items.
Public methodContains
Checks whether this cluster contains the given item.
Public methodEquals(Object) (Overrides ObjectEquals(Object).)
Public methodEquals(ClusterTInstance)
Checks whether this cluster is equal to another. Equality between cluster occurs when they are the same object or when the clusters contain the same elements, were created based on the same parent clusters and have the same associated dissimilarity.
Protected methodFinalize (Inherited from Object.)
Public methodGetEnumerator
Public methodGetHashCode (Overrides ObjectGetHashCode.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString
Gets a string representing this cluster in the form (item1;item2;...;itemN).
(Overrides ObjectToString.)
Top
Fields
  NameDescription
Public fieldStatic memberEmpty
Gets an empty cluster.
Top
Extension Methods
  NameDescription
Public Extension MethodGetMedoidTInstance
Returns the medoid of a given ClusterTInstance, i.e., a representative object whose dissimilarity to all the instances in the cluster is minimal.
(Defined by Extensions.)
Top
See Also