X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=epclust%2FR%2Fmain.R;h=892c64c631ffafc67058e5d491ba6e86923ca4ba;hb=95b5c2e621af8949c5a5eed287d451817c16c24e;hp=bf31c87d6f18ed2e8b6f226a17859e0d098253dd;hpb=af3ea94782db30c2fc1bd796d788dab5e1fb79ed;p=epclust.git diff --git a/epclust/R/main.R b/epclust/R/main.R index bf31c87..892c64c 100644 --- a/epclust/R/main.R +++ b/epclust/R/main.R @@ -144,7 +144,7 @@ claws = function(getSeries, K1, K2, getSeries = function(inds) getDataInFile(inds, series_file, nbytes, endian) } - # Serialize all computed wavelets contributions onto a file + # Serialize all computed wavelets contributions into a file contribs_file = paste(bin_dir,"contribs",sep="") ; unlink(contribs_file) index = 1 nb_curves = 0 @@ -161,22 +161,6 @@ claws = function(getSeries, K1, K2, if (nb_series_per_task < min_series_per_chunk) stop("Too many tasks: less series in one task than min_series_per_chunk!") - # Cluster contributions in parallel (by nb_series_per_chunk) - indices_all = if (random) sample(nb_curves) else seq_len(nb_curves) - indices_tasks = lapply(seq_len(ntasks), function(i) { - upper_bound = ifelse( i series on file if (parll) indices = unlist( parallel::parLapply(cl, indices_tasks, runTwoStepClustering) ) @@ -202,7 +215,6 @@ claws = function(getSeries, K1, K2, parallel::stopCluster(cl) getRefSeries = getSeries - synchrones_file = paste(bin_dir,"synchrones",sep="") ; unlink(synchrones_file) if (WER=="mix") { indices = seq_len(ntasks*K2) @@ -218,6 +230,10 @@ claws = function(getSeries, K1, K2, contribs_file, nb_series_per_chunk, nbytes, endian) } + + +#TODO: if ntasks==1, c'est deja terminé + # Run step2 on resulting indices or series (from file) if (verbose) cat("...Run final // stage 1 + stage 2\n")