jni_stochastic_linear_ranker.h revision 6b4eebc73439cbc3ddfb547444a341d1f9be7996
1/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef LEARNING_JNI_STOCHASTIC_LINEAR_RANKER_H
18#define LEAENING_JNI_STOCHASTIC_LINEAR_RANKER_H
19
20#include <jni.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26JNIEXPORT jint JNICALL
27Java_android_bordeaux_learning_StochasticLinearRanker_initNativeClassifier(
28    JNIEnv* env,
29    jobject thiz);
30
31
32JNIEXPORT jboolean JNICALL
33Java_android_bordeaux_learning_StochasticLinearRanker_deleteNativeClassifier(
34    JNIEnv* env,
35    jobject thiz,
36    jint paPtr);
37
38JNIEXPORT jboolean JNICALL
39Java_android_bordeaux_learning_StochasticLinearRanker_nativeUpdateClassifier(
40    JNIEnv* env,
41    jobject thiz,
42    jobjectArray key_array_positive,
43    jfloatArray value_array_positive,
44    jobjectArray key_array_negative,
45    jfloatArray value_array_negative,
46    jint paPtr);
47
48JNIEXPORT jfloat JNICALL
49Java_android_bordeaux_learning_StochasticLinearRanker_nativeScoreSample(
50    JNIEnv* env,
51    jobject thiz,
52    jobjectArray key_array,
53    jfloatArray value_array,
54    jint paPtr);
55
56JNIEXPORT void JNICALL
57Java_android_bordeaux_learning_StochasticLinearRanker_nativeGetClassifier(
58    JNIEnv* env,
59    jobject thiz,
60    jobjectArray key_array_model,
61    jfloatArray value_array_model,
62    jfloatArray value_array_param,
63    jint paPtr);
64
65JNIEXPORT jint JNICALL
66Java_android_bordeaux_learning_StochasticLinearRanker_nativeGetLengthClassifier(
67    JNIEnv* env,
68    jobject thiz,
69    jint paPtr);
70
71JNIEXPORT jboolean JNICALL
72Java_android_bordeaux_learning_StochasticLinearRanker_nativeLoadClassifier(
73    JNIEnv* env,
74    jobject thiz,
75    jobjectArray key_array_model,
76    jfloatArray value_array_model,
77    jfloatArray value_array_param,
78    jint paPtr);
79
80#ifdef __cplusplus
81}
82#endif
83
84#endif /* ANDROID_LERNING_JNI_STOCHASTIC_LINEAR_RANKER_H */
85