LU-class               package:Matrix               R Documentation

_L_U (_d_e_n_s_e) _M_a_t_r_i_x _D_e_c_o_m_p_o_s_i_t_i_o_n_s

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

     The '"LU"' class is the _virtual_ class of LU decompositions of
     real matrices.  '"denseLU"' the class of LU decompositions of
     dense real 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("denseLU", ...)'.
     More commonly the objects are created explicitly from calls of the
     form 'lu(mm)' where 'mm' is an object that inherits from the
     '"dgeMatrix"' class or as a side-effect of other functions applied
     to '"dgeMatrix"' objects.

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

     '"LU"' directly extends the virtual class '"MatrixFactorization"'.

     '"denseLU"' directly extends '"LU"'.

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


     '_x': object of class '"numeric"'.  The '"L"' (unit lower
          triangular) and '"U"' (upper triangular) factors of the
          original matrix.  These are stored in a packed format
          described in the Lapack manual.

     '_p_e_r_m': Object of class '"integer"' - a vector of length
          'min(Dim)' that describes the permutation applied to the rows
          of the original matrix.  The contents of this vector are
          described in the Lapack manual.

     '_D_i_m': the dimension of the original matrix; inherited from class
          'MatrixFactorization' .

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


     _e_x_p_a_n_d 'signature(x = "denseLU")': Produce the '"L"' and '"U"'
          (and '"P"') factors as a named list of matrices, see also the
          example below.

     _s_o_l_v_e 'signature(a = "denseLU", b = "missing")': ComputeProduce
          the '"L"' and '"U"' (and '"P"') factors as a named list of
          matrices, see also the example below.

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

     class 'sparseLU' for LU decompositions of _sparse_ matrices;
     further, class 'dgeMatrix' and functions 'lu', 'expand'.

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

     set.seed(1)
     mm <- Matrix(round(rnorm(9),2), nrow = 3)
     mm
     str(lum <- lu(mm))
     elu <- expand(lum)
     elu # three components: "L", "U", and "P", the permutation
     elu$L %*% elu$U
     (m2 <- with(elu, P %*% L %*% U)) # the same as 'mm'
     stopifnot(all.equal(as(mm, "matrix"),
                         as(m2, "matrix")))

