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

