File: dsyMatrix-class.Rd

package info (click to toggle)
rmatrix 0.9975-6-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,136 kB
  • ctags: 2,162
  • sloc: ansic: 35,914; makefile: 225; fortran: 151; sh: 67
file content (108 lines) | stat: -rw-r--r-- 4,511 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
\name{dsyMatrix-class}
\docType{class}
\alias{\%*\%,ddenseMatrix,dsyMatrix-method}
\alias{\%*\%,dspMatrix,ddenseMatrix-method}
\alias{\%*\%,dspMatrix,matrix-method}
\alias{\%*\%,dsyMatrix,ddenseMatrix-method}
\alias{\%*\%,dsyMatrix,matrix-method}
\alias{coerce,dspMatrix,dsyMatrix-method}
\alias{coerce,dspMatrix,lspMatrix-method}
\alias{coerce,dspMatrix,matrix-method}
\alias{coerce,dgeMatrix,dspMatrix-method}
\alias{coerce,matrix,dspMatrix-method}
\alias{coerce,dgeMatrix,dsyMatrix-method}% or rather setIs?
\alias{coerce,dsyMatrix,dspMatrix-method}
\alias{coerce,dsyMatrix,lsyMatrix-method}
\alias{coerce,dsyMatrix,matrix-method}
\alias{coerce,matrix,dsyMatrix-method}
\alias{show,dsyMatrix-method}
\alias{dspMatrix-class}
\alias{dsyMatrix-class}
\alias{norm,dspMatrix,character-method}
\alias{norm,dspMatrix,missing-method}
\alias{norm,dsyMatrix,character-method}
\alias{norm,dsyMatrix,missing-method}
\alias{rcond,dspMatrix,character-method}
\alias{rcond,dspMatrix,missing-method}
\alias{rcond,dsyMatrix,character-method}
\alias{rcond,dsyMatrix,missing-method}
\alias{solve,dspMatrix,ddenseMatrix-method}
\alias{solve,dspMatrix,matrix-method}
\alias{solve,dspMatrix,missing-method}
\alias{solve,dsyMatrix,ddenseMatrix-method}
\alias{solve,dsyMatrix,matrix-method}
\alias{solve,dsyMatrix,missing-method}
\alias{t,dspMatrix-method}
\alias{t,dsyMatrix-method}
\alias{unpack,dspMatrix-method}
\title{Symmetric Dense Numeric Matrices}
\description{
  The \code{"dsyMatrix"} class is the class of symmetric, dense matrices
  in non-packed storage and \code{"dspMatrix"} is the class of symmetric
  dense matrices in packed storage.  Only the upper triangle or the
  lower triangle is stored.
}
\section{Objects from the Class}{
  Objects can be created by calls of the form \code{new("dsyMatrix", ...)}.
}
\section{Slots}{
  \describe{
    \item{\code{uplo}:}{Object of class \code{"character"}. Must be
      either "U", for upper triangular, and "L", for lower triangular.}
    \item{\code{x}:}{Object of class \code{"numeric"}. The numeric
      values that constitute the matrix, stored in column-major order.}
    \item{\code{Dim},\code{Dimnames}:}{The dimension (a length-2
      \code{"integer"}) and corresponding names (or \code{NULL}), see the
      \code{\linkS4class{Matrix}}.}
    \item{\code{factors}:}{Object of class \code{"list"}.  A named
      list of factorizations that have been computed for the matrix.}
  }
}
\section{Extends}{
  \code{"dsyMatrix"} extends class \code{"dgeMatrix"}, directly, whereas\cr
  \code{"dspMatrix"} extends class \code{"ddenseMatrix"}, directly.

  Both extend class \code{"symmetricMatrix"}, directly,
  and class \code{"Matrix"} and others, \emph{in}directly, use
  \code{\link{showClass}("dsyMatrix")}, e.g., for details.
}
\section{Methods}{
  \describe{
    \item{coerce}{\code{signature(from = "ddenseMatrix", to = "dgeMatrix")}}
    %
    \item{coerce}{\code{signature(from = "dspMatrix", to = "matrix")}}
    \item{coerce}{\code{signature(from = "dsyMatrix", to = "matrix")}}
    \item{coerce}{\code{signature(from = "dsyMatrix", to = "dspMatrix")}}
    \item{coerce}{\code{signature(from = "dspMatrix", to = "dsyMatrix")}}
    \item{norm}{\code{signature(x = "dspMatrix", type = "character")}}
    \item{norm}{\code{signature(x = "dsyMatrix", type = "character")}}
    \item{norm}{\code{signature(x = "dspMatrix", type = "missing")}}
    \item{norm}{\code{signature(x = "dsyMatrix", type = "missing")}}
    \item{solve}{\code{signature(a = "dspMatrix", b = "missing")}}
    \item{solve}{\code{signature(a = "dsyMatrix", b = "missing")}}
    \item{solve}{\code{signature(a = "dspMatrix", b = "matrix")}}
    \item{solve}{\code{signature(a = "dsyMatrix", b = "matrix")}}
  }
}
%\references{}
%\author{}
\seealso{
  Classes \code{\linkS4class{dgeMatrix}} and \code{\linkS4class{Matrix}};
  \code{\link[base]{solve}}, \code{\link{norm}}, \code{\link{rcond}},
  \code{\link[base]{t}}
}
\examples{
## Only upper triangular part matters (when uplo == "U" as per default)
(sy2 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, NA,32,77)))
(c2 <- chol(sy2))
all.equal(c2, c2. <- chol(as(sy2, "dpoMatrix")))# equal, but not same class
str(c2)

## An example where chol() can't work
(sy3 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, -1, 2, -7)))

validObject(as(sy3, "dpoMatrix"), test=TRUE) # >> is not pos.def.
% .... Lapack routine dpotrf returned error code 2 -- FIXME: better message
try(chol(sy3)) ## Error: not pos.def
}
\keyword{classes}