SCM Repository

[matrix] View of /pkg/man/dsyMatrix-class.Rd
ViewVC logotype

View of /pkg/man/dsyMatrix-class.Rd

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1463 - (download) (as text) (annotate)
Tue Aug 29 22:30:57 2006 UTC (13 years, 7 months ago) by bates
File size: 4511 byte(s)
Promotion of %*% and solve to RHS of ddenseMatrix
\alias{coerce,dgeMatrix,dsyMatrix-method}% or rather setIs?
\title{Symmetric Dense Numeric Matrices}
  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", ...)}.
    \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
    \item{\code{factors}:}{Object of class \code{"list"}.  A named
      list of factorizations that have been computed for the matrix.}
  \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.
    \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")}}
  Classes \code{\linkS4class{dgeMatrix}} and \code{\linkS4class{Matrix}};
  \code{\link[base]{solve}}, \code{\link{norm}}, \code{\link{rcond}},
## 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

## 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
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge