es.nlp.uned.utilities
Class MathHelper

java.lang.Object
  extended by es.nlp.uned.utilities.MathHelper

public class MathHelper
extends java.lang.Object

The Class MathHelper.


Constructor Summary
MathHelper()
           
 
Method Summary
static double euclideanDistance(int[] vector_1, int[] vector_2, boolean normalized)
          Al normalizar convertimos la distancia euclidea en una medida de similitud.
static void printMatrix(java.lang.String[] columns, java.lang.String[] rows, java.lang.Object[][] matrix)
          Prints the matrix.
static double round(double number, int decimals)
          Round.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathHelper

public MathHelper()
Method Detail

round

public static double round(double number,
                           int decimals)
Round.

Parameters:
decimals - the decimals
number - the number
Returns:
the double

euclideanDistance

public static double euclideanDistance(int[] vector_1,
                                       int[] vector_2,
                                       boolean normalized)
Al normalizar convertimos la distancia euclidea en una medida de similitud.

Parameters:
vector_1 - the vector_1
vector_2 - the vector_2
normalized - the normalized
Returns:
the double

printMatrix

public static void printMatrix(java.lang.String[] columns,
                               java.lang.String[] rows,
                               java.lang.Object[][] matrix)
Prints the matrix.

Parameters:
matrix - the matrix
rows - the rows
columns - the columns