IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Cloud of points, contains a list of containers of objects that include point coordinates. More...
Public Member Functions | |||
PointCloud () | |||
PointCloud (params PointType[] points) | |||
Constructs a cloud of points containing the specified points. | |||
PointCloud (params IPointContainer< PointType >[] points) | |||
Constructs a cloud of points containing the points embedded in the specified point containers. All points are taken from their point containers and embedded in newly created point containers before adding to the created cloud of points. | |||
PointCloud () | |||
Constructs an empty cloud of points. | |||
PointCloud (params PointType[] points) | |||
Constructs a cloud of points containing the specified points. | |||
PointCloud (params IPointContainer< PointType >[] points) | |||
Constructs a cloud of points containing the points embedded in the specified point containers. All points are taken from their point containers and embedded in newly created point containers before adding to the created cloud of points. | |||
PointContainerType | GetPoint (int which) | ||
Returns the specified point identified by its position (index) within list of points. | |||
void | SetPoints (params PointType[] points) | ||
Sets the points to be contained in the current point cloud. Each point is embedded in a newly created point container. | |||
void | AddPoints (params PointType[] points) | ||
Adds the specified points to the current point cloud. Each added point is embedded in a newly created point container. | |||
void | SetPoints (params IPointContainer< PointType >[] points) | ||
Sets the points to be contained in the current point cloud to the specified set of points that are embedded in point containers. Each of the specified points is taken from its current container embedded in a newly created point container. | |||
void | AddPoints (params IPointContainer< PointType >[] points) | ||
Adds the specified points that are embedded in point containers to the current point cloud. Each of the specified points is taken from its current container embedded in a newly created point container. | |||
abstract DistanceComparer < PointContainerType, PointType > | CreateDefaultDistanceComparer (PointContainerType point) | ||
Creates and returnws a distance comparer of hte default type for the current type of point of clouds. | |||
virtual DistanceComparer < PointContainerType, PointType > | CreateDefaultDistanceComparer () | ||
Creates and returnws a distance comparer of hte default type for the current type of point of clouds. | |||
abstract PointType | CreatePointFromCoordinates (IVector coordinates) | ||
Creates and returns a new point with specified coordinates. | |||
abstract PointContainerType | CreatePointContainer (PointType point) | ||
Creates and returns a new point container that wraps the specified point. | |||
virtual PointContainerType | CreatePointContainerFromCoordinates (IVector coordinates) | ||
Creates and returns a new point container that wraps a newly created point with the specified coordinates.
| |||
List< PointContainerType > | CreatePointsCopy () | ||
Creates and returns a copy of list of points, containing references to points (point containers, in fact) contained in the current cloud of points. | |||
PointType | CreateRandomPoint (IBoundingBox bounds) | ||
Creates and returns a new point with random co-ordinates that fall within the specified bounds (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property. | |||
PointType | CreateRandomPoint (int spaceDimension, double minCoordinateValues, double maxCoordinateValues) | ||
Creates and returns a new point with random co-ordinates that fall within the specified bounds (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property. | |||
PointType | CreateRandomPoint (int spaceDimension) | ||
Creates and returns a new point with random co-ordinates that fall between 0 and 1 (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property. | |||
PointContainerType | CreateRandomPointContainer (IBoundingBox bounds) | ||
Creates and returns a new point container with random co-ordinates that fall within the specified bounds (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property. | |||
PointContainerType | CreateRandomPointContainer (int spaceDimension, double minCoordinateValues, double maxCoordinateValues) | ||
Creates and returns a new point container with random co-ordinates that fall within the specified bounds (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property. | |||
PointContainerType | CreateRandomPointContainer (int spaceDimension) | ||
Creates and returns a new point container with random co-ordinates that fall between 0 and 1 (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property. | |||
void | GenerateRandomCloud (int numPoints, IBoundingBox bounds) | ||
Generates a specified number of random points with random co-ordinates that fall within the specified bounds (inclusively), and incorporates them into the current point cloud. Eventual existent points are removed from the cloud. Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property. | |||
void | GenerateRandomCloud (int numPoints, int spaceDimension, double minCoordinateValues, double maxCoordinateValues) | ||
Generates a specified number of random points with random co-ordinates that fall within the specified bounds (inclusively), and incorporates them into the current point cloud. Eventual existent points are removed from the cloud. Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property. | |||
void | GenerateRandomCloud (int numPoints, int spaceDimension) | ||
Generates a specified number of random points with random co-ordinates that fall between 0 and 1 (inclusively), and incorporates them into the current point cloud. Eventual existent points are removed from the cloud. Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property. | |||
void | UpdateNeighborDistances (IDistanceComparer< PointContainerType, PointType > distanceComparer) | ||
Iterates through all points contained in the current cloud, and calculates and updates their distances to the containing point by the specified distance comparer. | |||
void | GetNeighborDistanceStatistics (int numClosestPoints, ref int[] numSpecimens, ref IVector minDistances, ref IVector maxDistances, ref IVector averageDistances) | ||
Calculates a number of statistics on the distances of the first specified number of closest neighbors to each point, and stores them to the provided storage. It is assumed htat distances to the master points are calculated and stored on neighbors (links), and that neighbors are sorted accorgding to ascending distances from their master point.Objects to store data are re-allocated if necessary. | |||
void | GetNeighborDistanceStatistics (int numClosestPoints, ref int[] numSpecimens, ref IVector minDistances, ref IVector maxDistances, ref IVector averageDistances, ref IVector standardDeviations, ref IVector averageAbsoluteDeviations, bool calculateDeviations) | ||
Calculates a number of statistics on the distances of the first specified number of closest neighbors to each point, and stores them to the provided storage. It is assumed htat distances to the master points are calculated and stored on neighbors (links), and that neighbors are sorted accorgding to ascending distances from their master point.Objects to store data are re-allocated if necessary. | |||
void | PrintNeighborDistanceStatistics (int numClosestPoints, bool calculateDeviations, IDistanceComparer< PointContainerType, PointType > distanceComparer) | ||
Calculates and prints a number of statistics on the distances of the first specified number of closest neighbors to each point, and stores them to the provided storage. It is assumed htat distances to the master points are calculated and stored on neighbors (links), and that neighbors are sorted accorgding to ascending distances from their master point.Objects to store data are re-allocated if necessary. | |||
void | TestClosestPointsWithOutputs (int numClosestPoints, bool printByComponents, bool printIndividualPointsComp, PointContainerType[] points, IDistanceComparer< PointContainerType, PointType > comparerInput, List< PointContainerType > trainingPoints) | ||
For each point (training element) in the specified array, the training points are sorted according to the distance to this point, and data for the specified number of closest points are written. Result of this test can give some rough feeling about filling of space (but very rough because anisotropy can not be detected in this way). | |||
void | FindClosestPointsDummy (IDistanceComparer< PointContainerType, PointType > comparer, int numClosestPoints) | ||
Finds the specified number fo closest points to each point contained in the current cloud, and updates the neighbor lists of points such that they contain links to these neighbors. | |||
void | FindClosestPointsDummy (IDistanceComparer< PointContainerType, PointType > comparer, int numClosestPoints, bool accelerateSortingByStoringDistances) | ||
Finds the specified number fo closest points to each point contained in the current cloud, and updates the neighbor lists of points such that they contain links to these neighbors. | |||
void | FindClosestPointsGraph (IDistanceComparer< PointContainerType, PointType > comparer, int numClosestPoints) | ||
Finds closest points by initializing with random neighbors and then gradually improving connections to neighbors. | |||
Static Public Member Functions | |||
static void | TestClosestPoints (int numClosestPoints, bool printByComponents, PointContainerType[] referencePoints, IDistanceComparer< PointContainerType, PointType > comparerInput, List< PointContainerType > trainingPoints) | ||
For each point in the specified array, the training points are sorted according to the distance to this point, and data for the specified number of closest points are written. Result of this test can give some rough feeling about filling of space (but very rough because anisotropy can not be detected in this way). | |||
static void | TestClosestPoints (int numClosestPoints, bool printByComponents, bool printIndividualPointsComp, PointContainerType[] referencePoints, IDistanceComparer< PointContainerType, PointType > comparerInput, List< PointContainerType > trainingPoints) | ||
For each point in the specified array, the training points are sorted according to the distance to this point, and data for the specified number of closest points are written. For individual points, differences are not printed by components.Result of this test can give some rough feeling about filling of space (but very rough because anisotropy can not be detected in this way). | |||
static PointCloudVector | ExampleClosestPointsDummy (int numPoints, int spaceDimension, int numClosestPoints) | ||
Creates rabndomly an example cloud of points, calculates the specified number of closest neighbors by the dummy method for each point in an example cloud, and prints statistics. Sorting is accellerated by storing distances to reference points and using them in comparison. | |||
static PointCloudVector | ExampleClosestPointsDummy (int numPoints, int spaceDimension, int numClosestPoints, bool accelerateSortingByStoringDistances) | ||
Creates randomly an example cloud of points, calculates the specified number of closest neighbors by the dummy method for each point in an example cloud, and prints statistics. | |||
Public Attributes | |||
DistanceComparer < PointContainerType, PointType > | _distanceComparer | ||
Protected Member Functions | |||
void | PrintNeighborDistanceStatistics (int[] numSpecimens, IVector minDistances, IVector maxDistances, IVector averageDistances, IVector standardDeviations, IVector averageAbsoluteDeviations, bool calculateDeviations) | ||
void | PrintNeighborDistanceStatistics (int[] numSpecimens, IVector minDistances, IVector maxDistances, IVector averageDistances) | ||
Protected Attributes | |||
internal object | _lock = new object() | ||
List< PointContainerType > | _points = new List<PointContainerType>() | ||
IVector | _auxVector | ||
Properties | |||
object | Lock [get] | ||
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. | |||
List< PointContainerType > | Points [get] | ||
List of points contained on the current class. | |||
int | NumPoints [get] | ||
Gets the current number of points on the list. | |||
PointContainerType | this [int which] [get, set] | ||
Returns the specified point identified by its position (index) within list of points. | |||
DistanceComparer < PointContainerType, PointType > | DistanceComparer [get, set] | ||
Distance comparer of the current point cloud object. Getter has lazy evaluation (The default distance comparer is created the first time when needed by the CreateDefaultDistanceComparer mathod if distance comparer has not ben set before). | |||
IRandomGenerator | Rand [get, set] | ||
Random generator used by the current cloud of points. | |||
Private Attributes | |||
IRandomGenerator | _rand |
Cloud of points, contains a list of containers of objects that include point coordinates.
PointContainerType | Type of point link that is used by point container. |
PointType | Type of objects that include point coordinates. |
$A Igor Sep08 May09 Dec11;
PointLinkType | Type of point container used by the class. |
PointContainerType | Type of point link that is used by point container. |
PointType | Type of objects that include point coordinates. |
This class as a part of group of classes that have been created in 2008 in order to support different operations and algorithms on losely connected clouds of points that are embedded in space of arbitrary dimension. The primary intended application was in optimization algorithms based on successive approximations of response and on restricted step prototype algorithms, developed by the author. The scope is much broader, however, because these classes can support closest neighbors algorithms, various graph algorithms based on points in space, detection of clusters, etc.
In 2009, major refactoring has been performed where a more generic structure has been introduced, allowing implementation of generic algorithm methods that can be used with different representations of points.
In 2011, the classes weer migrated from sandbox environment to the prduction IGLib library and simplified a bit. The intention is to use the classes in the artificial neural network-based approximation modules developed for COBIK and the University of Nova Gorica. The intention is, however, that the eventual algorithms developed within this scope are implemented in a generic way, such that they can serve multiple purposes.
$A Igor Sep08 May09 Dec11;
PointContainerType | : | PointContainer | |
PointContainerType | : | PointLink | |
PointContainerType | : | PointContainerType | |
PointContainerType | : | PointType | |
PointContainerType | : | PointContainerType | |
PointContainerType | : | PointType |
IG::Num::PointCloud< PointContainerType, PointType >::PointCloud | ( | ) | [inline] |
IG::Num::PointCloud< PointContainerType, PointType >::PointCloud | ( | params PointType[] | points | ) | [inline] |
Constructs a cloud of points containing the specified points.
points | Points that are included in the created point cloud. |
IG::Num::PointCloud< PointContainerType, PointType >::PointCloud | ( | params IPointContainer< PointType >[] | points | ) | [inline] |
Constructs a cloud of points containing the points embedded in the specified point containers. All points are taken from their point containers and embedded in newly created point containers before adding to the created cloud of points.
points | Points embedded in point containers that are included in the created point cloud. |
IG::Num::PointCloud< PointContainerType, PointType >::PointCloud | ( | ) | [inline] |
Constructs an empty cloud of points.
IG::Num::PointCloud< PointContainerType, PointType >::PointCloud | ( | params PointType[] | points | ) | [inline] |
Constructs a cloud of points containing the specified points.
points | Points that are included in the created point cloud. |
IG::Num::PointCloud< PointContainerType, PointType >::PointCloud | ( | params IPointContainer< PointType >[] | points | ) | [inline] |
Constructs a cloud of points containing the points embedded in the specified point containers. All points are taken from their point containers and embedded in newly created point containers before adding to the created cloud of points.
points | Points embedded in point containers that are included in the created point cloud. |
PointContainerType IG::Num::PointCloud< PointContainerType, PointType >::GetPoint | ( | int | which | ) | [inline] |
Returns the specified point identified by its position (index) within list of points.
which | Point index in the list. |
void IG::Num::PointCloud< PointContainerType, PointType >::SetPoints | ( | params PointType[] | points | ) | [inline] |
Sets the points to be contained in the current point cloud. Each point is embedded in a newly created point container.
points | Points to be contained in the current point cloud. |
void IG::Num::PointCloud< PointContainerType, PointType >::AddPoints | ( | params PointType[] | points | ) | [inline] |
Adds the specified points to the current point cloud. Each added point is embedded in a newly created point container.
points | Points embedded in point containers to be contained in the current point cloud. |
void IG::Num::PointCloud< PointContainerType, PointType >::SetPoints | ( | params IPointContainer< PointType >[] | points | ) | [inline] |
Sets the points to be contained in the current point cloud to the specified set of points that are embedded in point containers. Each of the specified points is taken from its current container embedded in a newly created point container.
points | Points to be contained in the current point cloud. |
void IG::Num::PointCloud< PointContainerType, PointType >::AddPoints | ( | params IPointContainer< PointType >[] | points | ) | [inline] |
Adds the specified points that are embedded in point containers to the current point cloud. Each of the specified points is taken from its current container embedded in a newly created point container.
points | Points embedded in point containers to be contained in the current point cloud. |
abstract DistanceComparer<PointContainerType, PointType> IG::Num::PointCloud< PointContainerType, PointType >::CreateDefaultDistanceComparer | ( | PointContainerType | point | ) | [pure virtual] |
Creates and returnws a distance comparer of hte default type for the current type of point of clouds.
virtual DistanceComparer<PointContainerType, PointType> IG::Num::PointCloud< PointContainerType, PointType >::CreateDefaultDistanceComparer | ( | ) | [inline, virtual] |
Creates and returnws a distance comparer of hte default type for the current type of point of clouds.
abstract PointType IG::Num::PointCloud< PointContainerType, PointType >::CreatePointFromCoordinates | ( | IVector | coordinates | ) | [pure virtual] |
Creates and returns a new point with specified coordinates.
coordinates | Coordinates of the created point. A copy of this vector should always be created to hold coordinates within the point, because the caller is allowed to modify coordinates on the vector. |
Implemented in IG::Num::PointCloudSampledDataElement, and IG::Num::PointCloudVector.
abstract PointContainerType IG::Num::PointCloud< PointContainerType, PointType >::CreatePointContainer | ( | PointType | point | ) | [pure virtual] |
Creates and returns a new point container that wraps the specified point.
point | Point to be wrapped. |
virtual PointContainerType IG::Num::PointCloud< PointContainerType, PointType >::CreatePointContainerFromCoordinates | ( | IVector | coordinates | ) | [inline, virtual] |
Creates and returns a new point container that wraps a newly created point with the specified coordinates.
coordinates | Coordinates of the embedded point type. A copy of this vector is normally created to hold coordinates within the point, because the caller is allowed to modify coordinates on the vector. |
List<PointContainerType> IG::Num::PointCloud< PointContainerType, PointType >::CreatePointsCopy | ( | ) | [inline] |
Creates and returns a copy of list of points, containing references to points (point containers, in fact) contained in the current cloud of points.
PointType IG::Num::PointCloud< PointContainerType, PointType >::CreateRandomPoint | ( | IBoundingBox | bounds | ) | [inline] |
Creates and returns a new point with random co-ordinates that fall within the specified bounds (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property.
bounds | Bounds (inclusive) on co-ordinates of the generated points. |
PointType IG::Num::PointCloud< PointContainerType, PointType >::CreateRandomPoint | ( | int | spaceDimension, |
double | minCoordinateValues, | ||
double | maxCoordinateValues | ||
) | [inline] |
Creates and returns a new point with random co-ordinates that fall within the specified bounds (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property.
spaceDimension | Dimension of generated point. |
minCoordinateValues | Minimal value of co-ordinates (inclusive). |
maxCoordinateValues | Maximal value of co-ordinates (inclusive). |
PointType IG::Num::PointCloud< PointContainerType, PointType >::CreateRandomPoint | ( | int | spaceDimension | ) | [inline] |
Creates and returns a new point with random co-ordinates that fall between 0 and 1 (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property.
spaceDimension | Dimension of generated point. |
PointContainerType IG::Num::PointCloud< PointContainerType, PointType >::CreateRandomPointContainer | ( | IBoundingBox | bounds | ) | [inline] |
Creates and returns a new point container with random co-ordinates that fall within the specified bounds (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property.
bounds | Bounds (inclusive) on co-ordinates of the generated points. |
PointContainerType IG::Num::PointCloud< PointContainerType, PointType >::CreateRandomPointContainer | ( | int | spaceDimension, |
double | minCoordinateValues, | ||
double | maxCoordinateValues | ||
) | [inline] |
Creates and returns a new point container with random co-ordinates that fall within the specified bounds (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property.
spaceDimension | Dimension of generated point. |
minCoordinateValues | Minimal value of co-ordinates (inclusive). |
maxCoordinateValues | Maximal value of co-ordinates (inclusive). |
PointContainerType IG::Num::PointCloud< PointContainerType, PointType >::CreateRandomPointContainer | ( | int | spaceDimension | ) | [inline] |
Creates and returns a new point container with random co-ordinates that fall between 0 and 1 (inclusively). Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property.
spaceDimension | Dimension of generated point. |
void IG::Num::PointCloud< PointContainerType, PointType >::GenerateRandomCloud | ( | int | numPoints, |
IBoundingBox | bounds | ||
) | [inline] |
Generates a specified number of random points with random co-ordinates that fall within the specified bounds (inclusively), and incorporates them into the current point cloud. Eventual existent points are removed from the cloud. Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property.
bounds | Bounds (inclusive) on co-ordinates of the generated points. |
void IG::Num::PointCloud< PointContainerType, PointType >::GenerateRandomCloud | ( | int | numPoints, |
int | spaceDimension, | ||
double | minCoordinateValues, | ||
double | maxCoordinateValues | ||
) | [inline] |
Generates a specified number of random points with random co-ordinates that fall within the specified bounds (inclusively), and incorporates them into the current point cloud. Eventual existent points are removed from the cloud. Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property.
spaceDimension | Dimension of generated point. |
minCoordinateValues | Minimal value of co-ordinates (inclusive). |
maxCoordinateValues | Maximal value of co-ordinates (inclusive). |
void IG::Num::PointCloud< PointContainerType, PointType >::GenerateRandomCloud | ( | int | numPoints, |
int | spaceDimension | ||
) | [inline] |
Generates a specified number of random points with random co-ordinates that fall between 0 and 1 (inclusively), and incorporates them into the current point cloud. Eventual existent points are removed from the cloud. Object's internal random generator is used to create random co-ordinates. This random generator can be set through the Rand property.
spaceDimension | Dimension of generated point. |
void IG::Num::PointCloud< PointContainerType, PointType >::UpdateNeighborDistances | ( | IDistanceComparer< PointContainerType, PointType > | distanceComparer | ) | [inline] |
Iterates through all points contained in the current cloud, and calculates and updates their distances to the containing point by the specified distance comparer.
void IG::Num::PointCloud< PointContainerType, PointType >::GetNeighborDistanceStatistics | ( | int | numClosestPoints, |
ref int[] | numSpecimens, | ||
ref IVector | minDistances, | ||
ref IVector | maxDistances, | ||
ref IVector | averageDistances | ||
) | [inline] |
Calculates a number of statistics on the distances of the first specified number of closest neighbors to each point, and stores them to the provided storage. It is assumed htat distances to the master points are calculated and stored on neighbors (links), and that neighbors are sorted accorgding to ascending distances from their master point.Objects to store data are re-allocated if necessary.
numClosestPoints | Number of closest neighbors for which statistics are calculated. |
numSpecimens | Numbers of actual samples for each k-th closest neighbor. I.e., the k-th element will store the number of points for which the k-th closest neighbor is actually defined. |
minDistances | Minimal distances. The k-th element stores minimal distance of the k-th closest neighbor from its master over all points in the cloud. |
maxDistances | Maximal distances. The k-th element stores maximal distance of the k-th closest neighbor from its master over all points in the cloud. |
averageDistances | Average distances. The k-th element stores average distance of the k-th closest neighbor from its master over all points in the cloud. |
void IG::Num::PointCloud< PointContainerType, PointType >::GetNeighborDistanceStatistics | ( | int | numClosestPoints, |
ref int[] | numSpecimens, | ||
ref IVector | minDistances, | ||
ref IVector | maxDistances, | ||
ref IVector | averageDistances, | ||
ref IVector | standardDeviations, | ||
ref IVector | averageAbsoluteDeviations, | ||
bool | calculateDeviations | ||
) | [inline] |
Calculates a number of statistics on the distances of the first specified number of closest neighbors to each point, and stores them to the provided storage. It is assumed htat distances to the master points are calculated and stored on neighbors (links), and that neighbors are sorted accorgding to ascending distances from their master point.Objects to store data are re-allocated if necessary.
numClosestPoints | Number of closest neighbors for which statistics are calculated. |
numSpecimens | Numbers of actual samples for each k-th closest neighbor. I.e., the k-th element will store the number of points for which the k-th closest neighbor is actually defined. |
minDistances | Minimal distances. The k-th element stores minimal distance of the k-th closest neighbor from its master over all points in the cloud. |
maxDistances | Maximal distances. The k-th element stores maximal distance of the k-th closest neighbor from its master over all points in the cloud. |
averageDistances | Average distances. The k-th element stores average distance of the k-th closest neighbor from its master over all points in the cloud. |
standardDeviations | Standard deviations of distances. The k-th element stores standard deviation of distance of the k-th closest neighbor from its master over all points in the cloud. |
averageAbsoluteDeviations | Average absolute deviations of distances. The k-th element stores average absolute deviation of distance of the k-th closest neighbor from its master over all points in the cloud. |
calculateDeviations | Specifies whether the standard deviation and average absolute deviations of distances are also calculated. |
void IG::Num::PointCloud< PointContainerType, PointType >::PrintNeighborDistanceStatistics | ( | int[] | numSpecimens, |
IVector | minDistances, | ||
IVector | maxDistances, | ||
IVector | averageDistances, | ||
IVector | standardDeviations, | ||
IVector | averageAbsoluteDeviations, | ||
bool | calculateDeviations | ||
) | [inline, protected] |
void IG::Num::PointCloud< PointContainerType, PointType >::PrintNeighborDistanceStatistics | ( | int[] | numSpecimens, |
IVector | minDistances, | ||
IVector | maxDistances, | ||
IVector | averageDistances | ||
) | [inline, protected] |
void IG::Num::PointCloud< PointContainerType, PointType >::PrintNeighborDistanceStatistics | ( | int | numClosestPoints, |
bool | calculateDeviations, | ||
IDistanceComparer< PointContainerType, PointType > | distanceComparer | ||
) | [inline] |
Calculates and prints a number of statistics on the distances of the first specified number of closest neighbors to each point, and stores them to the provided storage. It is assumed htat distances to the master points are calculated and stored on neighbors (links), and that neighbors are sorted accorgding to ascending distances from their master point.Objects to store data are re-allocated if necessary.
numClosestPoints | Number of closest neighbors for which statistics are calculated. |
calculateDeviations | Specifies whether the standard deviation and average absolute deviations of distances are also calculated. |
distanceComparer | Distance comparer used to calculate distances and to compare points. |
static void IG::Num::PointCloud< PointContainerType, PointType >::TestClosestPoints | ( | int | numClosestPoints, |
bool | printByComponents, | ||
PointContainerType[] | referencePoints, | ||
IDistanceComparer< PointContainerType, PointType > | comparerInput, | ||
List< PointContainerType > | trainingPoints | ||
) | [inline, static] |
For each point in the specified array, the training points are sorted according to the distance to this point, and data for the specified number of closest points are written. Result of this test can give some rough feeling about filling of space (but very rough because anisotropy can not be detected in this way).
numClosestPoints | Number of closest points that are written. |
includeVerificationPoints | Whether verification points are included or not. |
printByComponents | If true then results are also printed by components. |
referencePoints | Points that are checked for closest data points contained in the specified list of points. |
comparerInput | Comparer object that calculates distance between points and compares compares points according to their distance to a reference point. |
/
trainingPoints | Cloud of points that cover specific region of space and for which one wants to check how well the space is covered by these points. |
$A Igor xx Jan12;
static void IG::Num::PointCloud< PointContainerType, PointType >::TestClosestPoints | ( | int | numClosestPoints, |
bool | printByComponents, | ||
bool | printIndividualPointsComp, | ||
PointContainerType[] | referencePoints, | ||
IDistanceComparer< PointContainerType, PointType > | comparerInput, | ||
List< PointContainerType > | trainingPoints | ||
) | [inline, static] |
For each point in the specified array, the training points are sorted according to the distance to this point, and data for the specified number of closest points are written. For individual points, differences are not printed by components.Result of this test can give some rough feeling about filling of space (but very rough because anisotropy can not be detected in this way).
numClosestPoints | Number of closest points that are written. |
includeVerificationPoints | Whether verification points are included or not. |
printByComponents | If true then results are also printed by components. |
printIndividualPointsComp | If true then individual components of differences are printed for individual points (otherwise, they are only printed in statistics). |
referencePoints | Points that are checked for closest data points contained in the specified list of points. |
comparerInput | Comparer object that calculates distance between points and compares compares points according to their distance to a reference point. |
trainingPoints | Cloud of points that cover specific region of space and for which one wants to check how well the space is covered by these points. |
$A Igor xx Jan12;
void IG::Num::PointCloud< PointContainerType, PointType >::TestClosestPointsWithOutputs | ( | int | numClosestPoints, |
bool | printByComponents, | ||
bool | printIndividualPointsComp, | ||
PointContainerType[] | points, | ||
IDistanceComparer< PointContainerType, PointType > | comparerInput, | ||
List< PointContainerType > | trainingPoints | ||
) | [inline] |
For each point (training element) in the specified array, the training points are sorted according to the distance to this point, and data for the specified number of closest points are written. Result of this test can give some rough feeling about filling of space (but very rough because anisotropy can not be detected in this way).
numClosestPoints | Number of closest points that are written. | ||||||
includeVerificationPoints | Whether verification points are included or not. | ||||||
printByComponents | If true then results are also printed by components. | ||||||
printIndividualPoints | If true then individual components of differences are printed for
$A Igor xx Jan12; |
void IG::Num::PointCloud< PointContainerType, PointType >::FindClosestPointsDummy | ( | IDistanceComparer< PointContainerType, PointType > | comparer, |
int | numClosestPoints | ||
) | [inline] |
Finds the specified number fo closest points to each point contained in the current cloud, and updates the neighbor lists of points such that they contain links to these neighbors.
comparer | Comparer used to compare two points by distance to a reference point. |
Used for sorting a list of all points according to their distance with the currently processed point.
numClosestPoints | Number of closest points to be identified for each point. |
This method is a dummy approach, it is slow and has time efficiency of N^2*log2(N). However, the method finds exact closest points for all points in the cloud.
void IG::Num::PointCloud< PointContainerType, PointType >::FindClosestPointsDummy | ( | IDistanceComparer< PointContainerType, PointType > | comparer, |
int | numClosestPoints, | ||
bool | accelerateSortingByStoringDistances | ||
) | [inline] |
Finds the specified number fo closest points to each point contained in the current cloud, and updates the neighbor lists of points such that they contain links to these neighbors.
comparer | Comparer used to compare two points by distance to a reference point. |
Used for sorting a list of all points according to their distance with the currently processed point.
numClosestPoints | Number of closest points to be identified for each point. |
accelerateSortingByStoringDistances | If true then quicker sorting approach that stores the distances to the reference point and compares points according to these values, is used. |
This method is a dummy approach, it is slow and has time efficiency of N^2*log2(N). However, the method finds exact closest points for all points in the cloud.
void IG::Num::PointCloud< PointContainerType, PointType >::FindClosestPointsGraph | ( | IDistanceComparer< PointContainerType, PointType > | comparer, |
int | numClosestPoints | ||
) | [inline] |
Finds closest points by initializing with random neighbors and then gradually improving connections to neighbors.
comparer | Distance comparer used to sort points according to the distance to a reference point. |
numClosestPoints | Number of closest points to detect. |
static PointCloudVector IG::Num::PointCloud< PointContainerType, PointType >::ExampleClosestPointsDummy | ( | int | numPoints, |
int | spaceDimension, | ||
int | numClosestPoints | ||
) | [inline, static] |
Creates rabndomly an example cloud of points, calculates the specified number of closest neighbors by the dummy method for each point in an example cloud, and prints statistics. Sorting is accellerated by storing distances to reference points and using them in comparison.
numPoints | Number of points in the created random cloud. |
spaceDimension | Dimension of space in which points are embedded. |
numClosestPoints | Number of closest points to each point. |
static PointCloudVector IG::Num::PointCloud< PointContainerType, PointType >::ExampleClosestPointsDummy | ( | int | numPoints, |
int | spaceDimension, | ||
int | numClosestPoints, | ||
bool | accelerateSortingByStoringDistances | ||
) | [inline, static] |
Creates randomly an example cloud of points, calculates the specified number of closest neighbors by the dummy method for each point in an example cloud, and prints statistics.
numPoints | Number of points in the created random cloud. |
spaceDimension | Dimension of space in which points are embedded. |
numClosestPoints | Number of closest points to each point. |
accelerateSortingByStoringDistances | If true then sorting is accelerated by first calculating and storing distances on point containers and used the pre-calculated distances in comparison. |
internal object IG::Num::PointCloud< PointContainerType, PointType >::_lock = new object() [protected] |
List<PointContainerType> IG::Num::PointCloud< PointContainerType, PointType >::_points = new List<PointContainerType>() [protected] |
DistanceComparer<PointContainerType, PointType> IG::Num::PointCloud< PointContainerType, PointType >::_distanceComparer |
IRandomGenerator IG::Num::PointCloud< PointContainerType, PointType >::_rand [private] |
IVector IG::Num::PointCloud< PointContainerType, PointType >::_auxVector [protected] |
object IG::Num::PointCloud< PointContainerType, PointType >::Lock [get] |
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock.
Implements IG::Lib::ILockable.
List<PointContainerType> IG::Num::PointCloud< PointContainerType, PointType >::Points [get] |
List of points contained on the current class.
int IG::Num::PointCloud< PointContainerType, PointType >::NumPoints [get] |
Gets the current number of points on the list.
PointContainerType IG::Num::PointCloud< PointContainerType, PointType >::this[int which] [get, set] |
Returns the specified point identified by its position (index) within list of points.
which | Point index in the list. |
DistanceComparer<PointContainerType, PointType> IG::Num::PointCloud< PointContainerType, PointType >::DistanceComparer [get, set] |
Distance comparer of the current point cloud object. Getter has lazy evaluation (The default distance comparer is created the first time when needed by the CreateDefaultDistanceComparer mathod if distance comparer has not ben set before).
IRandomGenerator IG::Num::PointCloud< PointContainerType, PointType >::Rand [get, set] |
Random generator used by the current cloud of points.