-epclust = function(data=NULL, con=NULL, raw=FALSE, K, nbPerChunk, ..., where_to_store_tmp_data, and how ?)
-#options for tmp files: in RAM, on disk, on DB (can be distributed)
+
+
+writeTmp(curves [uncompressed coeffs, limited number - nbSeriesPerChunk], last=FALSE) #if last=TRUE, close the conn
+readTmp(..., from index, n curves) #careful: connection must remain open
+#TODO: write read/write tmp reference ( on file in .tmp/ folder ... )
+
+epclust = function(data=NULL, K, nbPerChunk, ..., writeTmp=ref_writeTmp, readTmp=ref_readTmp) #where to put/retrieve intermediate results; if not provided, use file on disk