Mercurial > hg > libxtract
view swig/java/test.java @ 90:8553b27a5062
Updated README and minor buld tweaks for OS X (That will probably break the Linux build (sigh)).
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Wed, 05 Sep 2007 17:44:23 +0000 |
parents | 525bfdf936c6 |
children | 84fea00d8509 |
line wrap: on
line source
import jxtract.core.*; public class test { public static void main(String argv[]) { // System.loadLibrary("xtract"); int len = 5; int retval = 0; float result[]; floatArray a = new floatArray(len); SWIGTYPE_p_void myvoid = null; result = new float[1]; for (int i = 0; i < len; i++) a.setitem(i, i * 2); retval = xtract.xtract_mean(a.cast(), len, myvoid, result); System.out.println(result); } }