From: Benjamin Auder Date: Sat, 18 Mar 2017 16:07:25 +0000 (+0100) Subject: update test/ folder for experimentations X-Git-Url: https://git.auder.net/variants/Chakart/css/assets/doc/pieces/common.css?a=commitdiff_plain;h=923a335ee5493de5ace95d946b7bf93fbedd0377;p=valse.git update test/ folder for experimentations --- diff --git a/test/Makefile b/test/Makefile index 0fa1189..502d5b5 100644 --- a/test/Makefile +++ b/test/Makefile @@ -33,7 +33,7 @@ test.selectionTotale: $(LIB) test.selectionTotale.o test_utils.o $(CC) -fPIC -o $@ -c $< $(CFLAGS) $(INCLUDES) clean: - rm -f *.o ../pkg/src/sources/*.o ../pkg/src/adapters/*.o + rm -f *.o ../pkg/src/sources/*.o cclean: clean rm -f *.so $(TESTS) diff --git a/test/README b/test/README index 287c4b5..29c4b9d 100644 --- a/test/README +++ b/test/README @@ -15,18 +15,16 @@ set -e # I'm happy with default values - feel free to give args generateRunSaveTest_EMGLLF() "\ | R --slave - cd .. + cd .. #2) Compile test C code - # Next line might be required sometimes, to destroy all .o and .so - make cclean - # Next line compile the test into an executable named "test.EMGLLF" + # Next line compile the test into an executable named "test.EMGLLF" make test.EMGLLF #3) Run it! # Fingers crossed, hoping everything is alright ./test.EMGLLF - # Ask valgrind (generally better idea ;) ) - valgrind ./test.EMGLLF + # Ask valgrind (generally better idea ;) ) + #valgrind ./test.EMGLLF #For EMGrank: same procedure, just change EMGLLF to EMGrank everwhere. diff --git a/test/clean.sh b/test/clean.sh index ad12cce..8c4f545 100755 --- a/test/clean.sh +++ b/test/clean.sh @@ -1,6 +1,11 @@ #!/bin/sh +# Erase roxygen2 generated files +find ../pkg/man/ -type f ! -name 'valse-package.Rd' -delete +rm -f ../pkg/NAMESPACE + +# Erase object and library files rm -f ../pkg/src/*.so rm -f ../pkg/src/adapters/*.o -rm -f ../pkg/src/sources/*.o + make cclean diff --git a/test/generate_test_data/EMGLLF.R b/test/generate_test_data/EMGLLF.R index fc3220f..f1eeffa 100644 --- a/test/generate_test_data/EMGLLF.R +++ b/test/generate_test_data/EMGLLF.R @@ -128,7 +128,7 @@ EMGLLF_R = function(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,lambda,X,Y,ta sumLLF1 = 0.0; for (r in 1:k) { - Gam[i,r] = pi[r] * exp(-0.5*sqNorm2[r]) #* det(rho[,,r]) #FIXME: still issues here ?!?! + Gam[i,r] = pi[r] * exp(-0.5*sqNorm2[r]) * det(rho[,,r]) #FIXME: still issues here ?!?! sumLLF1 = sumLLF1 + Gam[i,r] / (2*base::pi)^(m/2) } sumLogLLF2 = sumLogLLF2 + log(sumLLF1)