crossprod                package:slam                R Documentation

_M_a_t_r_i_x _C_r_o_s_s_p_r_o_d_u_c_t

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

     Compute the matrix cross-product of a sparse and dense matrix.

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

     tcrossprod_simple_triplet_matrix(x, y = NULL)

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

       x: a matrix in 'simple_triplet_matrix'-form. 

       y: a numeric matrix. 

_D_e_t_a_i_l_s:

     Provides fast computation of 'x %*% t(y)' ('tcrossprod').

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

     A double matrix, with appropriate 'dimnames' taken from 'x' and
     'y'.

_N_o_t_e:

     If 'y = NULL' or contains any of the special values 'NA', 'NaN',
     or 'Inf' then 'x' is coerced to 'matrix' and the computation is
     delegated to 'tcrossprod'.

_A_u_t_h_o_r(_s):

     Christian Buchta

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

     'crossprod' for dense-on-dense computations.

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

     ## 
     x <- matrix(c(1, 0, 0, 2, 1, 0), nrow = 3)
     x
     s <- as.simple_triplet_matrix(x)
     tcrossprod_simple_triplet_matrix(s, x)
     ## see note
     tcrossprod_simple_triplet_matrix(s)

