aboutsummaryrefslogtreecommitdiff
path: root/swig/java/test.java
blob: 0ab535301ef63e587707071901751d27a798f8f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
    }
}