SCM

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 956 - (view) (download) (as text)

1 : bates 723 \name{lsparseMatrix-classes}
2 : bates 720 \docType{class}
3 : bates 723 \alias{lsparseMatrix-class}
4 : bates 720 \alias{lgCMatrix-class}
5 : bates 722 \alias{ltCMatrix-class}
6 :     \alias{lsCMatrix-class}
7 : bates 723 \alias{lgRMatrix-class}
8 :     \alias{ltRMatrix-class}
9 :     \alias{lsRMatrix-class}
10 :     \alias{lgTMatrix-class}
11 :     \alias{ltTMatrix-class}
12 :     \alias{lsTMatrix-class}
13 : maechler 946 %
14 : maechler 956 \alias{-,lsparseMatrix,missing-method}
15 :     \alias{!,lsparseMatrix-method}
16 : bates 720 \alias{\%*\%,lgCMatrix,lgCMatrix-method}
17 : maechler 891 \alias{\%*\%,lsparseMatrix,lsparseMatrix-method}
18 : maechler 925 \alias{\%*\%,lsparseMatrix,ldenseMatrix-method}
19 :     \alias{\%*\%,ldenseMatrix,lsparseMatrix-method}
20 : bates 735 \alias{chol,lsCMatrix,logical-method}
21 :     \alias{chol,lsCMatrix,missing-method}
22 : maechler 956
23 : bates 725 \alias{coerce,lgCMatrix,dgCMatrix-method}
24 : bates 735 \alias{coerce,lgCMatrix,lgTMatrix-method}
25 : maechler 868 \alias{coerce,lgCMatrix,matrix-method}
26 : maechler 946 \alias{coerce,lgTMatrix,dgTMatrix-method}
27 : bates 735 \alias{coerce,lgTMatrix,lgCMatrix-method}
28 : maechler 868 \alias{coerce,lgTMatrix,matrix-method}
29 : maechler 946 \alias{coerce,lsCMatrix,dgTMatrix-method}
30 : bates 725 \alias{coerce,lsCMatrix,dsCMatrix-method}
31 : maechler 946 \alias{coerce,lsCMatrix,lgCMatrix-method}
32 :     \alias{coerce,lsCMatrix,lsTMatrix-method}
33 :     \alias{coerce,lsCMatrix,matrix-method}
34 : bates 735 \alias{coerce,ltCMatrix,dtCMatrix-method}
35 : maechler 946 \alias{coerce,ltCMatrix,matrix-method}
36 :     %
37 : bates 723 \alias{crossprod,lgCMatrix,missing-method}
38 : bates 735 \alias{crossprod,lgTMatrix,missing-method}
39 : maechler 891 \alias{crossprod,lsparseMatrix-method}
40 :     \alias{crossprod,lsparseMatrix,missing-method}
41 : maechler 925 \alias{crossprod,lsparseMatrix,lsparseMatrix-method}
42 :     \alias{crossprod,lsparseMatrix,ldenseMatrix-method}
43 :     \alias{crossprod,ldenseMatrix,lsparseMatrix-method}
44 : bates 735 \alias{image,lgCMatrix-method}
45 :     \alias{image,lsCMatrix-method}
46 :     \alias{image,ltCMatrix-method}
47 : bates 720 \alias{t,lgCMatrix-method}
48 : bates 735 \alias{t,lgTMatrix-method}
49 :     \alias{t,lsCMatrix-method}
50 :     \alias{t,ltCMatrix-method}
51 : bates 723 \alias{tcrossprod,lgCMatrix-method}
52 : bates 735 \alias{tcrossprod,lgTMatrix-method}
53 : maechler 891 \alias{tcrossprod,lsparseMatrix-method}
54 : bates 723 \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 : maechler 858 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 : bates 723 }
66 : bates 720 \section{Objects from the Class}{
67 : bates 723 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 : bates 720 }
79 :     \section{Slots}{
80 :     \describe{
81 : bates 722 \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 : bates 720 \item{\code{p}:}{Object of class \code{"integer"} of pointers, one
91 : bates 723 for each column (row), to the initial (zero-based) index of elements in
92 :     the column. Present in compressed column-oriented and compressed
93 :     row-oriented forms only.}
94 : bates 720 \item{\code{i}:}{Object of class \code{"integer"} of length nnzero
95 :     (number of non-zero elements). These are the row numbers for
96 : bates 723 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 : bates 720 \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions
103 :     of the matrix.}
104 :     }
105 :     }
106 :     \section{Methods}{
107 :     \describe{
108 :     \item{coerce}{\code{signature(from = "dgCMatrix", to = "lgCMatrix")}}
109 :     \item{t}{\code{signature(x = "lgCMatrix")}: returns the transpose
110 :     of \code{x}}
111 :     }
112 :     }
113 :     %\references{}
114 :     %\author{}
115 : bates 723 %\note{}
116 : bates 720 \seealso{
117 : bates 722 \code{\link{dgCMatrix-class}}
118 : bates 720 }
119 : maechler 858 \examples{
120 : maechler 868 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 : maechler 956
125 :     data(mm)
126 :     lmm <- as(mm, "lgCMatrix")
127 :     xlx <- crossprod(lmm)
128 :     image(xlx, main=paste("crossprod(lmm) : Sparse", class(xlx)))
129 : maechler 858 }
130 : bates 720 \keyword{classes}
131 :     \keyword{algebra}

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