X-Git-Url: https://git.auder.net/variants/Baroque/style.css?a=blobdiff_plain;f=epclust%2FR%2FcomputeWerDists.R;h=f47cd238767cbab18eca0ccec1b8121eec96404f;hb=57f337af19cd6251815bb1ff2d62f4c58e8b6078;hp=0ad5404e07fffa9ac0524b27ee7f5ad6961dc2c4;hpb=14c10f2d252f45349e0b4fbf87e17dfbfae39f92;p=epclust.git diff --git a/epclust/R/computeWerDists.R b/epclust/R/computeWerDists.R index 0ad5404..f47cd23 100644 --- a/epclust/R/computeWerDists.R +++ b/epclust/R/computeWerDists.R @@ -12,8 +12,8 @@ #' @return A distances matrix of size K x K where K == length(indices) #' #' @export -computeWerDists <- function(indices, getSeries, nb_series_per_chunk, smooth_lvl=3, nvoice=4, - nbytes=4, endian=.Platform$endian, ncores=3, verbose=FALSE) +computeWerDists <- function(indices, getSeries, nb_series_per_chunk, smooth_lvl=3, + nvoice=4, nbytes=4, endian=.Platform$endian, ncores=3, verbose=FALSE) { n <- length(indices) L <- length(getSeries(1)) #TODO: not very neat way to get L @@ -116,7 +116,7 @@ computeWerDists <- function(indices, getSeries, nb_series_per_chunk, smooth_lvl= ignored <- if (parll) - parallel::parLapply(cl, seq_len(n-1), computeDistances) + parallel::parLapplyLB(cl, seq_len(n-1), computeDistances) else lapply(seq_len(n-1), computeDistances) Xwer_dist[n,n] <- 0.