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

