dsRMatrix-class            package:Matrix            R Documentation

_S_y_m_m_e_t_r_i_c _S_p_a_r_s_e _C_o_m_p_r_e_s_s_e_d _R_o_w _M_a_t_r_i_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     The 'dsRMatrix' class is a class of symmetric, sparse matrices in
     the compressed, row-oriented format.  In this implementation the
     non-zero elements in the rows are sorted into increasing column
     order.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     These '"..RMatrix"' classes are currently still mostly
     unimplemented!

     Objects can be created by calls of the form 'new("dsRMatrix",
     ...)'.

_S_l_o_t_s:


     '_u_p_l_o': A character object indicating if the upper triangle
          ('"U"') or the lower triangle ('"L"') is stored.  At present
          only the lower triangle form is allowed.

     '_j': Object of class '"integer"' of length 'nnzero' (number of
          non-zero elements).  These are the row numbers for each
          non-zero element in the matrix.

     '_p': Object of class '"integer"' of pointers, one for each row, to
          the initial (zero-based) index of elements in the row.

     '_f_a_c_t_o_r_s': Object of class '"list"' - a list of factorizations of
          the matrix.

     '_x': Object of class '"numeric"' - the non-zero elements of the
          matrix.

     '_D_i_m': Object of class '"integer"' - the dimensions of the matrix
          - must be an integer vector with exactly two non-negative
          values.

     '_D_i_m_n_a_m_e_s': List of length two, see 'Matrix'.

_E_x_t_e_n_d_s:

     Classes 'RsparseMatrix', 'dsparseMatrix' and 'symmetricMatrix',
     directly.

     Class '"dMatrix"', by class '"dsparseMatrix"', class
     '"sparseMatrix"', by class '"dsparseMatrix"' or '"RsparseMatrix"';
     class '"compMatrix"' by class '"symmetricMatrix"' and of course,
     class '"Matrix"'.

_M_e_t_h_o_d_s:


     _f_o_r_c_e_S_y_m_m_e_t_r_i_c 'signature(x = "dsRMatrix", uplo = "missing")': a
          trivial method just returning 'x'

     _f_o_r_c_e_S_y_m_m_e_t_r_i_c 'signature(x = "dsRMatrix", uplo = "character")':
          if 'uplo == x@uplo', this trivially returns 'x'; otherwise
          't(x)'.

     _c_o_e_r_c_e 'signature(from = "dsCMatrix", to = "dsRMatrix")'

_S_e_e _A_l_s_o:

     the classes 'dgCMatrix', 'dgTMatrix', and 'dgeMatrix'.

_E_x_a_m_p_l_e_s:

     (m0 <- new("dsRMatrix"))
     m2 <- new("dsRMatrix", Dim = c(2L,2L),
               x = c(3,1), j = c(1L,1L), p = 0:2)
     m2
     stopifnot(colSums(as(m2, "TsparseMatrix")) == 3:4)
     str(m2)
     (ds2 <- forceSymmetric(diag(2))) # dsy*
     dR <- as(ds2, "RsparseMatrix")
     dR # dsRMatrix

