Diff of /src/scAI_Rcpp.cpp [000000] .. [4a0329]

Switch to unified view

a b/src/scAI_Rcpp.cpp
1
// [[Rcpp::depends(RcppEigen)]]
2
3
#include <RcppEigen.h>
4
5
// [[Rcpp::export]]
6
SEXP eigenMapMatMult(const Eigen::Map<Eigen::MatrixXd> A, Eigen::Map<Eigen::MatrixXd> B){
7
  Eigen::MatrixXd C = A * B;
8
  
9
  return Rcpp::wrap(C);
10
}
11
12
// [[Rcpp::export]]
13
SEXP eigenMapMatcrossprod(const Eigen::Map<Eigen::MatrixXd> A, Eigen::Map<Eigen::MatrixXd> B){
14
  Eigen::MatrixXd C = A.adjoint() * B;
15
  
16
  return Rcpp::wrap(C);
17
}
18
// [[Rcpp::export]]
19
SEXP eigenMapMattcrossprod(const Eigen::Map<Eigen::MatrixXd> A, Eigen::Map<Eigen::MatrixXd> B){
20
  Eigen::MatrixXd C = A * B.adjoint();
21
  
22
  return Rcpp::wrap(C);
23
}
24
25
26