SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1896 - (download) (as text) (annotate)
Fri Jun 15 18:20:26 2007 UTC (12 years, 3 months ago) by bates
File size: 4353 byte(s)
draft "indicators" class
\title{Virtual Class "sparseMatrix" --- Mother of Sparse Matrices}
%% Group methods
%\alias{colMeans,..} etc are now in ./colSums.Rd
% graph stuff
\description{Virtual Mother Class of All Sparse Matrices}
    \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions
     of the matrix - must be an integer vector with exactly two
     non-negative values.}
    \item{\code{Dimnames}:}{a list of length two - inherited from class
      \code{Matrix}, see \code{\linkS4class{Matrix}}.}
    \item{\code{factors}:}{Object of class \code{"list"} - a list
      of factorizations of the matrix. }
  Class \code{"Matrix"}, directly.
    \item{show}{\code{(object = "sparseMatrix")}: The
      \code{\link{show}} method for sparse matrices prints
      \emph{\dQuote{structural}} zeroes as \code{"."} using the
      non-exported \code{prSpMatrix} function which allows further
      customization such as replacing \code{"."} by \code{" "} (blank).

      Note that \code{\link{options}(max.print)} will influence how many
      entries of large matrices are printed at all.}
    \item{summary}{\code{(object = "sparseMatrix")}: Returns
      an object of S3 class \code{"sparseSummary"} which is basically a
      \code{\link{data.frame}} with columns \code{(i,j,x)} with the
      non-zero entries.   The \code{\link{print}} method resemble's
      Matlab's way of printing sparse matrices.}
    \item{diag}{\code{(x = "sparseMatrix")}: extracts the diagonal of a
      sparse matrix.}
    \item{dim<-}{\code{signature(x = "sparseMatrix", value = "ANY")}:
      allows to \emph{reshape} a sparse matrix to a sparse matrix with
      the same entries but different dimensions. \code{value} must be of
      length two and fulfill \code{prod(value) == prod(dim(x))}.}
  See also \code{\link{colSums}}, ... %% FIXME
  for methods with separate help pages.
  In method selection for multiplication operations (i.e. \code{\%*\%}
  and the two-argument form of \code{\link[base]{crossprod}})
  the sparseMatrix class takes precedence in the sense that if one
  operand is a sparse matrix and the other is any type of dense matrix
  then the dense matrix is coerced to a \code{dgeMatrix} and the
  appropriate sparse matrix method is used.
showClass("sparseMatrix") ## and look at the help() of its subclasses
M <- Matrix(0, 10000, 100)
M[1,1] <- M[2,3] <- 3.14
\dontshow{% show() was slow in 0.9975-8 because of slow adjust="fancy"
op <- options(max.print = 25000, width = 80)
stopifnot((st <- system.time(show(M)))[1] < 1.0) # only 0.09 on cmath-3
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge