04-Arithmetic | R Documentation |
Binary arithmetic for numeric/MPCR objects.
## S4 method for signature 'Rcpp_MPCR,Rcpp_MPCR'
e1 + e2
## S4 method for signature 'Rcpp_MPCR,Rcpp_MPCR'
e1 - e2
## S4 method for signature 'Rcpp_MPCR,Rcpp_MPCR'
e1 * e2
## S4 method for signature 'Rcpp_MPCR,Rcpp_MPCR'
e1 / e2
## S4 method for signature 'Rcpp_MPCR,Rcpp_MPCR'
e1 ^ e2
## S4 method for signature 'Rcpp_MPCR,BaseLinAlg'
e1 + e2
## S4 method for signature 'Rcpp_MPCR,BaseLinAlg'
e1 * e2
## S4 method for signature 'Rcpp_MPCR,BaseLinAlg'
e1 - e2
## S4 method for signature 'Rcpp_MPCR,BaseLinAlg'
e1 / e2
## S4 method for signature 'Rcpp_MPCR,BaseLinAlg'
e1 ^ e2
e1 , e2 |
Numeric/MPCR objects. |
An MPCR object, matching the data type of the highest precision input.
library(MPCR)
s1 <- as.MPCR(1:20,nrow=2,ncol=10,"single")
s2 <- as.MPCR(21:40,nrow=2,ncol=10,"double")
x <- s1 + s2
typeof(x) # A 64-bit precision (double) MPCR matrix.
s3 <- as.MPCR(1:20,nrow=2,ncol=10,"single")
x <- s1 + s3
typeof(x) # A 32-bit precision (single) MPCR matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.