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 946 - (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 : bates 720 \alias{\%*\%,lgCMatrix,lgCMatrix-method}
15 : maechler 891 \alias{\%*\%,lsparseMatrix,lsparseMatrix-method}
16 : maechler 925 \alias{\%*\%,lsparseMatrix,ldenseMatrix-method}
17 :     \alias{\%*\%,ldenseMatrix,lsparseMatrix-method}
18 : bates 735 \alias{chol,lsCMatrix,logical-method}
19 :     \alias{chol,lsCMatrix,missing-method}
20 : bates 723 \alias{coerce,dgCMatrix,lgCMatrix-method}
21 : bates 725 \alias{coerce,lgCMatrix,dgCMatrix-method}
22 : bates 735 \alias{coerce,lgCMatrix,lgTMatrix-method}
23 : maechler 868 \alias{coerce,lgCMatrix,matrix-method}
24 : maechler 946 \alias{coerce,lgTMatrix,dgTMatrix-method}
25 : bates 735 \alias{coerce,lgTMatrix,lgCMatrix-method}
26 : maechler 868 \alias{coerce,lgTMatrix,matrix-method}
27 : maechler 946 \alias{coerce,lsCMatrix,dgTMatrix-method}
28 : bates 725 \alias{coerce,lsCMatrix,dsCMatrix-method}
29 : maechler 946 \alias{coerce,lsCMatrix,lgCMatrix-method}
30 :     \alias{coerce,lsCMatrix,lsTMatrix-method}
31 :     \alias{coerce,lsCMatrix,matrix-method}
32 : bates 735 \alias{coerce,ltCMatrix,dtCMatrix-method}
33 : maechler 946 \alias{coerce,ltCMatrix,matrix-method}
34 :     %
35 : bates 723 \alias{crossprod,lgCMatrix,missing-method}
36 : bates 735 \alias{crossprod,lgTMatrix,missing-method}
37 : maechler 891 \alias{crossprod,lsparseMatrix-method}
38 :     \alias{crossprod,lsparseMatrix,missing-method}
39 : maechler 925 \alias{crossprod,lsparseMatrix,lsparseMatrix-method}
40 :     \alias{crossprod,lsparseMatrix,ldenseMatrix-method}
41 :     \alias{crossprod,ldenseMatrix,lsparseMatrix-method}
42 : bates 735 \alias{image,lgCMatrix-method}
43 :     \alias{image,lsCMatrix-method}
44 :     \alias{image,ltCMatrix-method}
45 : bates 720 \alias{t,lgCMatrix-method}
46 : bates 735 \alias{t,lgTMatrix-method}
47 :     \alias{t,lsCMatrix-method}
48 :     \alias{t,ltCMatrix-method}
49 : bates 723 \alias{tcrossprod,lgCMatrix-method}
50 : bates 735 \alias{tcrossprod,lgTMatrix-method}
51 : maechler 891 \alias{tcrossprod,lsparseMatrix-method}
52 : bates 723 \title{Sparse logical matrices}
53 :     \description{The \code{lsparseMatrix} class is a virtual class of sparse
54 :     matrices with \code{TRUE}/\code{FALSE} entries. Only the positions of the
55 :     elements that are \code{TRUE} are stored. These can be stored in the
56 :     ``triplet'' form (classes \code{lgTMatrix}, \code{lsTMatrix}, and
57 :     \code{ltTMatrix} which really contain pairs, not triplets) or in
58 : maechler 858 compressed column-oriented form (classes \code{lgCMatrix},
59 :     \code{lsCMatrix}, and \code{ltCMatrix}) or in compressed row-oriented
60 :     form (classes \code{lgRMatrix}, \code{lsRMatrix}, and
61 :     \code{ltRMatrix}). The second letter in the name of these non-virtual
62 :     classes indicates \code{g}eneral, \code{s}ymmetric, or \code{t}riangular.
63 : bates 723 }
64 : bates 720 \section{Objects from the Class}{
65 : bates 723 Objects can be created by calls of the form \code{new("lgCMatrix",
66 :     ...)} and so on. More frequently objects are created by coercion of
67 :     a numeric sparse matrix to the logical form for use in
68 :     the symbolic analysis phase
69 :     of an algorithm involving sparse matrices. Such algorithms often
70 :     involve two phases: a symbolic phase wherein the positions of the
71 :     non-zeros in the result are determined and a numeric phase wherein the
72 :     actual results are calculated. During the symbolic phase only the
73 :     positions of the non-zero elements in any operands are of interest,
74 :     hence any numeric sparse matrices can be treated as logical sparse
75 :     matrices.
76 : bates 720 }
77 :     \section{Slots}{
78 :     \describe{
79 : bates 722 \item{\code{uplo}:}{Object of class \code{"character"}. Must be
80 :     either "U", for upper triangular, and "L", for lower
81 :     triangular. Present in the triangular and symmetric classes but not
82 :     in the general class.}
83 :     \item{\code{diag}:}{Object of class \code{"character"}. Must be
84 :     either \code{"U"}, for unit triangular (diagonal is all ones), or
85 :     \code{"N"} for non-unit. The implicit diagonal elements are not
86 :     explicitly stored when \code{diag} is \code{"U"}. Present in the
87 :     triangular classes only.}
88 : bates 720 \item{\code{p}:}{Object of class \code{"integer"} of pointers, one
89 : bates 723 for each column (row), to the initial (zero-based) index of elements in
90 :     the column. Present in compressed column-oriented and compressed
91 :     row-oriented forms only.}
92 : bates 720 \item{\code{i}:}{Object of class \code{"integer"} of length nnzero
93 :     (number of non-zero elements). These are the row numbers for
94 : bates 723 each TRUE element in the matrix. All other elements are FALSE.
95 :     Present in triplet and compressed column-oriented forms only.}
96 :     \item{\code{j}:}{Object of class \code{"integer"} of length nnzero
97 :     (number of non-zero elements). These are the column numbers for
98 :     each TRUE element in the matrix. All other elements are FALSE.
99 :     Present in triplet and compressed column-oriented forms only.}
100 : bates 720 \item{\code{Dim}:}{Object of class \code{"integer"} - the dimensions
101 :     of the matrix.}
102 :     }
103 :     }
104 :     \section{Methods}{
105 :     \describe{
106 :     \item{coerce}{\code{signature(from = "dgCMatrix", to = "lgCMatrix")}}
107 :     \item{t}{\code{signature(x = "lgCMatrix")}: returns the transpose
108 :     of \code{x}}
109 :     }
110 :     }
111 :     %\references{}
112 :     %\author{}
113 : bates 723 %\note{}
114 : bates 720 \seealso{
115 : bates 722 \code{\link{dgCMatrix-class}}
116 : bates 720 }
117 : maechler 858 \examples{
118 : maechler 868 m <- Matrix(c(0,0,2:0), 3,5, dimnames=list(LETTERS[1:3],NULL))
119 :     (dm <- as(m, "dgCMatrix"))# no dimnames for sparse here
120 :     (lm <- as(dm, "lgCMatrix"))
121 :     str(lm)
122 : maechler 858 }
123 : bates 720 \keyword{classes}
124 :     \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