# KMeansCluster class

Namespace: [Grasshopper2.Geometry.Clustering](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.geometry.clustering.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public class KMeansCluster : IDimensional, IEquatable<KMeansCluster>
```

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

## Constructors

- [KMeansCluster](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.kmeanscluster/ctor.md): Create a new k-means cluster.

## Properties

- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.kmeanscluster/count.md): Gets the number of samples associate with this cluster.
- [Description](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.kmeanscluster/description.md): Gets a description of this object type.
- [Dimensionality](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.kmeanscluster/dimensionality.md): Gets the dimensionality of this object.
- [Indices](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.kmeanscluster/indices.md): Iterate over all sample indices in this cluster.
- [Mean](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.kmeanscluster/mean.md): Gets the mean for this cluster.
- [ParentSet](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.kmeanscluster/parentset.md): Gets the sample set associated with this cluster.

## Methods

- [Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.kmeanscluster/equals.md): (2 overloads) Indicates whether the current object is equal to another object of the same type.
- [GetHashCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.kmeanscluster/gethashcode.md): Serves as the default hash function.
- [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.kmeanscluster/tostring.md): Returns a string that represents the current object.
