dsyMatrix-class package:Matrix R Documentation _S_y_m_m_e_t_r_i_c _D_e_n_s_e _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 '"dsyMatrix"' class is the class of symmetric, dense matrices in non-packed storage and '"dspMatrix"' is the class of symmetric dense matrices in packed storage. Only the upper triangle or the lower triangle is stored. _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("dsyMatrix", ...)'. _S_l_o_t_s: '_u_p_l_o': Object of class '"character"'. Must be either "U", for upper triangular, and "L", for lower triangular. '_x': Object of class '"numeric"'. The numeric values that constitute the matrix, stored in column-major order. '_D_i_m','_D_i_m_n_a_m_e_s': The dimension (a length-2 '"integer"') and corresponding names (or 'NULL'), see the 'Matrix'. '_f_a_c_t_o_r_s': Object of class '"list"'. A named list of factorizations that have been computed for the matrix. _E_x_t_e_n_d_s: '"dsyMatrix"' extends class '"dgeMatrix"', directly, whereas '"dspMatrix"' extends class '"ddenseMatrix"', directly. Both extend class '"symmetricMatrix"', directly, and class '"Matrix"' and others, _in_directly, use 'showClass("dsyMatrix")', e.g., for details. _M_e_t_h_o_d_s: _c_o_e_r_c_e 'signature(from = "ddenseMatrix", to = "dgeMatrix")' _c_o_e_r_c_e 'signature(from = "dspMatrix", to = "matrix")' _c_o_e_r_c_e 'signature(from = "dsyMatrix", to = "matrix")' _c_o_e_r_c_e 'signature(from = "dsyMatrix", to = "dspMatrix")' _c_o_e_r_c_e 'signature(from = "dspMatrix", to = "dsyMatrix")' _n_o_r_m 'signature(x = "dspMatrix", type = "character")' _n_o_r_m 'signature(x = "dsyMatrix", type = "character")' _n_o_r_m 'signature(x = "dspMatrix", type = "missing")' _n_o_r_m 'signature(x = "dsyMatrix", type = "missing")' _s_o_l_v_e 'signature(a = "dspMatrix", b = "missing")' _s_o_l_v_e 'signature(a = "dsyMatrix", b = "missing")' _s_o_l_v_e 'signature(a = "dspMatrix", b = "matrix")' _s_o_l_v_e 'signature(a = "dsyMatrix", b = "matrix")' _t 'signature(x = "dsyMatrix")': Transpose; swaps from upper triangular to lower triangular storage, i.e., the uplo slot from '"U"' to '"L"' or vice versa, the same as for all symmetric matrices. _S_e_e _A_l_s_o: Classes 'dgeMatrix' and 'Matrix'; 'solve', 'norm', 'rcond', 't' _E_x_a_m_p_l_e_s: ## Only upper triangular part matters (when uplo == "U" as per default) (sy2 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, NA,32,77))) str(t(sy2)) # uplo = "L", and the lower tri. (i.e. NA is replaced). chol(sy2) #-> "Cholesky" matrix ## Coercing to dpoMatrix gives invalid object: sy3 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, -1, 2, -7)) try(as(sy3, "dpoMatrix")) # -> error: not positive definite