spam-class               package:spam               R Documentation

_C_l_a_s_s "_s_p_a_m"

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

     The 'spam' class is a representation of sparse 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("spam", entries,
     colindices, rowpointes, dimension)'. The standard "old Yale sparse
     format" is used to store sparse matrices.
      The matrix 'x' is stored in row form.  The first element of row
     'i' is 'x@rowpointers[i]'. The length of row 'i' is determined by
     'x@rowpointers[i+1]-x@rowpointers[i]'. The column indices of 'x'
     are stored in the 'x@colindices' vector. The column index for
     element 'x@entries[k]' is 'x@colindices[k]'.

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


     '_e_n_t_r_i_e_s': Object of class '"numeric"' contains the nonzero values 

     '_c_o_l_i_n_d_i_c_e_s': Object of class '"integer"' ordered indices of the
          nonzero values 

     '_r_o_w_p_o_i_n_t_e_r_s': Object of class '"integer"' pointer to the
          beginning of each row in the arrays 'entries' and
          'colindices'

     '_d_i_m_e_n_s_i_o_n': Object of class '"integer"' ~~ 

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


     _a_s._m_a_t_r_i_x 'signature(x = "spam")': transforming a sparse matrix
          into a regular matrix.

     _a_s._s_p_a_m 'signature(x = "spam")': cleaning of a sparse matrix.

     [<- 'signature(x = "spam", i,j, value)': assigning a sparse
          matrix. The negative vectors are not implemented yet. 

     [ 'signature(x = "spam", i, j)': subsetting a sparse matrix. The
          negative vectors are not implemented yet. 

     %*% 'signature(x, y)': matrix multiplication, all combinations of
          sparse with full matrices or vectors are implemented.

     _c 'signature(x = "spam")': vectorizes the sparse matrix and takes
          account of the zeros. Hence the lenght of the result is
          'prod(dim(x))'.

     _c_b_i_n_d 'signature(x = "spam")': binds sparse matrices.

     _c_h_o_l 'signature(x = "spam")': see 'chol' for details.

     _d_i_a_g 'signature(x = "spam")':  see 'diag' for details.

     _d_i_m<- 'signature(x = "spam")': truncates or augments the matrix
          see 'dim' for details.

     _d_i_m 'signature(x = "spam")': gives the dimension of the sparse
          matrix.

     _i_m_a_g_e 'signature(x = "spam")': see 'image' for details.

     _d_i_s_p_l_a_y 'signature(x = "spam")': see 'display' for details.

     _l_e_n_g_t_h<- 'signature(x = "spam")': Is not implemented and causes an
          error.

     _l_e_n_g_t_h 'signature(x = "spam")': gives the number of non-zero
          elements.

     _l_o_w_e_r._t_r_i 'signature(x = "spam")': see 'lower.tri' for details. 

     _M_a_t_h 'signature(x = "spam")': see 'Math' for details.

     _M_a_t_h_2 'signature(x = "spam")': see 'Math2' for details. 

     _n_o_r_m 'signature(x = "spam")': calculates the norm of a matrix.

     _p_l_o_t 'signature(x = "spam", y)': same functionality as the
          ordinary 'plot'. 

     _p_r_i_n_t 'signature(x = "spam")': see 'print' for details.

     _r_b_i_n_d 'signature(x = "spam")': binds sparse matrices.

     _s_o_l_v_e 'signature(a = "spam")': see 'solve' for details.

     _s_u_m_m_a_r_y 'signature(object = "spam")': small summary statement of
          the sparse matrix.

     _S_u_m_m_a_r_y 'signature(x = "spam")': All functions of the 'Summary'
          class (like 'min', 'max', 'range'...) operate on the vector
          'x@entries' and return the result thereof. See Examples.

     _t 'signature(x = "spam")': transpose of a sparse matrix.

     _u_p_p_e_r._t_r_i 'signature(x = "spam")': see 'lower.tri' for details.

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

     The compressed sparse row (CSR) format is often described with the
     vectors 'a', 'ia', 'ja'. To be a bit more comprehensive, we have
     chosen longer slot names.

_N_o_t_e:

     The slots 'colindices' and 'rowpointers' are tested for proper
     integer assignments. This is not true for 'entries'.

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

     Reinhard Furrer, some of the Fortran code is based on A. George,
     J. Liu, E. S. Ng, B.W Peyton and Y. Saad (alphabetical)

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

     showMethods("as.spam")

     smat <- diag.spam(runif(15))
     range(smat)
     cos(smat)

