SCM

SCM Repository

[matrix] Annotation of /pkg/R/AllGeneric.R
ViewVC logotype

Annotation of /pkg/R/AllGeneric.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 538 - (view) (download)

1 : maechler 538 #### Define those generics that we need, if they don't exist
2 : bates 10
3 : maechler 538 ### In order to be able to define group generics
4 :     ### {MM : I think this is a workaround for a basic "methods"+NAMESPACE bug}
5 :     ## This errors out in R 2.1.0
6 :     ##- setGeneric("+", function(e1,e2) standardGeneric("+"), group = "Arith")
7 :     ##- setGeneric("-", function(e1,e2) standardGeneric("-"), group = "Arith")
8 :     ##- setGeneric("*", function(e1,e2) standardGeneric("*"), group = "Arith")
9 :     ##- setGeneric("/", function(e1,e2) standardGeneric("/"), group = "Arith")
10 :    
11 :    
12 :     if (!isGeneric("expand"))
13 : bates 10 setGeneric("expand", function(x, ...) standardGeneric("expand"))
14 : bates 325
15 : maechler 538 if (!isGeneric("tcrossprod"))
16 : bates 334 setGeneric("tcrossprod", function(x) standardGeneric("tcrossprod"))
17 :    
18 : maechler 538 if (!isGeneric("isSymmetric"))
19 :     setGeneric("isSymmetric", function(object, ...)
20 :     standardGeneric("isSymmetric"))
21 : bates 334
22 : maechler 538 if (!isGeneric("isNested"))
23 : bates 325 setGeneric("isNested", function(object, ...) standardGeneric("isNested"))
24 :    
25 : maechler 538 if (!isGeneric("facmul"))
26 : bates 10 setGeneric("facmul",
27 :     function(x, factor, y, transpose, left, ...)
28 :     standardGeneric("facmul"))
29 :    
30 : maechler 538 if (!isGeneric("lu"))
31 : bates 10 setGeneric("lu", function(x, ...) standardGeneric("lu"))
32 :    
33 : maechler 538 if (!isGeneric("norm"))
34 : bates 10 setGeneric("norm", function(x, type, ...) standardGeneric("norm"))
35 :    
36 : maechler 538 if (!isGeneric("rcond"))
37 : bates 10 setGeneric("rcond", function(x, type, ...) standardGeneric("rcond"))
38 :    
39 : maechler 538 if (!isGeneric("Schur"))
40 : bates 10 setGeneric("Schur", function(x, vectors, ...) standardGeneric("Schur"))
41 :    
42 : maechler 538 if (!isGeneric("unpack"))
43 : bates 10 setGeneric("unpack", function(x, ...) standardGeneric("unpack"))
44 :    
45 : maechler 538 if (!isGeneric("%p%"))
46 : bates 10 setGeneric("%p%", function(a, b) standardGeneric("%p%"))
47 :    
48 : maechler 538 if (!isGeneric("coef<-"))
49 : bates 17 setGeneric("coef<-", function(object, ..., value)
50 :     standardGeneric("coef<-"))
51 : bates 10
52 : maechler 538
53 : bates 10 ## The generics pdFactor, pdMatrix, corFactor and corMatrix will be deprecated
54 :    
55 : maechler 538 if (!isGeneric("pdFactor"))
56 : bates 10 setGeneric("pdFactor", function(object) standardGeneric("pdFactor"))
57 :    
58 : maechler 538 if (!isGeneric("pdMatrix"))
59 : bates 10 setGeneric("pdMatrix", function(object) standardGeneric("pdMatrix"))
60 :    
61 : maechler 538 if (!isGeneric("corFactor"))
62 : bates 10 ## extractor for transpose inverse square root factor of corr matrix
63 :     setGeneric("corFactor", function(object, ...) standardGeneric("corFactor"))
64 :    
65 : maechler 538 if (!isGeneric("corMatrix"))
66 : bates 10 ## extractor for correlation matrix or the transpose inverse
67 :     ## square root matrix
68 :     setGeneric("corMatrix", function(object, ...) standardGeneric("corMatrix"))
69 :    
70 : maechler 538 # if (!isGeneric("isInitialized"))
71 : bates 241 # setGeneric("isInitialized",
72 :     # function(object) standardGeneric("isInitialized"),
73 :     # valueClass = "logical")
74 : maechler 538 #
75 : bates 10
76 : maechler 538 if (!isGeneric("matrix<-"))
77 :     setGeneric("matrix<-", function(object, value) standardGeneric("matrix<-"))
78 : bates 461
79 : maechler 538 if (!isGeneric("expm"))
80 :     setGeneric("expm", function(x) standardGeneric("expm"))
81 :    

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