Skip to content

Commit

Permalink
remove unused cpp function
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwbutler committed Oct 2, 2018
1 parent 397ee71 commit 943b282
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 33 deletions.
4 changes: 0 additions & 4 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ FastLogVMR <- function(mat, display_progress) {
.Call('_Seurat_FastLogVMR', PACKAGE = 'Seurat', mat, display_progress)
}

RowSumOfSquares <- function(x) {
.Call('_Seurat_RowSumOfSquares', PACKAGE = 'Seurat', x)
}

RowVar <- function(x) {
.Call('_Seurat_RowVar', PACKAGE = 'Seurat', x)
}
Expand Down
12 changes: 0 additions & 12 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,6 @@ BEGIN_RCPP
return rcpp_result_gen;
END_RCPP
}
// RowSumOfSquares
NumericVector RowSumOfSquares(const NumericMatrix x);
RcppExport SEXP _Seurat_RowSumOfSquares(SEXP xSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const NumericMatrix >::type x(xSEXP);
rcpp_result_gen = Rcpp::wrap(RowSumOfSquares(x));
return rcpp_result_gen;
END_RCPP
}
// RowVar
NumericVector RowVar(Eigen::Map<Eigen::MatrixXd> x);
RcppExport SEXP _Seurat_RowVar(SEXP xSEXP) {
Expand Down Expand Up @@ -301,7 +290,6 @@ static const R_CallMethodDef CallEntries[] = {
{"_Seurat_SparseRowVar2", (DL_FUNC) &_Seurat_SparseRowVar2, 3},
{"_Seurat_SparseRowVarStd", (DL_FUNC) &_Seurat_SparseRowVarStd, 5},
{"_Seurat_FastLogVMR", (DL_FUNC) &_Seurat_FastLogVMR, 2},
{"_Seurat_RowSumOfSquares", (DL_FUNC) &_Seurat_RowSumOfSquares, 1},
{"_Seurat_RowVar", (DL_FUNC) &_Seurat_RowVar, 1},
{"_Seurat_RunModularityClusteringCpp", (DL_FUNC) &_Seurat_RunModularityClusteringCpp, 9},
{"_Seurat_ComputeSNN", (DL_FUNC) &_Seurat_ComputeSNN, 2},
Expand Down
16 changes: 0 additions & 16 deletions src/data_manipulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,22 +373,6 @@ Eigen::VectorXd FastLogVMR(Eigen::SparseMatrix<double> mat, bool display_progre
return(rowdisp);
}

/* Calculates the row sums of squared values without using additional memory */
//[[Rcpp::export]]
NumericVector RowSumOfSquares(const NumericMatrix x){
int nrow = x.nrow(), ncol = x.ncol();
NumericVector out(nrow);

for (int i = 0; i < nrow; i++) {
double total = 0;
for (int j = 0; j < ncol; j++) {
total += pow(x(i, j), 2);
}
out[i] = total;
}
return out;
}

/* Calculates the variance of rows of a matrix */
//[[Rcpp::export]]
NumericVector RowVar(Eigen::Map<Eigen::MatrixXd> x){
Expand Down
1 change: 0 additions & 1 deletion src/data_manipulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ NumericVector SparseRowVarStd(Eigen::SparseMatrix<double> mat,
NumericVector sd,
double vmax,
bool display_progress);
NumericVector RowSumOfSquares(const NumericMatrix x);
NumericVector RowVar(Eigen::Map<Eigen::MatrixXd> x);
//----------------------------------------------------

Expand Down

0 comments on commit 943b282

Please sign in to comment.