This file is indexed.

/usr/lib/R/library/Matrix/NAMESPACE is in r-cran-matrix 1.2-12-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
useDynLib(Matrix, .registration=TRUE)

## Import functions we need explicitly, notably for which we define methods:
importFrom("grDevices", colorRampPalette, grey)
importFrom("graphics", par, image)
importFrom("grid", grid.rect, gpar, grob)# others via 'grid::'
importFrom("lattice", levelplot, panel.levelplot.raster)

importFrom("utils", str, head, tail, assignInNamespace, capture.output)
importFrom("stats"
         , "contrasts<-", cov2cor
         , diffinv, model.frame, rnorm, runif
         , symnum, terms
         , toeplitz, update#, vcov
           )

## try to import all we need, but not more
importFrom("methods"
	   ## still needed {group generics needed to be explicitly imported} ?
         , Ops, Arith, Compare, Logic, Math, Math2, Summary, Complex
	   ## generics for which we export new methods:
         , cbind2, rbind2, coerce, show
         , kronecker
	   ## things we call,.. necessary when Matrix is loaded, but not attached, as in
	   ## Rscript --vanilla -e 'require(methods);(M <- Matrix::Matrix(0:1,3,3));as(M,"sparseMatrix")'
         , as, is, extends, new
         , callGeneric, callNextMethod
         , .selectSuperClasses, .slotNames, canCoerce, packageSlot
         , getClass, getClassDef, validObject
         , setClass, setClassUnion, setMethod, setOldClass
         , setValidity, slot, "slot<-", slotNames, .hasSlot
         , signature, representation, prototype)



## Generics and functions defined in this package
export("%&%",
       "Cholesky", ".SuiteSparse_version",
       "Diagonal", ".symDiagonal", ".sparseDiagonal", ".trDiagonal",
       "Hilbert", "KhatriRao",
       "Matrix",
       "MatrixClass",
       "spMatrix",
       "sparseMatrix", "rsparsematrix",
       "Schur",
       "abIseq", "abIseq1", "rep2abI",
       "band",
       "bandSparse",
       "bdiag", ".bdiag",
       "c.sparseVector", # export to be used explicitly when 1st arg is not sparseVector
## no longer; implicit generics now
       ## "colMeans", "colSums", ## these needed a "..." added
       ## "rowMeans", "rowSums",
       "condest", "onenormest",
       "det",# << "identical" as base - but with correct determinant()
       ## "mkDet", # <- useful in other packages (Rmpfr, gmp) .. hmm --> 'stats' ?
       .asmatrix,
       ## FIXME: why exactly these and not e.g. dsp2dsy and many more?
       ".dsy2mat", ".dsy2dsp", ".dxC2mat", ".T2Cmat", "..2dge", ".dense2sy",
       ".C2nC", ".nC2d", ".nC2l",
       ".diag.dsC",# -> R/dsCMatrix.R --has FIXME
       .solve.dgC.chol, .solve.dgC.qr, .solve.dgC.lu,
       "diagN2U", "diagU2N", ".diagU2N", ".diag2tT", ".diag2sT", ".diag2mat",
       "drop0",
       "expand",
       "expm",
       "facmul", "fac2sparse", "fac2Sparse",
       "forceSymmetric",
       "T2graph", "graph2T", ## <- 'graph' package (and class) related
       "anyDuplicatedT", "uniqTsparse",
       "isTriangular",
       "isDiagonal",
       "isLDL",
       "is.null.DN",
       "invPerm",
       "lu",
       "nearPD",
       "nnzero",
       "formatSpMatrix", "formatSparseM", ".formatSparseSimple",
       "printSpMatrix",
       "printSpMatrix2",
       "qrR",
       "rankMatrix",
       "readHB",
       "readMM",
       "sparse.model.matrix",
       "sparseVector",
       "symmpart",
       "skewpart",
       "tril", "triu",
       "updown",
       "pack", "unpack"
       , ".updateCHMfactor"
       , ".validateCsparse"
       , "writeMM"
       )

## substitute for using  cbind() / rbind()
## .Deprecated() for R version >= 3.2.0 [2015-04]:
export("cBind",
       "rBind")


