X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=epclust%2Ftests%2Ftestthat%2Fhelper.computeMedoidsIndices.R;fp=epclust%2Ftests%2Ftestthat%2Fhelper.computeMedoidsIndices.R;h=0000000000000000000000000000000000000000;hb=40f12a2f66d06fd77183ea02b996f5c66f90761c;hp=cd6a30e94a336f0fa18aadc388949e46f38bf63d;hpb=a52836b23adb4bfa6722642ec6426fb7b5f39650;p=epclust.git diff --git a/epclust/tests/testthat/helper.computeMedoidsIndices.R b/epclust/tests/testthat/helper.computeMedoidsIndices.R deleted file mode 100644 index cd6a30e..0000000 --- a/epclust/tests/testthat/helper.computeMedoidsIndices.R +++ /dev/null @@ -1,12 +0,0 @@ -# R-equivalent of computeMedoidsIndices, requiring a matrix -# (thus potentially breaking "fit-in-memory" hope) -R_computeMedoidsIndices <- function(medoids, series) -{ - nb_series = ncol(series) #series in columns - - mi = rep(NA,nb_series) - for (i in 1:nb_series) - mi[i] <- which.min( colSums( sweep(medoids, 1, series[,i], '-')^2 ) ) - - mi -}