KMeansCluster

References
Represents an immutable k-means cluster associated with a sample set.

Constructors

KMeansCluster

#
public KMeansCluster(ISampleSet parentSet, PointN mean, IEnumerable<int> indices)
Create a new k-means cluster.
parentSet (ISampleSet)Sample set associated with this cluster.
mean (PointN)Mean for this cluster.
indices (IEnumerable<int>)Sample indices contained within this cluster.

Properties

Count

#
public int Count { get; }
Gets the number of samples associate with this cluster.

Description

#
public string Description { get; }
Gets a description of this object type.
Description

Dimensionality

#
public int Dimensionality { get; }
Gets the dimensionality of this object.
Dimensionality

Indices

#
public IEnumerable<int> Indices { get; }
Iterate over all sample indices in this cluster.

Mean

#
public PointN Mean { get; }
Gets the mean for this cluster.

ParentSet

#
public ISampleSet ParentSet { get; }
Gets the sample set associated with this cluster.

Methods

Equals

#
public bool Equals(KMeansCluster other)
Indicates whether the current object is equal to another object of the same type.
other (KMeansCluster)An object to compare with this object.
true if the current object is equal to the other parameter; otherwise, false.

Equals

#
public override bool Equals(object obj)
Determines whether the specified object is equal to the current object.
obj (object)The object to compare with the current object.
true if the specified object is equal to the current object; otherwise, false.
Object.Equals

GetHashCode

#
public override int GetHashCode()
Serves as the default hash function.
A hash code for the current object.

ToString

#
public override string ToString()
Returns a string that represents the current object.
A string that represents the current object.
Object.ToString