exportClasses(
    ## Class unions:
	      "index",
	      "replValue", # if we don't export it, things fail in dispatch
	      "atomicVector",
	      "number",
	      "xsparseVector", # the class union of all 'x' slot sparseVector's
              ## not exported (but exporting does not help for method dispatch bug!)
              ## "numLike",
              ## "xMatrix",
              ## "mMatrix",

    ## all others:
## LOGIC      "logic",
	      "abIndex", "rleDiff",

	      ## --- 'Matrix' mother and all its daughters : ---------------
	      "Matrix",
	      ## also intermediate `virtual' ones:
	      "dMatrix",
	      "lMatrix",
	      "nMatrix",
	      ## not yet used, but as sub-classes;
	      ## must provide them for 'hierarchy-analysis':
	      "iMatrix",
	      "zMatrix",

	      "denseMatrix",
	      "sparseMatrix",

	      "compMatrix",
	      "diagonalMatrix",
	      "generalMatrix",
	      "symmetricMatrix",
	      "triangularMatrix",

	      "dsparseMatrix",
	      "lsparseMatrix",
	      "nsparseMatrix",
	      "TsparseMatrix",
	      "CsparseMatrix",
	      "RsparseMatrix",
	      "ddenseMatrix",
	      "ldenseMatrix",
	      "ndenseMatrix",

	      "dgCMatrix",
	      "dgRMatrix",
	      "dgTMatrix",
	      "dgeMatrix",
	      "dpoMatrix",
	      "dppMatrix",
	      "dsCMatrix",
	      "dsRMatrix",
	      "dsTMatrix",
	      "dspMatrix",
	      "dsyMatrix",
	      "dtCMatrix",
	      "dtRMatrix",
	      "dtTMatrix",
	      "dtpMatrix",
	      "dtrMatrix",
	      "ddiMatrix",
	      "lgeMatrix",
	      "lspMatrix",
	      "lsyMatrix",
	      "ltpMatrix",
	      "ltrMatrix",
	      "ldiMatrix",
	      "ngeMatrix",
	      "nspMatrix",
	      "nsyMatrix",
	      "ntpMatrix",
	      "ntrMatrix",

	      "lgCMatrix",
	      "lgRMatrix",
	      "lgTMatrix",
	      "lsCMatrix",
	      "lsRMatrix",
	      "lsTMatrix",
	      "ltCMatrix",
	      "ltRMatrix",
	      "ltTMatrix",

	      "ngCMatrix",
	      "ngRMatrix",
	      "ngTMatrix",
	      "nsCMatrix",
	      "nsRMatrix",
	      "nsTMatrix",
	      "ntCMatrix",
	      "ntRMatrix",
	      "ntTMatrix",

	      "indMatrix", "pMatrix",

	      "corMatrix", # unused

	      ## --- inheriting "Matrix", but also factorizations:
	      "BunchKaufman",
	      "pBunchKaufman",
	      "Cholesky",
	      "pCholesky",
	      ## "LDL",

	      ## --- 'MatrixFactorization' mother and all its daughters : ---

	      "MatrixFactorization",
	      "CholeskyFactorization",

	      "LU",
	      "denseLU",
	      "sparseLU",

	      "CHMfactor",
	      "CHMsuper",
	      "CHMsimpl",
	      "dCHMsuper",
	      "dCHMsimpl",
	      "nCHMsuper",# unused
	      "nCHMsimpl",# unused

	      "sparseQR",
##	      "SPQR",

	      "Schur",

	      "sparseVector", ## --- and daughters : ---
	      "dsparseVector",
	      "isparseVector",
	      "lsparseVector",
	      "nsparseVector",
	      "zsparseVector"
	      )



exportMethods(## for both own and "other" generics:

	      ## Group Methods
	      "Arith",
	      "Compare",
	      "Logic",
	      "Math",
	      "Math2",
	      "Ops",
	      "Summary",

	      ## re-export S4 methods, for "stats"-S3-generics:
	      "cov2cor",
	      "toeplitz",
	      "update",

	      "!",
	      "+",# for dgT(Matrix) only
	      "%*%",

	      "all",
	      "any",
	      "all.equal",

	      "BunchKaufman",
	      "Cholesky",
	      "Schur",
	      "as.array",
	      "as.matrix",
	      "as.vector",
	      "as.numeric",
	      "as.integer",
	      "as.logical",
	      "band",
	      "chol",
	      "chol2inv",
	      "colMeans",
	      "colSums",
	      "coerce",
	      "crossprod",
	      "determinant",
	      "diag", "diag<-",
	      "diff",
	      "dim",
	      "dim<-",
	      "dimnames",
	      "dimnames<-",
	      "drop",
               ## "eigen", "svd", # only if(.Matrix.avoiding.as.matrix) <--> ./R/Auxiliaries.R
	      "expand",
	      "expm",
	      "format",
	      "head",
	      "image",
	      "forceSymmetric",
	      "isSymmetric",
	      "is.na",
	      "is.finite", "is.infinite",
	      "kronecker",
	      "length",
	      "mean",
	      "norm",
	      "nnzero",
	      "print",# print(x, ...) when show(x) is not sufficient
	      "qr",
	      "qr.R", "qr.Q",
	      "qr.qy",
	      "qr.qty",
	      "qr.coef",
	      "qr.resid",
	      "qr.fitted",
	      "rep",
	      "rcond",
	      "rowMeans",
	      "rowSums",
	      "show",
	      "solve",
##               "spqr",
	      "summary",
	      "symmpart",
	      "skewpart",
	      "t",
	      "tail",
	      "tcrossprod",
	      "tril",
	      "triu",
	      "updown",
	      "unname",
	      "which",
	      "zapsmall"
	      )
if(getRversion() >= "3.1.0")
exportMethods("anyNA")


exportMethods("rbind2")
exportMethods("cbind2")

S3method(print, sparseSummary)
S3method(print, diagSummary)
S3method(c, abIndex)# < for now -- S4 method on c() seems "difficult"
S3method(c, sparseVector)#  (ditto)

## So that such dispatch also works inside base functions:
S3method(as.array, Matrix)
S3method(as.array, sparseVector)
S3method(as.matrix, Matrix)
S3method(as.matrix, sparseVector)
S3method(as.vector, Matrix)
S3method(as.vector, sparseVector)