Skip to content

Commit

Permalink
fix ppwm example and add option to check to run just a few examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Aug 28, 2011
1 parent 0deb8ca commit a74aaf0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/undocumented/java_modular/check.sh
Expand Up @@ -13,7 +13,11 @@ export LD_LIBRARY_PATH=../../../src/shogun:../../../src/interfaces/java_modular

${JAVAC} Load.java

for e in $(ls *.java | grep -v Load.java)
FILES=$@

test -z "$FILES" && FILES=$(ls *.java | grep -v Load.cs )

for e in $FILES
do
echo -n "running $e .."
if ${JAVAC} $e >/dev/null 2>&1 && ${JAVA} ${e%.java} >/dev/null 2>&1
Expand Down
@@ -1,5 +1,6 @@
import org.shogun.*;
import org.jblas.*;
import static org.jblas.MatrixFunctions.logi;
import static org.shogun.EAlphabet.DNA;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -29,7 +30,7 @@ public static void main(String argv[]) {
{0.0, 0.5, 0.5, 0.0},
{1.0, 0.0, 0.4, 0.0},
{0.0, 0.0, 0.0, 0.0}});
//ppwm.set_pwm(DoubleMatrix.log(pwm));
ppwm.set_pwm(logi(pwm));
ppwm.compute_w(20);
DoubleMatrix w = ppwm.get_w();
modshogun.exit_shogun();
Expand Down

0 comments on commit a74aaf0

Please sign in to comment.