SampleSet<T>

References
public sealed class SampleSet<T> : ISampleSet
Represents an immutable data set of n-dimensional samples.
TSample type.

Constructors

SampleSet

#
Create a new sample set.
public SampleSet(
dimensionality,
Dimensionality of set.
project,
Projection delegate.
samples
Initial samples, if any.
)

SampleSet

#
Create a new, empty sample set.
public SampleSet(
dimensionality,
Dimensionality of set.
project
Projection delegate.
)

Properties

Coordinates

#
Enumerate over all sample coordinates.
public IEnumerator<PointN> Coordinates { get; }
Coordinates

Count

#
Gets the number of datum items in this set.
public int Count { get; }
Count

Description

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

Dimensionality

#
Gets the dimensionality of the data set.
public int Dimensionality { get; }
Dimensionality
Explicit

ISampleSet.Samples

#
Enumerate over all samples.
Samples

ProjectionDelegate

#
Gets the projection delegate.
public ProjectItem<T> ProjectionDelegate { get; }

Samples

#
Enumerate over all samples.
public IEnumerable<T> Samples { get; }

Indexers

Explicit

ISampleSet.this[]

#
Gets the item at the given index.
object ISampleSet.this[
index
Index of item to retrieve.
]
Item at index.
this[]

this[]

#
Gets the item at the given index.
public T this[
index
Index of item to retrieve.
] { get; }
Item at index.

Methods

AddRange

#
Grow this sample set.
public SampleSet<T> AddRange(
items
Items to add.
)
Modified sample set.

ComputeAxisDomain

#
Compute the domain and average of all samples along some axis.
public bool ComputeAxisDomain(
axis,
Axis to measure.
int[]
indices,
Indices to measure.
out double
min,
Lowest value will be returned here.
out double
mean,
Average (mean) value will be returned here.
out double
max
Highest value will be returned here.
)
True on success, false on failure. This method only returns false if the set is empty.
ComputeAxisDomain

ComputeAxisDomain

#
Compute the domain and average of all samples along some axis.
public bool ComputeAxisDomain(
axis,
Axis to measure.
out double
min,
Lowest value will be returned here.
out double
mean,
Average (mean) value will be returned here.
out double
max
Highest value will be returned here.
)
True on success, false on failure. This method only returns false if the set is empty.
ComputeAxisDomain

ComputeAxisMean

#
Compute the exact or estimated mean for this set.
public double ComputeAxisMean(
axis,
Spatial axis.
maxSamples,
Maximum number of samples to take into account. If this limit is less than the total number of potential samples, the resulting mean will be an estimate.
int[]
indices
Set of sample indices to take into account.
)
Computed mean along given axis.
ComputeAxisMean

ComputeAxisMean

#
Compute the exact or estimated mean for this set.
public double ComputeAxisMean(
axis,
Spatial axis.
maxSamples
Maximum number of samples to take into account. If this limit is less than the total number of potential samples, the resulting mean will be an estimate.
)
Computed mean along given axis.
ComputeAxisMean

ComputeBoundingBox

#
Compute the bounding box for all items.
public BoxN ComputeBoundingBox()
ComputeBoundingBox

ComputeBoundingBox

#
Compute the bounding box for a subset of samples.
public BoxN ComputeBoundingBox(
indices
Indices to include.
)
Bounding box.
ComputeBoundingBox

ComputeKdTree

#
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.
public KdTree ComputeKdTree()
k-d tree or null if this sampling set is empty.
ComputeKdTree

ComputeKdTree

#
Compute a k-d tree with custom settings. This kd-tree is not cached, so if you need it more than once you should cache it yourself.
public KdTree ComputeKdTree(
divisionThreshold,
Maximum number of samples per spatial region.
maximumLeafCount
Maximum number of regions to create. Leaves up to the nearest, larger power of two may actually be created.
)
Custom k-d tree.

ComputeKMeansClusters

#
Compute a distribution of k-means clusters.
public KMeansCluster[] ComputeKMeansClusters(
count,
Number of clusters to compute.
callback
Callback method.
)
Array of clusters.

ComputeKMeansClusters

#
Compute a distribution of k-means clusters.
public KMeansCluster[] ComputeKMeansClusters(
count
Number of clusters to compute.
)
Array of clusters.

ComputeKMeansClusters

#
Compute a distribution of k-means clusters.
public KMeansCluster[] ComputeKMeansClusters(
initialMeans,
Number of clusters to compute.
callback
Callback method.
)
Array of clusters.

ComputeKMeansClusters

#
Compute a distribution of k-means clusters.
public KMeansCluster[] ComputeKMeansClusters(
initialMeans
Number of clusters to compute.
)
Array of clusters.

ComputeMean

#
Compute the exact or estimated mean for this set.
public PointN ComputeMean()
Computed mean.
ComputeMean

ComputeMean

#
Compute the exact or estimated mean for this set.
public PointN ComputeMean(
maxSamples,
Maximum number of samples to actually use.
int[]
indices
Set of sample indices to take into account.
)
Computed mean.
ComputeMean

ComputeMean

#
Compute the exact mean for this set.
public PointN ComputeMean(
int[]
indices
Set of sample indices to take into account.
)
Computed mean.
ComputeMean

DistributePoints

#
Randomly distribute N points within the space. This method performs pretty poorly when 'count' is large.
public PointN[] DistributePoints(
count,
Number of points to distribute.
limitToSet
If true, distributed points are constrainted to the existing point set.
)
Array of randomly distributed points.
DistributePoints
Explicit

ISampleSet.NormaliseProjection

#
Normalise the entire projection to the unit hypercube.
ISampleSet ISampleSet.NormaliseProjection()
Explicit

ISampleSet.NormaliseProjection

#
Normalise the entire projection to a hypercube in a specific domain.
ISampleSet ISampleSet.NormaliseProjection(
min,
Hypercube domain start.
max
Hypercube domain end.
)
Explicit

ISampleSet.NormaliseProjection

#
Normalise the entire projection to a hypercube of a specific size.
ISampleSet ISampleSet.NormaliseProjection(
size
Edge length of hypercube.
)

NormaliseProjection

#
Normalise the entire projection to the unit hypercube.
public SampleSet<T> NormaliseProjection()

NormaliseProjection

#
Normalise the entire projection to a hypercube in a specific domain.
public SampleSet<T> NormaliseProjection(
min,
Hypercube domain start.
max
Hypercube domain end.
)

NormaliseProjection

#
Normalise the entire projection to a hypercube of a specific size.
public SampleSet<T> NormaliseProjection(
size
Edge length of hypercube.
)

Point

#
Gets the point associated with the given index.
public PointN Point(
index
Index.
)
Point associated with index.
Point

Points

#
Get an array of points.
public PointN[] Points(
int[]
indices
Point indices to retrieve.
)
Array of points.
Points

ToPointSet

#
Convert this sample set to a PointN set.
public SampleSet<PointN> ToPointSet()
PointN set.