Type parameters:
| T | Sample type. |
Constructors
SampleSet
#Create a new sample set.
Parameters:
| dimensionality (int) | Dimensionality of set. |
| project (ProjectItem<T>) | Projection delegate. |
| samples (IEnumerable<T>) | Initial samples, if any. |
SampleSet
#Create a new, empty sample set.
Parameters:
| dimensionality (int) | Dimensionality of set. |
| project (ProjectItem<T>) | Projection delegate. |
Properties
Indexers
Gets the item at the given index.
Methods
AddRange
#Grow this sample set.
Parameters:
| items (IEnumerable<T>) | Items to add. |
Returns: Modified sample set.
ComputeAxisDomain
#Compute the domain and average of all samples along some axis.
Parameters:
| axis (int) | Axis to measure. |
| indices (int[]) | Indices to measure. |
| min (out double) | Lowest value will be returned here. |
| mean (out double) | Average (mean) value will be returned here. |
| max (out double) | Highest value will be returned here. |
Returns: True on success, false on failure. This method only returns false if the set is empty.
Implements: ComputeAxisDomain
ComputeAxisDomain
#Compute the domain and average of all samples along some axis.
Parameters:
| axis (int) | Axis to measure. |
| min (out double) | Lowest value will be returned here. |
| mean (out double) | Average (mean) value will be returned here. |
| max (out double) | Highest value will be returned here. |
Returns: True on success, false on failure. This method only returns false if the set is empty.
Implements: ComputeAxisDomain
ComputeAxisMean
#Compute the exact or estimated mean for this set.
Parameters:
| axis (int) | Spatial axis. |
| maxSamples (int) | 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. |
| indices (int[]) | Set of sample indices to take into account. |
Returns: Computed mean along given axis.
Implements: ComputeAxisMean
ComputeAxisMean
#Compute the exact or estimated mean for this set.
Parameters:
| axis (int) | Spatial axis. |
| maxSamples (int) | 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. |
Returns: Computed mean along given axis.
Implements: ComputeAxisMean
ComputeBoundingBox
#Compute the bounding box for a subset of samples.
Parameters:
| indices (IEnumerable<int>) | Indices to include. |
Returns: Bounding box.
Implements: 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.
Returns: k-d tree or null if this sampling set is empty.
Implements: 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.
ComputeKMeansClusters
#Compute a distribution of k-means clusters.
Parameters:
| count (int) | Number of clusters to compute. |
| callback (KMeansIteration) | Callback method. |
Returns: Array of clusters.
Implements: ComputeKMeansClusters
ComputeKMeansClusters
#Compute a distribution of k-means clusters.
Parameters:
| count (int) | Number of clusters to compute. |
Returns: Array of clusters.
Implements: ComputeKMeansClusters
ComputeKMeansClusters
#Compute a distribution of k-means clusters.
Parameters:
| initialMeans (PointN[]) | Number of clusters to compute. |
| callback (KMeansIteration) | Callback method. |
Returns: Array of clusters.
Implements: ComputeKMeansClusters
ComputeKMeansClusters
#Compute a distribution of k-means clusters.
Parameters:
| initialMeans (PointN[]) | Number of clusters to compute. |
Returns: Array of clusters.
Implements: ComputeKMeansClusters
ComputeMean
#Compute the exact or estimated mean for this set.
Returns: Computed mean.
Implements: ComputeMean
ComputeMean
#Compute the exact or estimated mean for this set.
Parameters:
| maxSamples (int) | Maximum number of samples to actually use. |
| indices (int[]) | Set of sample indices to take into account. |
Returns: Computed mean.
Implements: ComputeMean
ComputeMean
#Compute the exact mean for this set.
Parameters:
| indices (int[]) | Set of sample indices to take into account. |
Returns: Computed mean.
Implements: ComputeMean
DistributePoints
#Randomly distribute N points within the space. This method performs pretty poorly when 'count' is large.
Parameters:
| count (int) | Number of points to distribute. |
| limitToSet (bool) | If true, distributed points are constrainted to the existing point set. |
Returns: Array of randomly distributed points.
Implements: DistributePoints
Normalise the entire projection to a hypercube of a specific size.
Parameters:
| size (double) | Edge length of hypercube. |
Implements: NormaliseProjection
NormaliseProjection
#Normalise the entire projection to a hypercube in a specific domain.
NormaliseProjection
#Normalise the entire projection to a hypercube of a specific size.
Parameters:
| size (double) | Edge length of hypercube. |
Point
#Gets the point associated with the given index.
Points
#Get an array of points.