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