The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... 
Home MathPack Matrix Classes TIntMatrix, TMatrix and TMat3D Methods CalcDistMat  
See also: TDistMode, OnCalcDistance, DistanceOfObjects  
CalcDistMat 

The method CalcDistMat calculates the distance matrix of the objects contained in self. The rows of the matrix self are regarded as objects. the columns as variables. The parameter Mode defines the type of distance to be calculated. The parameter DMat is a pointer to a quadratic matrix which is to be filled with the distance values. DMat has to be quadratic; its size has to be equal to the number of rows of self. Note, that the distance matrix can use up a considerable amount of memory if the data matrix has many rows. CalcDistMat returns an error code which has the following meaning:
If the parameter Mode is set to dmUserDef an OnCalcDistance event is triggered every time a new distance has to be calculated. This way the user may create any kind of distance measure.
