update test/ folder for experimentations
authorBenjamin Auder <benjamin.auder@somewhere>
Sat, 18 Mar 2017 16:07:25 +0000 (17:07 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sat, 18 Mar 2017 16:07:25 +0000 (17:07 +0100)
test/Makefile
test/README
test/clean.sh
test/generate_test_data/EMGLLF.R

index 0fa1189..502d5b5 100644 (file)
@@ -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)
index 287c4b5..29c4b9d 100644 (file)
@@ -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.
index ad12cce..8c4f545 100755 (executable)
@@ -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
index fc3220f..f1eeffa 100644 (file)
@@ -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)