X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=old_C_code%2Fstage1%2Fwrapper.R;h=ec859dce8e93ba6471252a1929fbbe100049dacb;hb=5edda192f1a634ba284acdea7b6302f60df7b000;hp=0ce9786c5ce2bd502aeac07a5d23b8b83326de15;hpb=3954ea3cea46a60ab7c09862f3167c672367adcf;p=epclust.git diff --git a/old_C_code/stage1/wrapper.R b/old_C_code/stage1/wrapper.R index 0ce9786..ec859dc 100644 --- a/old_C_code/stage1/wrapper.R +++ b/old_C_code/stage1/wrapper.R @@ -34,9 +34,20 @@ getMedoids = function(path=".", xmlResult = "ppamResult.xml", return ( curves[ranks,] ) # == medoids } -#TODO: check C function( is it correct?!) getDistor = function(path=".", xmlResult = "ppamResult.xml", finalSeries = "ppamFinalSeries.bin") { system(paste(path,"/ppam.exe classif ",finalSeries," ",xmlResult,sep="")) } + +serialize = function(path=".", csvSeries, binSeries, byCols=0, nbSeries=0) +{ + system(paste(path,"/ppam.exe serialize ",csvSeries," ",binSeries," ",byCols," ",nbSeries, + sep="")) +} + +deserialize = function(path=".", binSeries, csvSeries, ranks="-1") +{ + system(paste(path,"/ppam.exe deserialize ",binSeries," ",csvSeries," ",ranks,sep="")) + return ( read.table(csvSeries, sep=",") ) +}