SCM

SCM Repository

[matrix] Diff of /pkg/man/lsparseMatrix-classes.Rd
ViewVC logotype

Diff of /pkg/man/lsparseMatrix-classes.Rd

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

pkg/man/lgCMatrix-class.Rd revision 720, Mon May 9 01:32:44 2005 UTC pkg/man/lsparseMatrix-classes.Rd revision 956, Fri Sep 30 17:28:00 2005 UTC
# Line 1  Line 1 
1  \name{lgCMatrix-class}  \name{lsparseMatrix-classes}
2  \docType{class}  \docType{class}
3    \alias{lsparseMatrix-class}
4  \alias{lgCMatrix-class}  \alias{lgCMatrix-class}
5    \alias{ltCMatrix-class}
6    \alias{lsCMatrix-class}
7    \alias{lgRMatrix-class}
8    \alias{ltRMatrix-class}
9    \alias{lsRMatrix-class}
10    \alias{lgTMatrix-class}
11    \alias{ltTMatrix-class}
12    \alias{lsTMatrix-class}
13    %
14    \alias{-,lsparseMatrix,missing-method}
15    \alias{!,lsparseMatrix-method}
16  \alias{\%*\%,lgCMatrix,lgCMatrix-method}  \alias{\%*\%,lgCMatrix,lgCMatrix-method}
17  \alias{coerce,matrix,lgCMatrix-method}  \alias{\%*\%,lsparseMatrix,lsparseMatrix-method}
18    \alias{\%*\%,lsparseMatrix,ldenseMatrix-method}
19    \alias{\%*\%,ldenseMatrix,lsparseMatrix-method}
20    \alias{chol,lsCMatrix,logical-method}
21    \alias{chol,lsCMatrix,missing-method}
22    
23    \alias{coerce,lgCMatrix,dgCMatrix-method}
24    \alias{coerce,lgCMatrix,lgTMatrix-method}
25    \alias{coerce,lgCMatrix,matrix-method}
26    \alias{coerce,lgTMatrix,dgTMatrix-method}
27    \alias{coerce,lgTMatrix,lgCMatrix-method}
28    \alias{coerce,lgTMatrix,matrix-method}
29    \alias{coerce,lsCMatrix,dgTMatrix-method}
30    \alias{coerce,lsCMatrix,dsCMatrix-method}
31    \alias{coerce,lsCMatrix,lgCMatrix-method}
32    \alias{coerce,lsCMatrix,lsTMatrix-method}
33    \alias{coerce,lsCMatrix,matrix-method}
34    \alias{coerce,ltCMatrix,dtCMatrix-method}
35    \alias{coerce,ltCMatrix,matrix-method}
36    %
37    \alias{crossprod,lgCMatrix,missing-method}
38    \alias{crossprod,lgTMatrix,missing-method}
39    \alias{crossprod,lsparseMatrix-method}
40    \alias{crossprod,lsparseMatrix,missing-method}
41    \alias{crossprod,lsparseMatrix,lsparseMatrix-method}
42    \alias{crossprod,lsparseMatrix,ldenseMatrix-method}
43    \alias{crossprod,ldenseMatrix,lsparseMatrix-method}
44    \alias{image,lgCMatrix-method}
45    \alias{image,lsCMatrix-method}
46    \alias{image,ltCMatrix-method}
47  \alias{t,lgCMatrix-method}  \alias{t,lgCMatrix-method}
48  \title{Compressed, sparse, column-oriented logical matrices}  \alias{t,lgTMatrix-method}
49  \description{The \code{dgCMatrix} class is a class of sparse logical  \alias{t,lsCMatrix-method}
50    matrices in the compressed, sparse, column-oriented format.  In this  \alias{t,ltCMatrix-method}
51    implementation the non-zero elements in the columns are sorted into  \alias{tcrossprod,lgCMatrix-method}
52    increasing row order.  There is no \code{x} slot in this class because  \alias{tcrossprod,lgTMatrix-method}
53    the only non-zero value stored is \code{TRUE}.}  \alias{tcrossprod,lsparseMatrix-method}
54    \title{Sparse logical matrices}
55    \description{The \code{lsparseMatrix} class is a virtual class of sparse
56      matrices with \code{TRUE}/\code{FALSE} entries.  Only the positions of the
57      elements that are \code{TRUE} are stored.  These can be stored in the
58      ``triplet'' form (classes \code{lgTMatrix}, \code{lsTMatrix}, and
59      \code{ltTMatrix} which really contain pairs, not triplets) or in
60      compressed column-oriented form (classes \code{lgCMatrix},
61      \code{lsCMatrix}, and \code{ltCMatrix}) or in compressed row-oriented
62      form (classes \code{lgRMatrix}, \code{lsRMatrix}, and
63      \code{ltRMatrix}).  The second letter in the name of these non-virtual
64      classes indicates \code{g}eneral, \code{s}ymmetric, or \code{t}riangular.
65    }
66  \section{Objects from the Class}{  \section{Objects from the Class}{
67    Objects can be created by calls of the form \code{new("lgCMatrix", ...)}.    Objects can be created by calls of the form \code{new("lgCMatrix",
68        ...)} and so on.  More frequently objects are created by coercion of
69      a numeric sparse matrix to the logical form for use in
70      the symbolic analysis phase
71      of an algorithm involving sparse matrices.  Such algorithms often
72      involve two phases: a symbolic phase wherein the positions of the
73      non-zeros in the result are determined and a numeric phase wherein the
74      actual results are calculated.  During the symbolic phase only the
75      positions of the non-zero elements in any operands are of interest,
76      hence any numeric sparse matrices can be treated as logical sparse
77      matrices.
78  }  }
79  \section{Slots}{  \section{Slots}{
80    \describe{    \describe{
81        \item{\code{uplo}:}{Object of class \code{"character"}. Must be
82          either "U", for upper triangular, and "L", for lower
83          triangular. Present in the triangular and symmetric classes but not
84          in the general class.}
85        \item{\code{diag}:}{Object of class \code{"character"}. Must be
86          either \code{"U"}, for unit triangular (diagonal is all ones), or
87          \code{"N"} for non-unit.  The implicit diagonal elements are not
88          explicitly stored when \code{diag} is \code{"U"}.  Present in the
89          triangular classes only.}
90      \item{\code{p}:}{Object of class \code{"integer"} of pointers, one      \item{\code{p}:}{Object of class \code{"integer"} of pointers, one
91        for each column, to the initial (zero-based) index of elements in        for each column (row), to the initial (zero-based) index of elements in
92        the column.}        the column.  Present in compressed column-oriented and compressed
93          row-oriented forms only.}
94      \item{\code{i}:}{Object of class \code{"integer"} of length nnzero      \item{\code{i}:}{Object of class \code{"integer"} of length nnzero
95        (number of non-zero elements).  These are the row numbers for        (number of non-zero elements).  These are the row numbers for
96        each TRUE element in the matrix.  All other elements are FALSE.}        each TRUE element in the matrix.  All other elements are FALSE.
97          Present in triplet and compressed column-oriented forms only.}
98        \item{\code{j}:}{Object of class \code{"integer"} of length nnzero
99          (number of non-zero elements).  These are the column numbers for
100          each TRUE element in the matrix.  All other elements are FALSE.
101          Present in triplet and compressed column-oriented forms only.}
102      \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions      \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions
103        of the matrix.}        of the matrix.}
104    }    }
# Line 34  Line 112 
112  }  }
113  %\references{}  %\references{}
114  %\author{}  %\author{}
115  \note{  %\note{}
   This class is most frequently used during the symbolic analysis phase  
   of an algorithm involving sparse matrices.  Frequently such algorithms  
   involve two phases: a symbolic phase wherein the positions of the  
   non-zeros in the result are determined and a numeric phase wherein the  
   actual results are calculated.  During the symbolic phase only the  
   positions of the non-zero elements in any operands are of interest,  
   hence any numeric sparse matrices can be treated as a logical sparse  
   matrices.  
 }  
116  \seealso{  \seealso{
117    \code{\link{dgCMatrix-class}}, \code{\link{ltCMatrix-class}},    \code{\link{dgCMatrix-class}}
118      \code{\link{lsCMatrix-class}}  }
119    \examples{
120    m <- Matrix(c(0,0,2:0), 3,5, dimnames=list(LETTERS[1:3],NULL))
121    (dm <- as(m, "dgCMatrix"))# no dimnames for sparse here
122    (lm <- as(dm, "lgCMatrix"))
123    str(lm)
124    
125    data(mm)
126    lmm <- as(mm, "lgCMatrix")
127    xlx <- crossprod(lmm)
128    image(xlx, main=paste("crossprod(lmm) : Sparse", class(xlx)))
129  }  }
 %\examples{}  
130  \keyword{classes}  \keyword{classes}
131  \keyword{algebra}  \keyword{algebra}

Legend:
Removed from v.720  
changed lines
  Added in v.956

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