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")))

