ntrMatrix-class            package:Matrix            R Documentation

_T_r_i_a_n_g_u_l_a_r _D_e_n_s_e _L_o_g_i_c_a_l _M_a_t_r_i_c_e_s

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

     The '"ntrMatrix"' class is the class of triangular, dense, logical
     matrices in nonpacked storage.  The '"ntpMatrix"' class is the
     same except in packed storage.

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


     '_x': Object of class '"logical"'. The logical values that
          constitute the matrix, stored in column-major order.

     '_u_p_l_o': Object of class '"character"'. Must be either "U", for
          upper triangular, and "L", for lower triangular.

     '_d_i_a_g': Object of class '"character"'. Must be either '"U"', for
          unit triangular (diagonal is all ones), or '"N"'; see
          'triangularMatrix'.

     '_D_i_m','_D_i_m_n_a_m_e_s': The dimension (a length-2 '"integer"') and
          corresponding names (or 'NULL'), see the 'Matrix' class.

     '_f_a_c_t_o_r_s': Object of class '"list"'.  A named list of
          factorizations that have been computed for the matrix.

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

     '"ntrMatrix"' extends class '"ngeMatrix"', directly, whereas
      '"ntpMatrix"' extends class '"ndenseMatrix"', directly.

     Both extend Class '"triangularMatrix"', directly, and class
     '"denseMatrix"', '"lMatrix"' and others, _in_directly, use
     'showClass("nsyMatrix")', e.g., for details.

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

     Currently, mainly 't()' and coercion methods (for 'as(.)'; use,
     e.g., 'showMethods(class="nsyMatrix")' for details.

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

     Classes 'ngeMatrix', 'Matrix'; function 't'

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

     showClass("ntrMatrix")

     str(new("ntpMatrix"))
     (nutr <- as(upper.tri(matrix(,4,4)), "ntrMatrix"))
     str(nutp <- as(nutr, "ntpMatrix"))# packed matrix: only 10 = (4+1)*4/2 entries
     !nutp ## the logical negation (is *not* logical triangular !)
     ## but this one is:
     stopifnot(all.equal(nutp, as(!!nutp, "ntpMatrix")))

