ddiMatrix-class            package:Matrix            R Documentation

_C_l_a_s_s "_d_d_i_M_a_t_r_i_x" _o_f _D_i_a_g_o_n_a_l _N_u_m_e_r_i_c _M_a_t_r_i_c_e_s

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

     The class '"ddiMatrix"' of numerical diagonal matrices.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("ddiMatrix",
     ...)' but typically rather via 'Diagonal'.

_S_l_o_t_s:

     '_x': Object of class '"numeric"' ~~ 

     '_d_i_a_g': Object of class '"character"' ~~ 

     '_D_i_m': Object of class '"integer"' ~~ 

     '_D_i_m_n_a_m_e_s': Object of class '"list"' ~~ 

     '_f_a_c_t_o_r_s': Object of class '"list"' ~~ 

_E_x_t_e_n_d_s:

     Class '"diagonalMatrix"', directly. Class '"dMatrix"', directly.
     Class '"denseMatrix"', by class '"diagonalMatrix"'. Class
     '"Matrix"', by class '"denseMatrix"' and class '"dMatrix"'.

_M_e_t_h_o_d_s:

     %*% 'signature(x = "ddiMatrix", y = "ddiMatrix")': ... 

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

     Class 'diagonalMatrix' and function 'Diagonal'.

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

     (d2 <- Diagonal(x = c(10,1)))
     str(d2)
     ## slightly larger:
     str(as(d2, "sparseMatrix"))

     M <- Matrix(cbind(1,2:4))
     M %*% d2 #> `fast' multiplication

