-
Notifications
You must be signed in to change notification settings - Fork 1
/
CocoJNI.java
47 lines (36 loc) · 1.93 KB
/
CocoJNI.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* This class contains the declaration of all the CocoJNI functions.
*/
public class CocoJNI {
/* Load the library */
static {
System.loadLibrary("CocoJNI");
}
/* Native methods */
public static native void cocoSetLogLevel(String logLevel);
// Observer
public static native long cocoGetObserver(String observerName, String observerOptions);
public static native void cocoFinalizeObserver(long observerPointer);
public static native long cocoProblemAddObserver(long problemPointer, long observerPointer);
public static native long cocoProblemRemoveObserver(long problemPointer, long observerPointer);
// Suite
public static native long cocoGetSuite(String suiteName, String suiteInstance, String suiteOptions);
public static native void cocoFinalizeSuite(long suitePointer);
// Problem
public static native long cocoSuiteGetNextProblem(long suitePointer, long observerPointer);
public static native long cocoSuiteGetProblem(long suitePointer, long problemIndex);
// Functions
public static native double[] cocoEvaluateFunction(long problemPointer, double[] x);
public static native double[] cocoEvaluateConstraint(long problemPointer, double[] x);
// Getters
public static native int cocoProblemGetDimension(long problemPointer);
public static native int cocoProblemGetNumberOfObjectives(long problemPointer);
public static native int cocoProblemGetNumberOfConstraints(long problemPointer);
public static native double[] cocoProblemGetSmallestValuesOfInterest(long problemPointer);
public static native double[] cocoProblemGetLargestValuesOfInterest(long problemPointer);
public static native String cocoProblemGetId(long problemPointer);
public static native String cocoProblemGetName(long problemPointer);
public static native long cocoProblemGetEvaluations(long problemPointer);
public static native long cocoProblemGetIndex(long problemPointer);
public static native int cocoProblemIsFinalTargetHit(long problemPointer);
}