SCM

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 871, Fri Aug 26 17:26:49 2005 UTC revision 2048, Tue Aug 14 15:09:10 2007 UTC
# Line 1  Line 1 
1  \name{sparseMatrix-class}  \name{sparseMatrix-class}
2  \docType{class}  \docType{class}
3    \title{Virtual Class "sparseMatrix" --- Mother of Sparse Matrices}
4  \alias{sparseMatrix-class}  \alias{sparseMatrix-class}
5    %% Group methods
6    \alias{Math,sparseMatrix-method}
7    %\alias{Math2,sparseMatrix,numeric-method}
8    \alias{Ops,sparseMatrix,sparseMatrix-method}
9    \alias{Ops,sparseMatrix,numeric-method}
10    \alias{Ops,numeric,sparseMatrix-method}
11    \alias{Ops,diagonalMatrix,sparseMatrix-method}
12    \alias{Ops,sparseMatrix,diagonalMatrix-method}
13    %
14    \alias{cbind2,sparseMatrix,sparseMatrix-method}
15    \alias{cbind2,sparseMatrix,matrix-method}
16    \alias{cbind2,matrix,sparseMatrix-method}
17    \alias{cbind2,sparseMatrix,numeric-method}
18    \alias{cbind2,numeric,sparseMatrix-method}
19    \alias{rbind2,sparseMatrix,sparseMatrix-method}
20    \alias{rbind2,sparseMatrix,matrix-method}
21    \alias{rbind2,matrix,sparseMatrix-method}
22    \alias{rbind2,sparseMatrix,numeric-method}
23    \alias{rbind2,numeric,sparseMatrix-method}
24    %
25    \alias{coerce,ANY,sparseMatrix-method}
26    \alias{coerce,factor,sparseMatrix-method}
27    \alias{coerce,sparseMatrix,generalMatrix-method}
28    \alias{coerce,sparseMatrix,symmetricMatrix-method}
29    \alias{coerce,sparseMatrix,triangularMatrix-method}
30    \alias{-,sparseMatrix,missing-method}
31    \alias{diag,sparseMatrix-method}
32    \alias{dim<-,sparseMatrix-method}
33    \alias{lu,sparseMatrix-method}
34    \alias{print,sparseMatrix-method}
35  \alias{show,sparseMatrix-method}  \alias{show,sparseMatrix-method}
36  \alias{\%*\%,sparseMatrix,ddenseMatrix-method}  \alias{summary,sparseMatrix-method}
37  \alias{\%*\%,ddenseMatrix,sparseMatrix-method}  \alias{norm,sparseMatrix,character-method}
38  \alias{crossprod,sparseMatrix,ddenseMatrix-method}  \alias{rcond,sparseMatrix,character-method}
39  \alias{crossprod,ddenseMatrix,sparseMatrix-method}  %\alias{colMeans,..} etc are now in ./colSums.Rd
40    % graph stuff
41  \alias{coerce,graph,sparseMatrix-method}  \alias{coerce,graph,sparseMatrix-method}
42  \alias{coerce,graphNEL,sparseMatrix-method}  \alias{coerce,graph,CsparseMatrix-method}
43  \title{Virtual Class "sparseMatrix" --- Mother of Sparse Matrices}  \alias{coerce,graphAM,sparseMatrix-method}
44    \alias{coerce,graphNEL,CsparseMatrix-method}
45    \alias{coerce,graphNEL,TsparseMatrix-method}
46    \alias{coerce,sparseMatrix,graph-method}
47    \alias{coerce,sparseMatrix,graphNEL-method}
48    \alias{coerce,TsparseMatrix,graphNEL-method}
49    \alias{coerce,dgTMatrix,graphNEL-method}
50    %
51  \description{Virtual Mother Class of All Sparse Matrices}  \description{Virtual Mother Class of All Sparse Matrices}
52  \section{Slots}{  \section{Slots}{
53    \code{Dim}, and \code{Dimnames}, see \code{\link{Matrix-class}}.    \describe{
54  % Should this be "written in stone" or should they be added?      \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions
55  %   Note that the current implementation keeps \code{Dimnames} empty for       of the matrix - must be an integer vector with exactly two
56  %   sparse matrices.       non-negative values.}
57        \item{\code{Dimnames}:}{a list of length two - inherited from class
58          \code{Matrix}, see \code{\linkS4class{Matrix}}.}
59        \item{\code{factors}:}{Object of class \code{"list"} - a list
60          of factorizations of the matrix. }
61      }
62  }  }
63  \section{Extends}{  \section{Extends}{
64    Class \code{"Matrix"}, directly.    Class \code{"Matrix"}, directly.
65  }  }
66  \section{Methods}{  \section{Methods}{
67    \describe{    \describe{
68      \item{show}{\code{signature(object = "sparseMatrix")}: The      \item{show}{\code{(object = "sparseMatrix")}: The
69        \code{\link{show}} method for sparse matrices prints        \code{\link{show}} method for sparse matrices prints
70        \emph{\dQuote{structural}} zeroes as \code{"."} or blank.}        \emph{\dQuote{structural}} zeroes as \code{"."} using
71          \code{\link{printSpMatrix}()} which allows further customization.}
72        \item{print}{\code{signature(x = "sparseMatrix")}, ....\cr
73          The \code{\link{print}} method for sparse matrices by default is the
74          same as \code{show()} but can be called with extra optional
75          arguments, see \code{\link{printSpMatrix}()}.}
76        \item{summary}{\code{(object = "sparseMatrix")}: Returns
77          an object of S3 class \code{"sparseSummary"} which is basically a
78          \code{\link{data.frame}} with columns \code{(i,j,x)} with the
79          non-zero entries.   The \code{\link{print}} method resemble's
80          Matlab's way of printing sparse matrices.}
81        \item{diag}{\code{(x = "sparseMatrix")}: extracts the diagonal of a
82          sparse matrix.}
83        \item{dim<-}{\code{signature(x = "sparseMatrix", value = "ANY")}:
84          allows to \emph{reshape} a sparse matrix to a sparse matrix with
85          the same entries but different dimensions. \code{value} must be of
86          length two and fulfill \code{prod(value) == prod(dim(x))}.}
87        \item{coerce}{\code{signature(from = "factor", to = "sparseMatrix")}:
88          Coercion of a factor to \code{"sparseMatrix"} produces the matrix
89          of indicator \bold{rows} stored as an object of class
90          \code{"dgCMatrix"}.  To obtain columns representing the interaction
91          of the factor and a numeric covariate, replace the \code{"x"} slot
92          of the result by the numeric covariate then take the transpose.}
93    }    }
94      See also \code{\link{colSums}}, ... %% FIXME
95      for methods with separate help pages.
96  }  }
97  \note{  \note{
98    In method selection for multiplication operations (i.e. \code{\%*\%}    In method selection for multiplication operations (i.e. \code{\%*\%}
# Line 37  Line 105 
105  %\author{Martin}  %\author{Martin}
106  \examples{  \examples{
107  showClass("sparseMatrix") ## and look at the help() of its subclasses  showClass("sparseMatrix") ## and look at the help() of its subclasses
108    M <- Matrix(0, 10000, 100)
109    M[1,1] <- M[2,3] <- 3.14
110    M  ## show(.) method suppresses printing of the majority of rows
111    
112    ## factor -> t( <sparse design matrix> ) :
113    (fact <- gl(5, 3, 30, labels = LETTERS[1:5]))
114    (Xt <- as(fact, "sparseMatrix"))  # indicator rows
115    X <- t(Xt)
116  }  }
117  \keyword{classes}  \keyword{classes}

Legend:
Removed from v.871  
changed lines
  Added in v.2048

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge