IGLib
1.5
The IGLib base library for development of numerical, technical and business applications.
|
Interface used for distance comparers in point clouds. More...
Public Member Functions | |
void | GetPointCoordinates (PointType pt, ref IVector coord) |
Gets vector of coordinates of the specified point and stores it in the specified variable. More... | |
void | SetCoordinateScales (IVector min, IVector max, IVector lengthScales) |
Sets parameters that affect default calculation of distance and relative point coordinates. More... | |
void | GetRelativeCoordinates (IVector coord, ref IVector relativeCoortinates) |
Converts the specified coordinates to relative coorsinates where compponents run from 0 to 1 if original coordinates run from minimal to maximal value. More... | |
void | SetOutputScales (IVector min, IVector max, IVector lengthScales) |
Sets parameters that affect default calculation of output distance and output relative coordinates. More... | |
void | GetOutputRelativeCoordinates (IVector coord, ref IVector relativeCoortinates) |
Converts the specified OUTPUT coordinates to relative coordinates where compponents run from 0 to 1 if original coordinates run from minimal to maximal value. More... | |
double | OutputDistance (PointContainerType pt1, PointContainerType pt2) |
Returns output distance between two point containers. More... | |
double | Distance (PointType pt1, PointType pt2) |
Returns distance between the specified two points. More... | |
double | Distance (PointContainerType boxedPt1, PointContainerType boxedPt2) |
Returns distance between the specified two points enclosed in PointContainer objects, as defined by the distance calculation delegate (property DistanceFunction) of the current object. More... | |
double | Distance (PointContainerType boxedPt1, PointType pt2) |
Returns distance between the specified point encolosed in an PointContainer object and a non-enclosed point, as defined by the distance calculation delegate (property DistanceFunction) of the current object. More... | |
double | Distance (PointType pt1, PointContainerType boxedPt2) |
Returns distance between the specified point and the second point encolosed in an PointContainer object, as defined by the distance calculation delegate (property DistanceFunction) of the current object. More... | |
double | Distance (PointType pt) |
Returns distance between the specified point and the reference point (property ReferencePoint) of the current object (enclosed in PointContainer<PointType> object), as defined by the distance calculation delegate of the current comparer object (property DistanceFunction). More... | |
double | Distance (PointContainerType boxedPt) |
Returns distance between the specified point (enclosed in PointContainer<PointType> pbject) and the reference point (property ReferencePoint) of the current object (property ReferencePoint), as defined by the distance calculation delegate of the current comparer object (property DistanceFunction). More... | |
void | Sort (List< PointContainerType > list) |
Sorts a list of point containers with the current comparer. More... | |
void | SortUsingStoredDistance (List< PointContainerType > list) |
Sorts a list of point containers with the current comparer. More... | |
Properties | |
PointContainerType | ReferencePoint [get, set] |
Reference point. More... | |
IVector | LengthScales [set] |
Sets the vector of length scales that are used for calculation of distances. More... | |
IVector | Min [set] |
Sets the vector of minimal values for point coordinates. Needed for calculation of relative coordinate vector. More... | |
IVector | Max [set] |
Sets the vector of maximal values point coordinates. Needed for calculation of relative coordinate vector. More... | |
IVector | OutputLengthScales [set] |
Sets the vector of OUTPUT vector's length scales that are used for calculation of distances and relative coordinates. More... | |
IVector | OutputMin [set] |
Sets the vector of minimal values for point OUTPUT values. Needed for calculation of relative coordinate vector. More... | |
IVector | OutputMax [set] |
Sets the vector of maximal values point OUTPUT values. Needed for calculation of relative coordinate vector. More... | |
IComparer< PointContainerType > | StoredDistanceComparer [get] |
Gets comparer that compares two point containers of type PointContainerType by the stored distance stored on those points. More... | |
Interface used for distance comparers in point clouds.
Distance comparers are able to calculate distances between contained points or between point containers, and to compare point containers according to their distance with a reference point.
PointType | Type of the point objects that have a point position in space, and whose containers of type PointContainer<PointType> are compared by the current class. |
PointContainerType | Type of point container that is used to wrap points of the point type. |
PointContainerType | : | IPointContainer<PointType> |
void IG.Num.IDistanceComparer< PointContainerType, PointType >.GetPointCoordinates | ( | PointType | pt, |
ref IVector | coord | ||
) |
Gets vector of coordinates of the specified point and stores it in the specified variable.
Where the type of point object itself contains vector of coordinates, only reference is stored. The obtained vector should therefore not be modified in any way.
pt | Point for which vector of coordinates is obtained. |
coord | Vector variable where extracted vector of coordinates is stored. |
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
void IG.Num.IDistanceComparer< PointContainerType, PointType >.SetCoordinateScales | ( | IVector | min, |
IVector | max, | ||
IVector | lengthScales | ||
) |
Sets parameters that affect default calculation of distance and relative point coordinates.
min | Vector of minimal coordinates. |
max | Vector of maximal coordinates. |
lengthScales | Vector of length scales. |
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
void IG.Num.IDistanceComparer< PointContainerType, PointType >.GetRelativeCoordinates | ( | IVector | coord, |
ref IVector | relativeCoortinates | ||
) |
Converts the specified coordinates to relative coorsinates where compponents run from 0 to 1 if original coordinates run from minimal to maximal value.
Minimal coordinate values are stored in Min and maximal values are stored in Max.
coord | Vector of original coordinates. |
relativeCoortinates | Vector where converted relative coordinates are stored. |
Calculation of relative coordinates does not rely on the vector of length scales, but only on vectors of minimal and maximal coordinates.
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
Referenced by IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.TestClosestPoints(), and IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.TestClosestPointsWithOutputs().
void IG.Num.IDistanceComparer< PointContainerType, PointType >.SetOutputScales | ( | IVector | min, |
IVector | max, | ||
IVector | lengthScales | ||
) |
Sets parameters that affect default calculation of output distance and output relative coordinates.
min | Vector of minimal output coordinates. |
max | Vector of maximal output coordinates. |
lengthScales | Vector of output length scales. |
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
void IG.Num.IDistanceComparer< PointContainerType, PointType >.GetOutputRelativeCoordinates | ( | IVector | coord, |
ref IVector | relativeCoortinates | ||
) |
Converts the specified OUTPUT coordinates to relative coordinates where compponents run from 0 to 1 if original coordinates run from minimal to maximal value.
Minimal OUTPUT coordinate values are stored in OutputMin and maximal values are stored in OutputMax.
coord | Vector of original coordinates. |
relativeCoortinates | Vector where converted relative OUTPUT coordinates are stored. |
Calculation of relative coordinates does not rely on the vector of length scales, but only on vectors of minimal and maximal coordinates.
This functionality is used only in those types of points that have input parameters and output values, such as approximation data points.
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
Referenced by IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.TestClosestPointsWithOutputs().
double IG.Num.IDistanceComparer< PointContainerType, PointType >.OutputDistance | ( | PointContainerType | pt1, |
PointContainerType | pt2 | ||
) |
Returns output distance between two point containers.
If vector of output scales (property OutputLengthScales) is specified then weighted Euclidean distance between output vectors of the specified containers is returned (differences in components are divided by components of vector output scaling lengths before being squared).
If vector of output length scales is not specified then usual Euclidean distance between coordinates of the two specified points is returned.
pt1 | The first poiint container for distance calculation. |
pt2 | The second point container for distance calculation. |
This functionality is used only in those types of points that have input parameters and output values, such as approximation data points.
While definition of input distance (between point co-ordinates) can be defined by a delegate, definition of output distance is currenyly fixed, can not be modified (except by setting the vector of output length scales that affects the definition).
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
Referenced by IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.TestClosestPointsWithOutputs().
double IG.Num.IDistanceComparer< PointContainerType, PointType >.Distance | ( | PointType | pt1, |
PointType | pt2 | ||
) |
Returns distance between the specified two points.
pt1 | The first point. |
pt2 | The second point. |
Distance is defined by the DistanceFunction property, which is a delegate of type DistanceDelegate<PointType>.
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
Referenced by IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.FindClosestPointsDummy(), IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.TestClosestPoints(), IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.TestClosestPointsWithOutputs(), and IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.UpdateNeighborDistances().
double IG.Num.IDistanceComparer< PointContainerType, PointType >.Distance | ( | PointContainerType | boxedPt1, |
PointContainerType | boxedPt2 | ||
) |
Returns distance between the specified two points enclosed in PointContainer objects, as defined by the distance calculation delegate (property DistanceFunction) of the current object.
boxedPt1 | The first point. |
boxedPt2 | The second point. |
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
double IG.Num.IDistanceComparer< PointContainerType, PointType >.Distance | ( | PointContainerType | boxedPt1, |
PointType | pt2 | ||
) |
Returns distance between the specified point encolosed in an PointContainer object and a non-enclosed point, as defined by the distance calculation delegate (property DistanceFunction) of the current object.
boxedPt1 | The first training element. |
pt2 | The second training element. |
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
double IG.Num.IDistanceComparer< PointContainerType, PointType >.Distance | ( | PointType | pt1, |
PointContainerType | boxedPt2 | ||
) |
Returns distance between the specified point and the second point encolosed in an PointContainer object, as defined by the distance calculation delegate (property DistanceFunction) of the current object.
pt1 | The first point. |
boxedPt2 | The second point enclosed in PointContainer<PointType> object. |
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
double IG.Num.IDistanceComparer< PointContainerType, PointType >.Distance | ( | PointType | pt | ) |
Returns distance between the specified point and the reference point (property ReferencePoint) of the current object (enclosed in PointContainer<PointType> object), as defined by the distance calculation delegate of the current comparer object (property DistanceFunction).
pt | Vector whose distance to the reference point is returned. |
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
double IG.Num.IDistanceComparer< PointContainerType, PointType >.Distance | ( | PointContainerType | boxedPt | ) |
Returns distance between the specified point (enclosed in PointContainer<PointType> pbject) and the reference point (property ReferencePoint) of the current object (property ReferencePoint), as defined by the distance calculation delegate of the current comparer object (property DistanceFunction).
pt | Pont enclosed in an PointContainer<PointType> whose distance to the reference point is returned. |
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
void IG.Num.IDistanceComparer< PointContainerType, PointType >.Sort | ( | List< PointContainerType > | list | ) |
Sorts a list of point containers with the current comparer.
list | List of point containers to be sorted. |
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
Referenced by IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.FindClosestPointsDummy().
void IG.Num.IDistanceComparer< PointContainerType, PointType >.SortUsingStoredDistance | ( | List< PointContainerType > | list | ) |
Sorts a list of point containers with the current comparer.
list | List of point containers to be sorted. |
Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.
|
getset |
Reference point.
Points are compared with respect to the distance to this point.
Referenced by IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.FindClosestPointsDummy(), IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.TestClosestPoints(), and IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.TestClosestPointsWithOutputs().
|
set |
Sets the vector of length scales that are used for calculation of distances.
Property has protected setter.
|
set |
Sets the vector of minimal values for point coordinates. Needed for calculation of relative coordinate vector.
|
set |
Sets the vector of maximal values point coordinates. Needed for calculation of relative coordinate vector.
|
set |
Sets the vector of OUTPUT vector's length scales that are used for calculation of distances and relative coordinates.
Property has protected setter.
This functionality is used only in those types of points that have input parameters and output values, such as approximation data points.
|
set |
Sets the vector of minimal values for point OUTPUT values. Needed for calculation of relative coordinate vector.
Property has protected setter.
This functionality is used only in those types of points that have input parameters and output values, such as approximation data points.
|
set |
Sets the vector of maximal values point OUTPUT values. Needed for calculation of relative coordinate vector.
Property has protected setter.
This functionality is used only in those types of points that have input parameters and output values, such as approximation data points.
|
get |
Gets comparer that compares two point containers of type PointContainerType by the stored distance stored on those points.
Referenced by IG.Num.PointCloud< PointLinkType, PointContainerType, PointType >.FindClosestPointsDummy().