SCM

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1921, Sat Jun 23 18:08:17 2007 UTC revision 1922, Sat Jun 23 18:08:48 2007 UTC
# Line 1  Line 1 
1    %%----- Docu for *all* sparse vector classes ----------
2  \name{sparseVector-class}  \name{sparseVector-class}
3  \docType{class}  \docType{class}
4  \title{Sparse Vector Classes}  \title{Sparse Vector Classes}
# Line 8  Line 9 
9  \alias{lsparseVector-class}  \alias{lsparseVector-class}
10  \alias{nsparseVector-class}  \alias{nsparseVector-class}
11  \alias{zsparseVector-class}  \alias{zsparseVector-class}
12    \alias{xsparseVector-class}% the class union
13  %% Group methods  %% Group methods
14  % \alias{Math,sparseVector-method}  % \alias{Math,sparseVector-method}
15  % %\alias{Math2,sparseVector,numeric-method}  % %\alias{Math2,sparseVector,numeric-method}
# Line 28  Line 30 
30  \alias{coerce,atomicVector,sparseVector-method}  \alias{coerce,atomicVector,sparseVector-method}
31  \alias{coerce,triangularVector,sparseVector-method}  \alias{coerce,triangularVector,sparseVector-method}
32  \alias{coerce,sparseVector,vector-method}  \alias{coerce,sparseVector,vector-method}
33    \alias{coerce,xsparseVector,dsparseVector-method}
34    \alias{coerce,xsparseVector,isparseVector-method}
35    \alias{coerce,xsparseVector,lsparseVector-method}
36    \alias{coerce,xsparseVector,zsparseVector-method}
37    \alias{coerce,sparseVector,nsparseVector-method}
38    %
39  \alias{as.numeric,sparseVector-method}  \alias{as.numeric,sparseVector-method}
40  \alias{as.vector,sparseVector,missing-method}  \alias{as.vector,sparseVector,missing-method}
41  \alias{as.vector,sparseVector,character-method}  \alias{as.vector,sparseVector,character-method}
# Line 56  Line 64 
64        \code{"lsparseVector"}, etc.        \code{"lsparseVector"}, etc.
65    
66        Note that \code{"nsparseVector"}s have no \code{x} slot.        Note that \code{"nsparseVector"}s have no \code{x} slot.
67          Further, mainly for ease of method definitions, we've defined the
68          class union (see \code{\link{setClassUnion}}) of all sparse vector
69          classes which \emph{have} an \code{x} slot, as class \code{"xsparseVector"}.
70        }        }
71    }    }
72  }  }
# Line 81  Line 92 
92  \examples{  \examples{
93  showClass("sparseVector")  showClass("sparseVector")
94  showClass("dsparseVector")  showClass("dsparseVector")
95    showClass("xsparseVector")# those with an 'x' slot
96    
97  sx <- c(0,0,3, 3.2, 0,0,0,-3:1,0,0,2,0,0,5,0,0)  sx <- c(0,0,3, 3.2, 0,0,0,-3:1,0,0,2,0,0,5,0,0)
98  (ss <- as(sx, "sparseVector"))  (ss <- as(sx, "sparseVector"))
99    
100    ix <- as.integer(round(sx))
101    (is <- as(ix, "sparseVector"))
102    %% FIXME: I'd want  isparseVector
103    %%
104    as(is, "isparseVector") %% ERROR ## FIXME
105    
106  %% FIXME: Explain and show  spV2M() or its successor  %% FIXME: Explain and show  spV2M() or its successor
107    
108    
109  }  }
110  \keyword{classes}  \keyword{classes}

Legend:
Removed from v.1921  
changed lines
  Added in v.1922

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