# SampleSet<T> 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 sealed class SampleSet<T> : ISampleSet
```

Represents an immutable data set of n-dimensional samples.

**Type parameters:**

- `T`: Sample type.

## Constructors

- [SampleSet<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/ctor.md): (2 overloads) Create a new sample set.

## Properties

- [Coordinates](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/coordinates.md): Enumerate over all sample coordinates.
- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/count.md): Gets the number of datum items in this set.
- [Description](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/description.md): Gets a description of this object type.
- [Dimensionality](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/dimensionality.md): Gets the dimensionality of the data set.
- [ISampleSet.Samples](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/grasshopper2-geometry-clustering-isampleset-samples.md): Enumerate over all samples.
- [ProjectionDelegate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/projectiondelegate.md): Gets the projection delegate.
- [Samples](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/samples.md): Enumerate over all samples.

## Indexers

- [ISampleSet.this[]](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/grasshopper2-geometry-clustering-isampleset-this.md): Gets the item at the given index.
- [this[]](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/item.md): Gets the item at the given index.

## Methods

- [AddRange](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/addrange.md): Grow this sample set.
- [ComputeAxisDomain](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/computeaxisdomain.md): (2 overloads) Compute the domain and average of all samples along some axis.
- [ComputeAxisMean](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/computeaxismean.md): (2 overloads) Compute the exact or estimated mean for this set.
- [ComputeBoundingBox](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/computeboundingbox.md): (2 overloads) Compute the bounding box for all items.
- [ComputeKdTree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/computekdtree.md): (2 overloads) Compute the k-d tree associated with this sample set. Once a k-d tree has been computed, additional calls to this method will return the cached version.
- [ComputeKMeansClusters](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/computekmeansclusters.md): (4 overloads) Compute a distribution of k-means clusters.
- [ComputeMean](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/computemean.md): (3 overloads) Compute the exact or estimated mean for this set.
- [DistributePoints](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/distributepoints.md): Randomly distribute N points within the space. This method performs pretty poorly when 'count' is large.
- [ISampleSet.NormaliseProjection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/grasshopper2-geometry-clustering-isampleset-normaliseprojection.md): (3 overloads) Normalise the entire projection to the unit hypercube.
- [NormaliseProjection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/normaliseprojection.md): (3 overloads) Normalise the entire projection to the unit hypercube.
- [Point](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/point.md): Gets the point associated with the given index.
- [Points](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/points.md): Get an array of points.
- [ToPointSet](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.clustering.sampleset-1/topointset.md): Convert this sample set to a PointN set.
