diagU2N {Matrix} | R Documentation |
Transform a triangular matrix x
, i.e., of class
"triangularMatrix"
,
from (internally!) unit triangular (“unitriangular”) to
“general” (diagU2N(x)
) or back (diagN2U(x)
).
diagN2U(x, cl = getClassDef(class(x))) diagU2N(x, cl = getClassDef(class(x)), checkDense = FALSE) .diagU2N(x, cl, checkDense = FALSE)
x |
a |
cl |
(optional, for speedup only:) class (definition) of |
checkDense |
logical indicating if dense (see
|
The concept of unit triangular matrices with a diag
slot of
"U"
stems from LAPACK.
a triangular matrix of the same class
and (semantically)
with identical entries as x
,
but with a different diag
slot.
Such internal storage details should rarely be of relevance to the user. Hence, these functions really are rather internal utilities.
"triangularMatrix"
,
"dtCMatrix"
.
(T <- Diagonal(7) + triu(Matrix(rpois(49, 1/4), 7,7), k = 1)) (uT <- diagN2U(T)) # "unitriangular" stopifnot(all(T == uT), identical(T, diagU2N(uT)))