1 #TODO: setRefClass... to avoid copy data !!
2 #http://stackoverflow.com/questions/2603184/r-pass-by-reference
4 #fields: data (can be NULL or provided by user), coeffs (will be computed
5 #con can be a character string naming a file; see readLines()
6 #data can be in DB format, on one column : TODO: guess (from header, or col. length...)
7 epclust = function(data=NULL, con=NULL, raw=FALSE, K, nbPerChunk, ..., where_to_store_tmp_data, and how ?)
8 #options for tmp files: in RAM, on disk, on DB (can be distributed)
12 #on input: can be data or con; data handled by writing it to file (ascii or bin ?!),
23 index = index + nbSeriesPerChunk
25 } else if (!is.null(con))
27 #incremental connection
28 #read it one by one and get coeffs until nbSeriesPerChunk
29 #then launch a clustering task............
32 stop("at least 'data' or 'con' argument must be present")
36 getCoeffs = function(series)
38 #... return wavelets coeffs : compute in parallel !