moj.similarity.measures
Class MinkowskiD_row

java.lang.Object
  extended by moj.similarity.SimilarityMeasure
      extended by moj.similarity.measures.MinkowskiD_row

public class MinkowskiD_row
extends SimilarityMeasure

MINKOWSKI DISTANCE
http://disney.ctr.columbia.edu/jrsthesis/node66.html#SECTION00731000000000000000

Version:
2004-Sep-15
Author:
Martin Hassel

Constructor Summary
MinkowskiD_row(int power)
          Minkowski metrics are a family of distance measurements which are generalized from the Euclidean distance formula.
 
Method Summary
 double[][] analyzeMatrix(float[][] data_matrix)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinkowskiD_row

public MinkowskiD_row(int power)
Minkowski metrics are a family of distance measurements which are generalized from the Euclidean distance formula. Two values of power have easily interpretable meanings: At power=2, you get the typical Euclidean distance and at power=1 yields the city-block metric, so named because it gives the distance you'd have to travel to get between two points if you were walking on a grid of city streets (no real diagonals).
Default is power=2.

Parameters:
power - the Minkowski parameter
Method Detail

analyzeMatrix

public double[][] analyzeMatrix(float[][] data_matrix)
Specified by:
analyzeMatrix in class SimilarityMeasure
Parameters:
data_matrix - an array of float arrays denoting the rows in the matrix that are to be compared for similarity.
Returns:
an array of double arrays containing the similarities between all rows