From deca820f4f95a5361f4811b6a49b66e5731c7e32 Mon Sep 17 00:00:00 2001 From: Antonio Vilches Date: Thu, 7 Mar 2019 15:14:07 +0100 Subject: [PATCH] Fix/jniclustering2 (#90) * Fix style --- bindings/jni/include/khiva_jni/clustering.h | 8 ++------ bindings/jni/src/clustering.cpp | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/bindings/jni/include/khiva_jni/clustering.h b/bindings/jni/include/khiva_jni/clustering.h index 723f9ce..b533af3 100644 --- a/bindings/jni/include/khiva_jni/clustering.h +++ b/bindings/jni/include/khiva_jni/clustering.h @@ -20,13 +20,12 @@ extern "C" { * same) and dimension one indicates the number of time series. * @brief Calculates The clusterization based on SBD. * @param k The number of means to be computed. - * @param ref_centroids The resulting means or centroids. - * @param ref_labels The resulting labels of each time series which is the closest centroid. * @param tolerance The error tolerance to stop the computation of the centroids. * @param maxIterations The maximum number of iterations allowed. + * + * @return An Array of arrays with the resulting centroids and labels. */ JNIEXPORT jlongArray JNICALL Java_io_shapelets_khiva_Clustering_kMeans(JNIEnv *env, jobject, jlong ref_tss, jint k, - jlong ref_centroids, jlong ref_labels, jfloat tolerance, jint maxIterations); /** @@ -39,13 +38,10 @@ JNIEXPORT jlongArray JNICALL Java_io_shapelets_khiva_Clustering_kMeans(JNIEnv *e * same) and dimension one indicates the number of time series. * @brief Calculates The clusterization based on SBD. * @param k The number of means to be computed. - * @param ref_centroids The resulting means or centroids. - * @param ref_labels The resulting labels of each time series which is the closest centroid. * @param tolerance The error tolerance to stop the computation of the centroids. * @param maxIterations The maximum number of iterations allowed. */ JNIEXPORT jlongArray JNICALL Java_io_shapelets_khiva_Clustering_kShape(JNIEnv *env, jobject, jlong ref_tss, jint k, - jlong ref_centroids, jlong ref_labels, jfloat tolerance, jint maxIterations); #ifdef __cplusplus diff --git a/bindings/jni/src/clustering.cpp b/bindings/jni/src/clustering.cpp index 38777d7..7fecda1 100644 --- a/bindings/jni/src/clustering.cpp +++ b/bindings/jni/src/clustering.cpp @@ -9,7 +9,6 @@ #include JNIEXPORT jlongArray JNICALL Java_io_shapelets_khiva_Clustering_kMeans(JNIEnv *env, jobject, jlong ref_tss, jint k, - jlong ref_centroids, jlong ref_labels, jfloat tolerance, jint maxIterations) { const jint l = 3; jlong tmp[l]; @@ -44,7 +43,6 @@ JNIEXPORT jlongArray JNICALL Java_io_shapelets_khiva_Clustering_kMeans(JNIEnv *e } JNIEXPORT jlongArray JNICALL Java_io_shapelets_khiva_Clustering_kShape(JNIEnv *env, jobject, jlong ref_tss, jint k, - jlong ref_centroids, jlong ref_labels, jfloat tolerance, jint maxIterations) { const jint l = 3; jlong tmp[l];