SCM

SCM Repository

[matrix] Annotation of /pkg/man/sparseVector-class.Rd
ViewVC logotype

Annotation of /pkg/man/sparseVector-class.Rd

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : maechler 1845 \name{sparseVector-class}
2 :     \docType{class}
3 :     \title{Sparse Vector Classes}
4 :     \alias{sparseVector-class}
5 :     % sub classes
6 :     \alias{dsparseVector-class}
7 :     \alias{isparseVector-class}
8 :     \alias{lsparseVector-class}
9 :     \alias{nsparseVector-class}
10 :     \alias{zsparseVector-class}
11 :     %% Group methods
12 :     % \alias{Math,sparseVector-method}
13 :     % %\alias{Math2,sparseVector,numeric-method}
14 : maechler 1852 \alias{Arith,sparseVector,sparseVector-method}
15 :     \alias{Arith,dsparseVector,dsparseVector-method}
16 :     \alias{-,dsparseVector,missing-method}
17 :     \alias{Logic,sparseVector,sparseVector-method}
18 :     \alias{Logic,lsparseVector,lsparseVector-method}
19 :     \alias{Ops,ANY,sparseVector-method}
20 :     \alias{Ops,sparseVector,ANY-method}
21 :     \alias{Ops,sparseVector,atomicVector-method}
22 :     \alias{Ops,atomicVector,sparseVector-method}
23 : maechler 1845 %
24 :     \alias{coerce,ANY,sparseVector-method}
25 :     \alias{coerce,TsparseMatrix,sparseVector-method}
26 :     \alias{coerce,diagonalMatrix,sparseVector-method}
27 :     \alias{coerce,sparseMatrix,sparseVector-method}
28 :     \alias{coerce,atomicVector,sparseVector-method}
29 :     \alias{coerce,triangularVector,sparseVector-method}
30 :     \alias{coerce,sparseVector,vector-method}
31 :     \alias{as.numeric,sparseVector-method}
32 :     \alias{as.vector,sparseVector,missing-method}
33 :     \alias{as.vector,sparseVector,character-method}
34 :     \alias{length,sparseVector-method}
35 :     \alias{show,sparseVector-method}
36 :     %
37 :     \alias{[,sparseVector,index,ANY,ANY-method}
38 : maechler 1852 \alias{[<-,sparseVector,index,missing,replValue-method}
39 : maechler 1845 %
40 :     \description{Sparse Vector Classes: The virtual mother class
41 :     \code{"sparseVector"} has the five actual daughter classes
42 :     \code{"dsparseVector"}, \code{"isparseVector"},
43 :     \code{"lsparseVector"}, \code{"nsparseVector"}, and
44 :     \code{"zsparseVector"}, where we've mainly implemented methods for
45 :     the \code{d*}, \code{l*} and \code{n*} ones.
46 :     }
47 :     \section{Slots}{
48 :     \describe{
49 :     \item{\code{length}:}{class \code{"integer"} - the \code{\link{length}}
50 :     of the sparse vector.}
51 :     \item{\code{i}:}{class \code{"integer"} - the (1-based) indices of
52 :     the non-zero entries.}
53 :     \item{\code{x}:}{(for all but \code{"nsparseVector"}):
54 :     the non-zero entries. This is of class \code{"numeric"} for class
55 :     \code{"dsparseVector"}, \code{"logical"} for class
56 :     \code{"lsparseVector"}, etc.
57 :    
58 :     Note that \code{"nsparseVector"}s have no \code{x} slot.
59 :     }
60 :     }
61 :     }
62 :     \section{Methods}{
63 :     \describe{
64 :     \item{length}{\code{signature(x = "sparseVector")}: simply extracts
65 :     the \code{length} slot.}
66 :     \item{show}{\code{signature(object = "sparseVector")}: The
67 :     \code{\link{show}} method for sparse vectors prints
68 :     \emph{\dQuote{structural}} zeroes as \code{"."} using the
69 :     non-exported \code{prSpVector} function which allows further
70 :     customization such as replacing \code{"."} by \code{" "} (blank).
71 :    
72 :     Note that \code{\link{options}(max.print)} will influence how many
73 :     entries of large sparse vectors are printed at all.}
74 :     \item{as.vector}{\code{signature(x = "sparseVector", mode = "character")}
75 :     coerces sparse vectors to \dQuote{regular}, i.e., atomic vectors.
76 :     This is the same as \code{as(x, "vector")}.
77 :     }
78 :     }
79 :     }
80 :     %\author{Martin}
81 :     \examples{
82 :     showClass("sparseVector")
83 :     showClass("dsparseVector")
84 :    
85 :     sx <- c(0,0,3, 3.2, 0,0,0,-3:1,0,0,2,0,0,5,0,0)
86 :     (ss <- as(sx, "sparseVector"))
87 :    
88 :     %% FIXME: Explain and show spV2M() or its successor
89 :    
90 :     }
91 :     \keyword{classes}

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