gpuDist               package:gputools               R Documentation

_C_o_m_p_u_t_e _D_i_s_t_a_n_c_e_s _B_e_t_w_e_e_n _V_e_c_t_o_r_s _o_n _a _G_P_U

_D_e_s_c_r_i_p_t_i_o_n:

     This function computes the distance between each vector of the
     'points' argument using the metric specified by 'method'.

_U_s_a_g_e:

             gpuDist(points, method = "euclidean", p = 2.0)

_A_r_g_u_m_e_n_t_s:

  points: a matrix of floating point numbers in which each row is a
          vector in $R^n$ space where $n$ is ncol(points).

  method: a string representing the name of the metric to use to
          calculate the distance between the vectors of 'points'. 
          Currently supported values are: "binary", "canberra",
          "euclidean", "manhattan", "maximum", and "minkowski".

       p: a floating point parameter for the Minkowski metric.

_V_a_l_u_e:

     a matrix of floating point numbers whose i, j entry represents the
      distance between vector i and vector j from the 'points'
     argument.

_S_e_e _A_l_s_o:

     dist

_E_x_a_m_p_l_e_s:

     numVectors <- 5
     dimension <- 10
     Vectors <- matrix(runif(numVectors*dimension), numVectors, dimension)
     gpuDist(Vectors, "euclidean")
     gpuDist(Vectors, "maximum")
     gpuDist(Vectors, "manhattan")
     gpuDist(Vectors, "minkowski", 4)

