supportCppAccess {beachmat} | R Documentation |
Does the current matrix class support C++ access?
## S4 method for signature 'ANY' supportCppAccess(x)
x |
A matrix-like object. |
This function is called by the beachmat C++ API upon encountering an unknown matrix type.
If it returns TRUE
, we assume that the package used to define the class of x
also contains registered C++ functions to access rows or columns of x
.
This allows beachmat to use those C++ functions to directly access values of x
, rather than relying on block realization of an unknown matrix.
If you need to use this function, you almost certainly need to read the vignette on “Extending beachmat”.
A logical scalar specifying whether C++ access is supported for x
.
Aaron Lun
library(Matrix) Y <- Matrix(0, 10, 10) supportCppAccess(Y) # Note that certain matrix types are always supported # by beachmat but still return FALSE. X <- matrix(0, 10, 10) supportCppAccess(X)