gpuSolve              package:gputools              R Documentation

_E_s_t_i_m_a_t_e _t_h_e _s_o_l_u_t_i_o_n _t_o _a _m_a_t_r_i_x _v_e_c_t_o_r _e_q_u_a_t_i_o_n

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

     This function estimates the solution to an equation of the form x
     * b = y where x is a matrix, b is an unkown vector, and y is a
     known vector.  It does much calculation on a GPU.

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

             gpuSolve(x, y)

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

       x: a matrix of floating point numbers.

       y: a vector of floating point numbers of length nrow(x).

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

     a vector of floating point numbers of length ncol(x) which is an
     estimate of the b from x * b = y.

_R_e_f_e_r_e_n_c_e_s:

     Bjorck, Ake (1996) _Numerical methods for least squares problems_.
     SIAM.

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

             # get some random data of any shape at all
             x <- matrix(runif(1000), 50, 20)
             y <- runif(50)
             b <- gpuSolve(x, y)
             cat("Solution:\n")
             print(b)
             cat("x * b\n")
             print(x %*% b)
             cat("original y\n")
             print(y)

