X-Git-Url: https://git.auder.net/%7B%7B%20path%28%27fos_user_profile_show%27%29%20%7D%7D?a=blobdiff_plain;ds=sidebyside;f=epclust%2Fsrc%2FcomputeMedoidsIndices.cpp;fp=epclust%2Fsrc%2FcomputeMedoidsIndices.cpp;h=0000000000000000000000000000000000000000;hb=40f12a2f66d06fd77183ea02b996f5c66f90761c;hp=895031a90f71376f10be93d4efc16a3a1faab94e;hpb=a52836b23adb4bfa6722642ec6426fb7b5f39650;p=epclust.git diff --git a/epclust/src/computeMedoidsIndices.cpp b/epclust/src/computeMedoidsIndices.cpp deleted file mode 100644 index 895031a..0000000 --- a/epclust/src/computeMedoidsIndices.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include - -// [[Rcpp::depends(BH, bigmemory)]] -#include - -#include -#include - -using namespace Rcpp; - -//' computeMedoidsIndices -//' -//' For each column of the 'series' matrix input, search for the closest medoid -//' (euclidian distance) and store its index -//' -//' @param pMedoids External pointer (a big.matrix 'address' slot in R) -//' @param series (reference) series, a matrix of size Lxn -//' -//' @return An integer vector of the closest medoids indices, for each (column) serie -// [[Rcpp::export]] -IntegerVector computeMedoidsIndices(SEXP pMedoids, NumericMatrix series) -{ - // Turn SEXP external pointer into BigMatrix (description) object - XPtr pMed(pMedoids); - // medoids: access to the content of the BigMatrix object - MatrixAccessor medoids = MatrixAccessor(*pMed); - - int nb_series = series.ncol(), - K = pMed->ncol(), - L = pMed->nrow(); - IntegerVector mi(nb_series); - - for (int i=0; i