IGLib  1.5
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
IG.Num.IDistanceComparer< PointContainerType, PointType > Interface Template Reference

Interface used for distance comparers in point clouds. More...

+ Inheritance diagram for IG.Num.IDistanceComparer< PointContainerType, PointType >:
+ Collaboration diagram for IG.Num.IDistanceComparer< PointContainerType, PointType >:

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...
 

Detailed Description

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.

Template Parameters
PointTypeType of the point objects that have a point position in space, and whose containers of type PointContainer<PointType> are compared by the current class.
PointContainerTypeType of point container that is used to wrap points of the point type.
Type Constraints
PointContainerType :IPointContainer<PointType> 

Member Function Documentation

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.

Parameters
ptPoint for which vector of coordinates is obtained.
coordVector 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.

Parameters
minVector of minimal coordinates.
maxVector of maximal coordinates.
lengthScalesVector 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.

Parameters
coordVector of original coordinates.
relativeCoortinatesVector 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.

Parameters
minVector of minimal output coordinates.
maxVector of maximal output coordinates.
lengthScalesVector 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.

Parameters
coordVector of original coordinates.
relativeCoortinatesVector 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.

Parameters
pt1The first poiint container for distance calculation.
pt2The 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 
)
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.

Parameters
boxedPt1The first point.
boxedPt2The 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.

Parameters
boxedPt1The first training element.
pt2The 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.

Parameters
pt1The first point.
boxedPt2The 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).

Parameters
ptVector 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).

Parameters
ptPont 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.

Parameters
listList 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.

Parameters
listList of point containers to be sorted.

Implemented in IG.Num.DistanceComparer< PointContainerType, PointType >.

Property Documentation

PointContainerType IG.Num.IDistanceComparer< PointContainerType, PointType >.ReferencePoint
getset
IVector IG.Num.IDistanceComparer< PointContainerType, PointType >.LengthScales
set

Sets the vector of length scales that are used for calculation of distances.

Property has protected setter.

IVector IG.Num.IDistanceComparer< PointContainerType, PointType >.Min
set

Sets the vector of minimal values for point coordinates. Needed for calculation of relative coordinate vector.

IVector IG.Num.IDistanceComparer< PointContainerType, PointType >.Max
set

Sets the vector of maximal values point coordinates. Needed for calculation of relative coordinate vector.

IVector IG.Num.IDistanceComparer< PointContainerType, PointType >.OutputLengthScales
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.

IVector IG.Num.IDistanceComparer< PointContainerType, PointType >.OutputMin
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.

IVector IG.Num.IDistanceComparer< PointContainerType, PointType >.OutputMax
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.

IComparer<PointContainerType> IG.Num.IDistanceComparer< PointContainerType, PointType >.StoredDistanceComparer
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().


The documentation for this interface was generated from the following file: