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

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

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