| 1782 |
maechler |
1 |
\name{triangularMatrix-class}
|
|
|
2 |
\docType{class}
|
|
|
3 |
\alias{triangularMatrix-class}
|
| 4953 |
maechler |
4 |
\alias{coerce,triangularMatrix,symmetricMatrix-method}
|
|
|
5 |
%
|
| 1782 |
maechler |
6 |
\title{Virtual Class of Triangular Matrices in package:Matrix}
|
|
|
7 |
\description{
|
|
|
8 |
The virtual class of triangular matrices,\code{"triangularMatrix"},
|
|
|
9 |
from the package \pkg{Matrix} contains numeric and logical, dense and
|
|
|
10 |
sparse matrices, e.g., see the examples.
|
|
|
11 |
|
|
|
12 |
The main use will be in methods (and C functions) that can deal with
|
|
|
13 |
all triangular matrices.
|
|
|
14 |
}
|
|
|
15 |
% \section{Objects from the Class}{A virtual Class: No objects may be created from it.}
|
|
|
16 |
\section{Slots}{
|
|
|
17 |
\describe{
|
| 4963 |
maechler |
18 |
\item{\code{uplo}:}{String (of class \code{"character"}). Must be
|
| 1782 |
maechler |
19 |
either "U", for upper triangular, and "L", for lower triangular.}
|
| 4963 |
maechler |
20 |
\item{\code{diag}:}{String (of class \code{"character"}). Must be
|
| 1782 |
maechler |
21 |
either \code{"U"}, for unit triangular (diagonal is all ones), or
|
|
|
22 |
\code{"N"} for non-unit. The diagonal elements are not
|
| 4963 |
maechler |
23 |
accessed internally when \code{diag} is \code{"U"}. For
|
|
|
24 |
\code{\linkS4class{denseMatrix}} classes, they need to be
|
|
|
25 |
allocated though, i.e., the length of the \code{x} slot does not
|
|
|
26 |
depend on \code{diag}.}
|
|
|
27 |
\item{\code{Dim}, \code{Dimnames}:}{The dimension (a length-2
|
| 1782 |
maechler |
28 |
\code{"integer"}) and corresponding names (or \code{NULL}),
|
| 3175 |
maechler |
29 |
inherited from the \code{\linkS4class{Matrix}}, see there.}
|
| 1782 |
maechler |
30 |
}
|
|
|
31 |
}
|
|
|
32 |
\section{Extends}{
|
|
|
33 |
Class \code{"Matrix"}, directly.
|
|
|
34 |
}
|
|
|
35 |
\section{Methods}{
|
|
|
36 |
There's a C function \code{triangularMatrix_validity()}
|
|
|
37 |
called by the internal validity checking functions.
|
| 4963 |
maechler |
38 |
|
|
|
39 |
Currently, \code{\link{Schur}}, \code{\link{isSymmetric}} and
|
|
|
40 |
\code{as()} (i.e. \code{\link{coerce}}) have methods with
|
|
|
41 |
\code{triangularMatrix} in their signature.
|
| 1782 |
maechler |
42 |
}
|
|
|
43 |
\seealso{
|
| 3175 |
maechler |
44 |
Classes \code{\linkS4class{symmetricMatrix}}, and, e.g.,
|
|
|
45 |
\code{\linkS4class{dtrMatrix}} for numeric \emph{dense} matrices, or
|
|
|
46 |
\code{\linkS4class{ltCMatrix}} for a logical \emph{sparse} matrix
|
| 1782 |
maechler |
47 |
subclass of \code{"triangularMatrix"}.
|
|
|
48 |
}
|
|
|
49 |
\examples{
|
|
|
50 |
showClass("triangularMatrix")
|
|
|
51 |
|
|
|
52 |
## The names of direct subclasses:
|
|
|
53 |
scl <- getClass("triangularMatrix")@subclasses
|
|
|
54 |
directly <- sapply(lapply(scl, slot, "by"), length) == 0
|
|
|
55 |
names(scl)[directly]
|
|
|
56 |
}
|
|
|
57 |
\keyword{classes}
|