Home | History | Annotate | Download | only in src
      1 
      2 //
      3 // This file is auto-generated, please don't edit!
      4 //
      5 
      6 #define LOG_TAG "org.opencv.ml"
      7 
      8 #include "common.h"
      9 
     10 #include "opencv2/opencv_modules.hpp"
     11 #ifdef HAVE_OPENCV_ML
     12 
     13 #include <string>
     14 
     15 #include "opencv2/ml.hpp"
     16 
     17 #include "../../ml/include/opencv2/ml.hpp"
     18 
     19 using namespace cv;
     20 
     21 /// throw java exception
     22 static void throwJavaException(JNIEnv *env, const std::exception *e, const char *method) {
     23   std::string what = "unknown exception";
     24   jclass je = 0;
     25 
     26   if(e) {
     27     std::string exception_type = "std::exception";
     28 
     29     if(dynamic_cast<const cv::Exception*>(e)) {
     30       exception_type = "cv::Exception";
     31       je = env->FindClass("org/opencv/core/CvException");
     32     }
     33 
     34     what = exception_type + ": " + e->what();
     35   }
     36 
     37   if(!je) je = env->FindClass("java/lang/Exception");
     38   env->ThrowNew(je, what.c_str());
     39 
     40   LOGE("%s caught %s", method, what.c_str());
     41   (void)method;        // avoid "unused" warning
     42 }
     43 
     44 
     45 extern "C" {
     46 
     47 
     48 //
     49 //  int getClustersNumber()
     50 //
     51 
     52 JNIEXPORT jint JNICALL Java_org_opencv_ml_EM_getClustersNumber_10 (JNIEnv*, jclass, jlong);
     53 
     54 JNIEXPORT jint JNICALL Java_org_opencv_ml_EM_getClustersNumber_10
     55   (JNIEnv* env, jclass , jlong self)
     56 {
     57     static const char method_name[] = "ml::getClustersNumber_10()";
     58     try {
     59         LOGD("%s", method_name);
     60         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
     61         int _retval_ = (*me)->getClustersNumber(  );
     62         return _retval_;
     63     } catch(const std::exception &e) {
     64         throwJavaException(env, &e, method_name);
     65     } catch (...) {
     66         throwJavaException(env, 0, method_name);
     67     }
     68     return 0;
     69 }
     70 
     71 
     72 
     73 //
     74 //  void setClustersNumber(int val)
     75 //
     76 
     77 JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setClustersNumber_10 (JNIEnv*, jclass, jlong, jint);
     78 
     79 JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setClustersNumber_10
     80   (JNIEnv* env, jclass , jlong self, jint val)
     81 {
     82     static const char method_name[] = "ml::setClustersNumber_10()";
     83     try {
     84         LOGD("%s", method_name);
     85         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
     86         (*me)->setClustersNumber( (int)val );
     87         return;
     88     } catch(const std::exception &e) {
     89         throwJavaException(env, &e, method_name);
     90     } catch (...) {
     91         throwJavaException(env, 0, method_name);
     92     }
     93     return;
     94 }
     95 
     96 
     97 
     98 //
     99 //  int getCovarianceMatrixType()
    100 //
    101 
    102 JNIEXPORT jint JNICALL Java_org_opencv_ml_EM_getCovarianceMatrixType_10 (JNIEnv*, jclass, jlong);
    103 
    104 JNIEXPORT jint JNICALL Java_org_opencv_ml_EM_getCovarianceMatrixType_10
    105   (JNIEnv* env, jclass , jlong self)
    106 {
    107     static const char method_name[] = "ml::getCovarianceMatrixType_10()";
    108     try {
    109         LOGD("%s", method_name);
    110         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    111         int _retval_ = (*me)->getCovarianceMatrixType(  );
    112         return _retval_;
    113     } catch(const std::exception &e) {
    114         throwJavaException(env, &e, method_name);
    115     } catch (...) {
    116         throwJavaException(env, 0, method_name);
    117     }
    118     return 0;
    119 }
    120 
    121 
    122 
    123 //
    124 //  void setCovarianceMatrixType(int val)
    125 //
    126 
    127 JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setCovarianceMatrixType_10 (JNIEnv*, jclass, jlong, jint);
    128 
    129 JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setCovarianceMatrixType_10
    130   (JNIEnv* env, jclass , jlong self, jint val)
    131 {
    132     static const char method_name[] = "ml::setCovarianceMatrixType_10()";
    133     try {
    134         LOGD("%s", method_name);
    135         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    136         (*me)->setCovarianceMatrixType( (int)val );
    137         return;
    138     } catch(const std::exception &e) {
    139         throwJavaException(env, &e, method_name);
    140     } catch (...) {
    141         throwJavaException(env, 0, method_name);
    142     }
    143     return;
    144 }
    145 
    146 
    147 
    148 //
    149 //  TermCriteria getTermCriteria()
    150 //
    151 
    152 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_EM_getTermCriteria_10 (JNIEnv*, jclass, jlong);
    153 
    154 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_EM_getTermCriteria_10
    155   (JNIEnv* env, jclass , jlong self)
    156 {
    157     static const char method_name[] = "ml::getTermCriteria_10()";
    158     try {
    159         LOGD("%s", method_name);
    160         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    161         TermCriteria _retval_ = (*me)->getTermCriteria(  );
    162         jdoubleArray _da_retval_ = env->NewDoubleArray(3);  jdouble _tmp_retval_[3] = {_retval_.type, _retval_.maxCount, _retval_.epsilon}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
    163         return _da_retval_;
    164     } catch(const std::exception &e) {
    165         throwJavaException(env, &e, method_name);
    166     } catch (...) {
    167         throwJavaException(env, 0, method_name);
    168     }
    169     return 0;
    170 }
    171 
    172 
    173 
    174 //
    175 //  void setTermCriteria(TermCriteria val)
    176 //
    177 
    178 JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setTermCriteria_10 (JNIEnv*, jclass, jlong, jint, jint, jdouble);
    179 
    180 JNIEXPORT void JNICALL Java_org_opencv_ml_EM_setTermCriteria_10
    181   (JNIEnv* env, jclass , jlong self, jint val_type, jint val_maxCount, jdouble val_epsilon)
    182 {
    183     static const char method_name[] = "ml::setTermCriteria_10()";
    184     try {
    185         LOGD("%s", method_name);
    186         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    187         TermCriteria val(val_type, val_maxCount, val_epsilon);
    188         (*me)->setTermCriteria( val );
    189         return;
    190     } catch(const std::exception &e) {
    191         throwJavaException(env, &e, method_name);
    192     } catch (...) {
    193         throwJavaException(env, 0, method_name);
    194     }
    195     return;
    196 }
    197 
    198 
    199 
    200 //
    201 //  Mat getWeights()
    202 //
    203 
    204 JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_getWeights_10 (JNIEnv*, jclass, jlong);
    205 
    206 JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_getWeights_10
    207   (JNIEnv* env, jclass , jlong self)
    208 {
    209     static const char method_name[] = "ml::getWeights_10()";
    210     try {
    211         LOGD("%s", method_name);
    212         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    213         ::Mat _retval_ = (*me)->getWeights(  );
    214         return (jlong) new ::Mat(_retval_);
    215     } catch(const std::exception &e) {
    216         throwJavaException(env, &e, method_name);
    217     } catch (...) {
    218         throwJavaException(env, 0, method_name);
    219     }
    220     return 0;
    221 }
    222 
    223 
    224 
    225 //
    226 //  Mat getMeans()
    227 //
    228 
    229 JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_getMeans_10 (JNIEnv*, jclass, jlong);
    230 
    231 JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_getMeans_10
    232   (JNIEnv* env, jclass , jlong self)
    233 {
    234     static const char method_name[] = "ml::getMeans_10()";
    235     try {
    236         LOGD("%s", method_name);
    237         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    238         ::Mat _retval_ = (*me)->getMeans(  );
    239         return (jlong) new ::Mat(_retval_);
    240     } catch(const std::exception &e) {
    241         throwJavaException(env, &e, method_name);
    242     } catch (...) {
    243         throwJavaException(env, 0, method_name);
    244     }
    245     return 0;
    246 }
    247 
    248 
    249 
    250 //
    251 //  Vec2d predict2(Mat sample, Mat& probs)
    252 //
    253 
    254 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_EM_predict2_10 (JNIEnv*, jclass, jlong, jlong, jlong);
    255 
    256 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_EM_predict2_10
    257   (JNIEnv* env, jclass , jlong self, jlong sample_nativeObj, jlong probs_nativeObj)
    258 {
    259     static const char method_name[] = "ml::predict2_10()";
    260     try {
    261         LOGD("%s", method_name);
    262         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    263         Mat& sample = *((Mat*)sample_nativeObj);
    264         Mat& probs = *((Mat*)probs_nativeObj);
    265         Vec2d _retval_ = (*me)->predict2( sample, probs );
    266         jdoubleArray _da_retval_ = env->NewDoubleArray(2);  jdouble _tmp_retval_[2] = {_retval_.val[0], _retval_.val[1]}; env->SetDoubleArrayRegion(_da_retval_, 0, 2, _tmp_retval_);
    267         return _da_retval_;
    268     } catch(const std::exception &e) {
    269         throwJavaException(env, &e, method_name);
    270     } catch (...) {
    271         throwJavaException(env, 0, method_name);
    272     }
    273     return 0;
    274 }
    275 
    276 
    277 
    278 //
    279 //  bool trainEM(Mat samples, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
    280 //
    281 
    282 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainEM_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong);
    283 
    284 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainEM_10
    285   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong logLikelihoods_nativeObj, jlong labels_nativeObj, jlong probs_nativeObj)
    286 {
    287     static const char method_name[] = "ml::trainEM_10()";
    288     try {
    289         LOGD("%s", method_name);
    290         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    291         Mat& samples = *((Mat*)samples_nativeObj);
    292         Mat& logLikelihoods = *((Mat*)logLikelihoods_nativeObj);
    293         Mat& labels = *((Mat*)labels_nativeObj);
    294         Mat& probs = *((Mat*)probs_nativeObj);
    295         bool _retval_ = (*me)->trainEM( samples, logLikelihoods, labels, probs );
    296         return _retval_;
    297     } catch(const std::exception &e) {
    298         throwJavaException(env, &e, method_name);
    299     } catch (...) {
    300         throwJavaException(env, 0, method_name);
    301     }
    302     return 0;
    303 }
    304 
    305 
    306 
    307 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainEM_11 (JNIEnv*, jclass, jlong, jlong);
    308 
    309 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainEM_11
    310   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj)
    311 {
    312     static const char method_name[] = "ml::trainEM_11()";
    313     try {
    314         LOGD("%s", method_name);
    315         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    316         Mat& samples = *((Mat*)samples_nativeObj);
    317         bool _retval_ = (*me)->trainEM( samples );
    318         return _retval_;
    319     } catch(const std::exception &e) {
    320         throwJavaException(env, &e, method_name);
    321     } catch (...) {
    322         throwJavaException(env, 0, method_name);
    323     }
    324     return 0;
    325 }
    326 
    327 
    328 
    329 //
    330 //  bool trainE(Mat samples, Mat means0, Mat covs0 = Mat(), Mat weights0 = Mat(), Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
    331 //
    332 
    333 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainE_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
    334 
    335 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainE_10
    336   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong means0_nativeObj, jlong covs0_nativeObj, jlong weights0_nativeObj, jlong logLikelihoods_nativeObj, jlong labels_nativeObj, jlong probs_nativeObj)
    337 {
    338     static const char method_name[] = "ml::trainE_10()";
    339     try {
    340         LOGD("%s", method_name);
    341         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    342         Mat& samples = *((Mat*)samples_nativeObj);
    343         Mat& means0 = *((Mat*)means0_nativeObj);
    344         Mat& covs0 = *((Mat*)covs0_nativeObj);
    345         Mat& weights0 = *((Mat*)weights0_nativeObj);
    346         Mat& logLikelihoods = *((Mat*)logLikelihoods_nativeObj);
    347         Mat& labels = *((Mat*)labels_nativeObj);
    348         Mat& probs = *((Mat*)probs_nativeObj);
    349         bool _retval_ = (*me)->trainE( samples, means0, covs0, weights0, logLikelihoods, labels, probs );
    350         return _retval_;
    351     } catch(const std::exception &e) {
    352         throwJavaException(env, &e, method_name);
    353     } catch (...) {
    354         throwJavaException(env, 0, method_name);
    355     }
    356     return 0;
    357 }
    358 
    359 
    360 
    361 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainE_11 (JNIEnv*, jclass, jlong, jlong, jlong);
    362 
    363 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainE_11
    364   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong means0_nativeObj)
    365 {
    366     static const char method_name[] = "ml::trainE_11()";
    367     try {
    368         LOGD("%s", method_name);
    369         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    370         Mat& samples = *((Mat*)samples_nativeObj);
    371         Mat& means0 = *((Mat*)means0_nativeObj);
    372         bool _retval_ = (*me)->trainE( samples, means0 );
    373         return _retval_;
    374     } catch(const std::exception &e) {
    375         throwJavaException(env, &e, method_name);
    376     } catch (...) {
    377         throwJavaException(env, 0, method_name);
    378     }
    379     return 0;
    380 }
    381 
    382 
    383 
    384 //
    385 //  bool trainM(Mat samples, Mat probs0, Mat& logLikelihoods = Mat(), Mat& labels = Mat(), Mat& probs = Mat())
    386 //
    387 
    388 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainM_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jlong, jlong);
    389 
    390 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainM_10
    391   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong probs0_nativeObj, jlong logLikelihoods_nativeObj, jlong labels_nativeObj, jlong probs_nativeObj)
    392 {
    393     static const char method_name[] = "ml::trainM_10()";
    394     try {
    395         LOGD("%s", method_name);
    396         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    397         Mat& samples = *((Mat*)samples_nativeObj);
    398         Mat& probs0 = *((Mat*)probs0_nativeObj);
    399         Mat& logLikelihoods = *((Mat*)logLikelihoods_nativeObj);
    400         Mat& labels = *((Mat*)labels_nativeObj);
    401         Mat& probs = *((Mat*)probs_nativeObj);
    402         bool _retval_ = (*me)->trainM( samples, probs0, logLikelihoods, labels, probs );
    403         return _retval_;
    404     } catch(const std::exception &e) {
    405         throwJavaException(env, &e, method_name);
    406     } catch (...) {
    407         throwJavaException(env, 0, method_name);
    408     }
    409     return 0;
    410 }
    411 
    412 
    413 
    414 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainM_11 (JNIEnv*, jclass, jlong, jlong, jlong);
    415 
    416 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_EM_trainM_11
    417   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong probs0_nativeObj)
    418 {
    419     static const char method_name[] = "ml::trainM_11()";
    420     try {
    421         LOGD("%s", method_name);
    422         Ptr<cv::ml::EM>* me = (Ptr<cv::ml::EM>*) self; //TODO: check for NULL
    423         Mat& samples = *((Mat*)samples_nativeObj);
    424         Mat& probs0 = *((Mat*)probs0_nativeObj);
    425         bool _retval_ = (*me)->trainM( samples, probs0 );
    426         return _retval_;
    427     } catch(const std::exception &e) {
    428         throwJavaException(env, &e, method_name);
    429     } catch (...) {
    430         throwJavaException(env, 0, method_name);
    431     }
    432     return 0;
    433 }
    434 
    435 
    436 
    437 //
    438 // static Ptr_EM create()
    439 //
    440 
    441 JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_create_10 (JNIEnv*, jclass);
    442 
    443 JNIEXPORT jlong JNICALL Java_org_opencv_ml_EM_create_10
    444   (JNIEnv* env, jclass )
    445 {
    446     static const char method_name[] = "ml::create_10()";
    447     try {
    448         LOGD("%s", method_name);
    449         typedef Ptr<cv::ml::EM> Ptr_EM;
    450         Ptr_EM _retval_ = cv::ml::EM::create(  );
    451         return (jlong)(new Ptr_EM(_retval_));
    452     } catch(const std::exception &e) {
    453         throwJavaException(env, &e, method_name);
    454     } catch (...) {
    455         throwJavaException(env, 0, method_name);
    456     }
    457     return 0;
    458 }
    459 
    460 
    461 
    462 //
    463 //  native support for java finalize()
    464 //  static void Ptr<cv::ml::EM>::delete( __int64 self )
    465 //
    466 JNIEXPORT void JNICALL Java_org_opencv_ml_EM_delete(JNIEnv*, jclass, jlong);
    467 
    468 JNIEXPORT void JNICALL Java_org_opencv_ml_EM_delete
    469   (JNIEnv*, jclass, jlong self)
    470 {
    471     delete (Ptr<cv::ml::EM>*) self;
    472 }
    473 
    474 
    475 //
    476 //  int getType()
    477 //
    478 
    479 JNIEXPORT jint JNICALL Java_org_opencv_ml_SVM_getType_10 (JNIEnv*, jclass, jlong);
    480 
    481 JNIEXPORT jint JNICALL Java_org_opencv_ml_SVM_getType_10
    482   (JNIEnv* env, jclass , jlong self)
    483 {
    484     static const char method_name[] = "ml::getType_10()";
    485     try {
    486         LOGD("%s", method_name);
    487         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    488         int _retval_ = (*me)->getType(  );
    489         return _retval_;
    490     } catch(const std::exception &e) {
    491         throwJavaException(env, &e, method_name);
    492     } catch (...) {
    493         throwJavaException(env, 0, method_name);
    494     }
    495     return 0;
    496 }
    497 
    498 
    499 
    500 //
    501 //  void setType(int val)
    502 //
    503 
    504 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setType_10 (JNIEnv*, jclass, jlong, jint);
    505 
    506 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setType_10
    507   (JNIEnv* env, jclass , jlong self, jint val)
    508 {
    509     static const char method_name[] = "ml::setType_10()";
    510     try {
    511         LOGD("%s", method_name);
    512         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    513         (*me)->setType( (int)val );
    514         return;
    515     } catch(const std::exception &e) {
    516         throwJavaException(env, &e, method_name);
    517     } catch (...) {
    518         throwJavaException(env, 0, method_name);
    519     }
    520     return;
    521 }
    522 
    523 
    524 
    525 //
    526 //  double getGamma()
    527 //
    528 
    529 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getGamma_10 (JNIEnv*, jclass, jlong);
    530 
    531 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getGamma_10
    532   (JNIEnv* env, jclass , jlong self)
    533 {
    534     static const char method_name[] = "ml::getGamma_10()";
    535     try {
    536         LOGD("%s", method_name);
    537         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    538         double _retval_ = (*me)->getGamma(  );
    539         return _retval_;
    540     } catch(const std::exception &e) {
    541         throwJavaException(env, &e, method_name);
    542     } catch (...) {
    543         throwJavaException(env, 0, method_name);
    544     }
    545     return 0;
    546 }
    547 
    548 
    549 
    550 //
    551 //  void setGamma(double val)
    552 //
    553 
    554 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setGamma_10 (JNIEnv*, jclass, jlong, jdouble);
    555 
    556 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setGamma_10
    557   (JNIEnv* env, jclass , jlong self, jdouble val)
    558 {
    559     static const char method_name[] = "ml::setGamma_10()";
    560     try {
    561         LOGD("%s", method_name);
    562         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    563         (*me)->setGamma( (double)val );
    564         return;
    565     } catch(const std::exception &e) {
    566         throwJavaException(env, &e, method_name);
    567     } catch (...) {
    568         throwJavaException(env, 0, method_name);
    569     }
    570     return;
    571 }
    572 
    573 
    574 
    575 //
    576 //  double getCoef0()
    577 //
    578 
    579 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getCoef0_10 (JNIEnv*, jclass, jlong);
    580 
    581 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getCoef0_10
    582   (JNIEnv* env, jclass , jlong self)
    583 {
    584     static const char method_name[] = "ml::getCoef0_10()";
    585     try {
    586         LOGD("%s", method_name);
    587         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    588         double _retval_ = (*me)->getCoef0(  );
    589         return _retval_;
    590     } catch(const std::exception &e) {
    591         throwJavaException(env, &e, method_name);
    592     } catch (...) {
    593         throwJavaException(env, 0, method_name);
    594     }
    595     return 0;
    596 }
    597 
    598 
    599 
    600 //
    601 //  void setCoef0(double val)
    602 //
    603 
    604 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setCoef0_10 (JNIEnv*, jclass, jlong, jdouble);
    605 
    606 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setCoef0_10
    607   (JNIEnv* env, jclass , jlong self, jdouble val)
    608 {
    609     static const char method_name[] = "ml::setCoef0_10()";
    610     try {
    611         LOGD("%s", method_name);
    612         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    613         (*me)->setCoef0( (double)val );
    614         return;
    615     } catch(const std::exception &e) {
    616         throwJavaException(env, &e, method_name);
    617     } catch (...) {
    618         throwJavaException(env, 0, method_name);
    619     }
    620     return;
    621 }
    622 
    623 
    624 
    625 //
    626 //  double getDegree()
    627 //
    628 
    629 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getDegree_10 (JNIEnv*, jclass, jlong);
    630 
    631 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getDegree_10
    632   (JNIEnv* env, jclass , jlong self)
    633 {
    634     static const char method_name[] = "ml::getDegree_10()";
    635     try {
    636         LOGD("%s", method_name);
    637         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    638         double _retval_ = (*me)->getDegree(  );
    639         return _retval_;
    640     } catch(const std::exception &e) {
    641         throwJavaException(env, &e, method_name);
    642     } catch (...) {
    643         throwJavaException(env, 0, method_name);
    644     }
    645     return 0;
    646 }
    647 
    648 
    649 
    650 //
    651 //  void setDegree(double val)
    652 //
    653 
    654 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setDegree_10 (JNIEnv*, jclass, jlong, jdouble);
    655 
    656 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setDegree_10
    657   (JNIEnv* env, jclass , jlong self, jdouble val)
    658 {
    659     static const char method_name[] = "ml::setDegree_10()";
    660     try {
    661         LOGD("%s", method_name);
    662         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    663         (*me)->setDegree( (double)val );
    664         return;
    665     } catch(const std::exception &e) {
    666         throwJavaException(env, &e, method_name);
    667     } catch (...) {
    668         throwJavaException(env, 0, method_name);
    669     }
    670     return;
    671 }
    672 
    673 
    674 
    675 //
    676 //  double getC()
    677 //
    678 
    679 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getC_10 (JNIEnv*, jclass, jlong);
    680 
    681 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getC_10
    682   (JNIEnv* env, jclass , jlong self)
    683 {
    684     static const char method_name[] = "ml::getC_10()";
    685     try {
    686         LOGD("%s", method_name);
    687         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    688         double _retval_ = (*me)->getC(  );
    689         return _retval_;
    690     } catch(const std::exception &e) {
    691         throwJavaException(env, &e, method_name);
    692     } catch (...) {
    693         throwJavaException(env, 0, method_name);
    694     }
    695     return 0;
    696 }
    697 
    698 
    699 
    700 //
    701 //  void setC(double val)
    702 //
    703 
    704 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setC_10 (JNIEnv*, jclass, jlong, jdouble);
    705 
    706 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setC_10
    707   (JNIEnv* env, jclass , jlong self, jdouble val)
    708 {
    709     static const char method_name[] = "ml::setC_10()";
    710     try {
    711         LOGD("%s", method_name);
    712         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    713         (*me)->setC( (double)val );
    714         return;
    715     } catch(const std::exception &e) {
    716         throwJavaException(env, &e, method_name);
    717     } catch (...) {
    718         throwJavaException(env, 0, method_name);
    719     }
    720     return;
    721 }
    722 
    723 
    724 
    725 //
    726 //  double getNu()
    727 //
    728 
    729 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getNu_10 (JNIEnv*, jclass, jlong);
    730 
    731 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getNu_10
    732   (JNIEnv* env, jclass , jlong self)
    733 {
    734     static const char method_name[] = "ml::getNu_10()";
    735     try {
    736         LOGD("%s", method_name);
    737         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    738         double _retval_ = (*me)->getNu(  );
    739         return _retval_;
    740     } catch(const std::exception &e) {
    741         throwJavaException(env, &e, method_name);
    742     } catch (...) {
    743         throwJavaException(env, 0, method_name);
    744     }
    745     return 0;
    746 }
    747 
    748 
    749 
    750 //
    751 //  void setNu(double val)
    752 //
    753 
    754 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setNu_10 (JNIEnv*, jclass, jlong, jdouble);
    755 
    756 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setNu_10
    757   (JNIEnv* env, jclass , jlong self, jdouble val)
    758 {
    759     static const char method_name[] = "ml::setNu_10()";
    760     try {
    761         LOGD("%s", method_name);
    762         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    763         (*me)->setNu( (double)val );
    764         return;
    765     } catch(const std::exception &e) {
    766         throwJavaException(env, &e, method_name);
    767     } catch (...) {
    768         throwJavaException(env, 0, method_name);
    769     }
    770     return;
    771 }
    772 
    773 
    774 
    775 //
    776 //  double getP()
    777 //
    778 
    779 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getP_10 (JNIEnv*, jclass, jlong);
    780 
    781 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getP_10
    782   (JNIEnv* env, jclass , jlong self)
    783 {
    784     static const char method_name[] = "ml::getP_10()";
    785     try {
    786         LOGD("%s", method_name);
    787         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    788         double _retval_ = (*me)->getP(  );
    789         return _retval_;
    790     } catch(const std::exception &e) {
    791         throwJavaException(env, &e, method_name);
    792     } catch (...) {
    793         throwJavaException(env, 0, method_name);
    794     }
    795     return 0;
    796 }
    797 
    798 
    799 
    800 //
    801 //  void setP(double val)
    802 //
    803 
    804 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setP_10 (JNIEnv*, jclass, jlong, jdouble);
    805 
    806 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setP_10
    807   (JNIEnv* env, jclass , jlong self, jdouble val)
    808 {
    809     static const char method_name[] = "ml::setP_10()";
    810     try {
    811         LOGD("%s", method_name);
    812         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    813         (*me)->setP( (double)val );
    814         return;
    815     } catch(const std::exception &e) {
    816         throwJavaException(env, &e, method_name);
    817     } catch (...) {
    818         throwJavaException(env, 0, method_name);
    819     }
    820     return;
    821 }
    822 
    823 
    824 
    825 //
    826 //  Mat getClassWeights()
    827 //
    828 
    829 JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_getClassWeights_10 (JNIEnv*, jclass, jlong);
    830 
    831 JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_getClassWeights_10
    832   (JNIEnv* env, jclass , jlong self)
    833 {
    834     static const char method_name[] = "ml::getClassWeights_10()";
    835     try {
    836         LOGD("%s", method_name);
    837         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    838         ::Mat _retval_ = (*me)->getClassWeights(  );
    839         return (jlong) new ::Mat(_retval_);
    840     } catch(const std::exception &e) {
    841         throwJavaException(env, &e, method_name);
    842     } catch (...) {
    843         throwJavaException(env, 0, method_name);
    844     }
    845     return 0;
    846 }
    847 
    848 
    849 
    850 //
    851 //  void setClassWeights(Mat val)
    852 //
    853 
    854 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setClassWeights_10 (JNIEnv*, jclass, jlong, jlong);
    855 
    856 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setClassWeights_10
    857   (JNIEnv* env, jclass , jlong self, jlong val_nativeObj)
    858 {
    859     static const char method_name[] = "ml::setClassWeights_10()";
    860     try {
    861         LOGD("%s", method_name);
    862         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    863         Mat& val = *((Mat*)val_nativeObj);
    864         (*me)->setClassWeights( val );
    865         return;
    866     } catch(const std::exception &e) {
    867         throwJavaException(env, &e, method_name);
    868     } catch (...) {
    869         throwJavaException(env, 0, method_name);
    870     }
    871     return;
    872 }
    873 
    874 
    875 
    876 //
    877 //  TermCriteria getTermCriteria()
    878 //
    879 
    880 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_SVM_getTermCriteria_10 (JNIEnv*, jclass, jlong);
    881 
    882 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_SVM_getTermCriteria_10
    883   (JNIEnv* env, jclass , jlong self)
    884 {
    885     static const char method_name[] = "ml::getTermCriteria_10()";
    886     try {
    887         LOGD("%s", method_name);
    888         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    889         TermCriteria _retval_ = (*me)->getTermCriteria(  );
    890         jdoubleArray _da_retval_ = env->NewDoubleArray(3);  jdouble _tmp_retval_[3] = {_retval_.type, _retval_.maxCount, _retval_.epsilon}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
    891         return _da_retval_;
    892     } catch(const std::exception &e) {
    893         throwJavaException(env, &e, method_name);
    894     } catch (...) {
    895         throwJavaException(env, 0, method_name);
    896     }
    897     return 0;
    898 }
    899 
    900 
    901 
    902 //
    903 //  void setTermCriteria(TermCriteria val)
    904 //
    905 
    906 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setTermCriteria_10 (JNIEnv*, jclass, jlong, jint, jint, jdouble);
    907 
    908 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setTermCriteria_10
    909   (JNIEnv* env, jclass , jlong self, jint val_type, jint val_maxCount, jdouble val_epsilon)
    910 {
    911     static const char method_name[] = "ml::setTermCriteria_10()";
    912     try {
    913         LOGD("%s", method_name);
    914         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    915         TermCriteria val(val_type, val_maxCount, val_epsilon);
    916         (*me)->setTermCriteria( val );
    917         return;
    918     } catch(const std::exception &e) {
    919         throwJavaException(env, &e, method_name);
    920     } catch (...) {
    921         throwJavaException(env, 0, method_name);
    922     }
    923     return;
    924 }
    925 
    926 
    927 
    928 //
    929 //  int getKernelType()
    930 //
    931 
    932 JNIEXPORT jint JNICALL Java_org_opencv_ml_SVM_getKernelType_10 (JNIEnv*, jclass, jlong);
    933 
    934 JNIEXPORT jint JNICALL Java_org_opencv_ml_SVM_getKernelType_10
    935   (JNIEnv* env, jclass , jlong self)
    936 {
    937     static const char method_name[] = "ml::getKernelType_10()";
    938     try {
    939         LOGD("%s", method_name);
    940         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    941         int _retval_ = (*me)->getKernelType(  );
    942         return _retval_;
    943     } catch(const std::exception &e) {
    944         throwJavaException(env, &e, method_name);
    945     } catch (...) {
    946         throwJavaException(env, 0, method_name);
    947     }
    948     return 0;
    949 }
    950 
    951 
    952 
    953 //
    954 //  void setKernel(int kernelType)
    955 //
    956 
    957 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setKernel_10 (JNIEnv*, jclass, jlong, jint);
    958 
    959 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_setKernel_10
    960   (JNIEnv* env, jclass , jlong self, jint kernelType)
    961 {
    962     static const char method_name[] = "ml::setKernel_10()";
    963     try {
    964         LOGD("%s", method_name);
    965         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    966         (*me)->setKernel( (int)kernelType );
    967         return;
    968     } catch(const std::exception &e) {
    969         throwJavaException(env, &e, method_name);
    970     } catch (...) {
    971         throwJavaException(env, 0, method_name);
    972     }
    973     return;
    974 }
    975 
    976 
    977 
    978 //
    979 //  Mat getSupportVectors()
    980 //
    981 
    982 JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_getSupportVectors_10 (JNIEnv*, jclass, jlong);
    983 
    984 JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_getSupportVectors_10
    985   (JNIEnv* env, jclass , jlong self)
    986 {
    987     static const char method_name[] = "ml::getSupportVectors_10()";
    988     try {
    989         LOGD("%s", method_name);
    990         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
    991         ::Mat _retval_ = (*me)->getSupportVectors(  );
    992         return (jlong) new ::Mat(_retval_);
    993     } catch(const std::exception &e) {
    994         throwJavaException(env, &e, method_name);
    995     } catch (...) {
    996         throwJavaException(env, 0, method_name);
    997     }
    998     return 0;
    999 }
   1000 
   1001 
   1002 
   1003 //
   1004 //  double getDecisionFunction(int i, Mat& alpha, Mat& svidx)
   1005 //
   1006 
   1007 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getDecisionFunction_10 (JNIEnv*, jclass, jlong, jint, jlong, jlong);
   1008 
   1009 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_SVM_getDecisionFunction_10
   1010   (JNIEnv* env, jclass , jlong self, jint i, jlong alpha_nativeObj, jlong svidx_nativeObj)
   1011 {
   1012     static const char method_name[] = "ml::getDecisionFunction_10()";
   1013     try {
   1014         LOGD("%s", method_name);
   1015         Ptr<cv::ml::SVM>* me = (Ptr<cv::ml::SVM>*) self; //TODO: check for NULL
   1016         Mat& alpha = *((Mat*)alpha_nativeObj);
   1017         Mat& svidx = *((Mat*)svidx_nativeObj);
   1018         double _retval_ = (*me)->getDecisionFunction( (int)i, alpha, svidx );
   1019         return _retval_;
   1020     } catch(const std::exception &e) {
   1021         throwJavaException(env, &e, method_name);
   1022     } catch (...) {
   1023         throwJavaException(env, 0, method_name);
   1024     }
   1025     return 0;
   1026 }
   1027 
   1028 
   1029 
   1030 //
   1031 // static Ptr_SVM create()
   1032 //
   1033 
   1034 JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_create_10 (JNIEnv*, jclass);
   1035 
   1036 JNIEXPORT jlong JNICALL Java_org_opencv_ml_SVM_create_10
   1037   (JNIEnv* env, jclass )
   1038 {
   1039     static const char method_name[] = "ml::create_10()";
   1040     try {
   1041         LOGD("%s", method_name);
   1042         typedef Ptr<cv::ml::SVM> Ptr_SVM;
   1043         Ptr_SVM _retval_ = cv::ml::SVM::create(  );
   1044         return (jlong)(new Ptr_SVM(_retval_));
   1045     } catch(const std::exception &e) {
   1046         throwJavaException(env, &e, method_name);
   1047     } catch (...) {
   1048         throwJavaException(env, 0, method_name);
   1049     }
   1050     return 0;
   1051 }
   1052 
   1053 
   1054 
   1055 //
   1056 //  native support for java finalize()
   1057 //  static void Ptr<cv::ml::SVM>::delete( __int64 self )
   1058 //
   1059 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_delete(JNIEnv*, jclass, jlong);
   1060 
   1061 JNIEXPORT void JNICALL Java_org_opencv_ml_SVM_delete
   1062   (JNIEnv*, jclass, jlong self)
   1063 {
   1064     delete (Ptr<cv::ml::SVM>*) self;
   1065 }
   1066 
   1067 
   1068 //
   1069 //  float predictProb(Mat inputs, Mat& outputs, Mat& outputProbs, int flags = 0)
   1070 //
   1071 
   1072 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_NormalBayesClassifier_predictProb_10 (JNIEnv*, jclass, jlong, jlong, jlong, jlong, jint);
   1073 
   1074 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_NormalBayesClassifier_predictProb_10
   1075   (JNIEnv* env, jclass , jlong self, jlong inputs_nativeObj, jlong outputs_nativeObj, jlong outputProbs_nativeObj, jint flags)
   1076 {
   1077     static const char method_name[] = "ml::predictProb_10()";
   1078     try {
   1079         LOGD("%s", method_name);
   1080         Ptr<cv::ml::NormalBayesClassifier>* me = (Ptr<cv::ml::NormalBayesClassifier>*) self; //TODO: check for NULL
   1081         Mat& inputs = *((Mat*)inputs_nativeObj);
   1082         Mat& outputs = *((Mat*)outputs_nativeObj);
   1083         Mat& outputProbs = *((Mat*)outputProbs_nativeObj);
   1084         float _retval_ = (*me)->predictProb( inputs, outputs, outputProbs, (int)flags );
   1085         return _retval_;
   1086     } catch(const std::exception &e) {
   1087         throwJavaException(env, &e, method_name);
   1088     } catch (...) {
   1089         throwJavaException(env, 0, method_name);
   1090     }
   1091     return 0;
   1092 }
   1093 
   1094 
   1095 
   1096 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_NormalBayesClassifier_predictProb_11 (JNIEnv*, jclass, jlong, jlong, jlong, jlong);
   1097 
   1098 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_NormalBayesClassifier_predictProb_11
   1099   (JNIEnv* env, jclass , jlong self, jlong inputs_nativeObj, jlong outputs_nativeObj, jlong outputProbs_nativeObj)
   1100 {
   1101     static const char method_name[] = "ml::predictProb_11()";
   1102     try {
   1103         LOGD("%s", method_name);
   1104         Ptr<cv::ml::NormalBayesClassifier>* me = (Ptr<cv::ml::NormalBayesClassifier>*) self; //TODO: check for NULL
   1105         Mat& inputs = *((Mat*)inputs_nativeObj);
   1106         Mat& outputs = *((Mat*)outputs_nativeObj);
   1107         Mat& outputProbs = *((Mat*)outputProbs_nativeObj);
   1108         float _retval_ = (*me)->predictProb( inputs, outputs, outputProbs );
   1109         return _retval_;
   1110     } catch(const std::exception &e) {
   1111         throwJavaException(env, &e, method_name);
   1112     } catch (...) {
   1113         throwJavaException(env, 0, method_name);
   1114     }
   1115     return 0;
   1116 }
   1117 
   1118 
   1119 
   1120 //
   1121 // static Ptr_NormalBayesClassifier create()
   1122 //
   1123 
   1124 JNIEXPORT jlong JNICALL Java_org_opencv_ml_NormalBayesClassifier_create_10 (JNIEnv*, jclass);
   1125 
   1126 JNIEXPORT jlong JNICALL Java_org_opencv_ml_NormalBayesClassifier_create_10
   1127   (JNIEnv* env, jclass )
   1128 {
   1129     static const char method_name[] = "ml::create_10()";
   1130     try {
   1131         LOGD("%s", method_name);
   1132         typedef Ptr<cv::ml::NormalBayesClassifier> Ptr_NormalBayesClassifier;
   1133         Ptr_NormalBayesClassifier _retval_ = cv::ml::NormalBayesClassifier::create(  );
   1134         return (jlong)(new Ptr_NormalBayesClassifier(_retval_));
   1135     } catch(const std::exception &e) {
   1136         throwJavaException(env, &e, method_name);
   1137     } catch (...) {
   1138         throwJavaException(env, 0, method_name);
   1139     }
   1140     return 0;
   1141 }
   1142 
   1143 
   1144 
   1145 //
   1146 //  native support for java finalize()
   1147 //  static void Ptr<cv::ml::NormalBayesClassifier>::delete( __int64 self )
   1148 //
   1149 JNIEXPORT void JNICALL Java_org_opencv_ml_NormalBayesClassifier_delete(JNIEnv*, jclass, jlong);
   1150 
   1151 JNIEXPORT void JNICALL Java_org_opencv_ml_NormalBayesClassifier_delete
   1152   (JNIEnv*, jclass, jlong self)
   1153 {
   1154     delete (Ptr<cv::ml::NormalBayesClassifier>*) self;
   1155 }
   1156 
   1157 
   1158 //
   1159 //  int getLayout()
   1160 //
   1161 
   1162 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getLayout_10 (JNIEnv*, jclass, jlong);
   1163 
   1164 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getLayout_10
   1165   (JNIEnv* env, jclass , jlong self)
   1166 {
   1167     static const char method_name[] = "ml::getLayout_10()";
   1168     try {
   1169         LOGD("%s", method_name);
   1170         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1171         int _retval_ = me->getLayout(  );
   1172         return _retval_;
   1173     } catch(const std::exception &e) {
   1174         throwJavaException(env, &e, method_name);
   1175     } catch (...) {
   1176         throwJavaException(env, 0, method_name);
   1177     }
   1178     return 0;
   1179 }
   1180 
   1181 
   1182 
   1183 //
   1184 //  int getNTestSamples()
   1185 //
   1186 
   1187 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNTestSamples_10 (JNIEnv*, jclass, jlong);
   1188 
   1189 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNTestSamples_10
   1190   (JNIEnv* env, jclass , jlong self)
   1191 {
   1192     static const char method_name[] = "ml::getNTestSamples_10()";
   1193     try {
   1194         LOGD("%s", method_name);
   1195         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1196         int _retval_ = me->getNTestSamples(  );
   1197         return _retval_;
   1198     } catch(const std::exception &e) {
   1199         throwJavaException(env, &e, method_name);
   1200     } catch (...) {
   1201         throwJavaException(env, 0, method_name);
   1202     }
   1203     return 0;
   1204 }
   1205 
   1206 
   1207 
   1208 //
   1209 //  int getNTrainSamples()
   1210 //
   1211 
   1212 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNTrainSamples_10 (JNIEnv*, jclass, jlong);
   1213 
   1214 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNTrainSamples_10
   1215   (JNIEnv* env, jclass , jlong self)
   1216 {
   1217     static const char method_name[] = "ml::getNTrainSamples_10()";
   1218     try {
   1219         LOGD("%s", method_name);
   1220         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1221         int _retval_ = me->getNTrainSamples(  );
   1222         return _retval_;
   1223     } catch(const std::exception &e) {
   1224         throwJavaException(env, &e, method_name);
   1225     } catch (...) {
   1226         throwJavaException(env, 0, method_name);
   1227     }
   1228     return 0;
   1229 }
   1230 
   1231 
   1232 
   1233 //
   1234 //  int getNSamples()
   1235 //
   1236 
   1237 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNSamples_10 (JNIEnv*, jclass, jlong);
   1238 
   1239 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNSamples_10
   1240   (JNIEnv* env, jclass , jlong self)
   1241 {
   1242     static const char method_name[] = "ml::getNSamples_10()";
   1243     try {
   1244         LOGD("%s", method_name);
   1245         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1246         int _retval_ = me->getNSamples(  );
   1247         return _retval_;
   1248     } catch(const std::exception &e) {
   1249         throwJavaException(env, &e, method_name);
   1250     } catch (...) {
   1251         throwJavaException(env, 0, method_name);
   1252     }
   1253     return 0;
   1254 }
   1255 
   1256 
   1257 
   1258 //
   1259 //  int getNVars()
   1260 //
   1261 
   1262 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNVars_10 (JNIEnv*, jclass, jlong);
   1263 
   1264 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNVars_10
   1265   (JNIEnv* env, jclass , jlong self)
   1266 {
   1267     static const char method_name[] = "ml::getNVars_10()";
   1268     try {
   1269         LOGD("%s", method_name);
   1270         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1271         int _retval_ = me->getNVars(  );
   1272         return _retval_;
   1273     } catch(const std::exception &e) {
   1274         throwJavaException(env, &e, method_name);
   1275     } catch (...) {
   1276         throwJavaException(env, 0, method_name);
   1277     }
   1278     return 0;
   1279 }
   1280 
   1281 
   1282 
   1283 //
   1284 //  void getSample(Mat varIdx, int sidx, float* buf)
   1285 //
   1286 
   1287 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_getSample_10 (JNIEnv*, jclass, jlong, jlong, jint, jfloat);
   1288 
   1289 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_getSample_10
   1290   (JNIEnv* env, jclass , jlong self, jlong varIdx_nativeObj, jint sidx, jfloat buf)
   1291 {
   1292     static const char method_name[] = "ml::getSample_10()";
   1293     try {
   1294         LOGD("%s", method_name);
   1295         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1296         Mat& varIdx = *((Mat*)varIdx_nativeObj);
   1297         me->getSample( varIdx, (int)sidx, &buf );
   1298         return;
   1299     } catch(const std::exception &e) {
   1300         throwJavaException(env, &e, method_name);
   1301     } catch (...) {
   1302         throwJavaException(env, 0, method_name);
   1303     }
   1304     return;
   1305 }
   1306 
   1307 
   1308 
   1309 //
   1310 //  int getNAllVars()
   1311 //
   1312 
   1313 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNAllVars_10 (JNIEnv*, jclass, jlong);
   1314 
   1315 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getNAllVars_10
   1316   (JNIEnv* env, jclass , jlong self)
   1317 {
   1318     static const char method_name[] = "ml::getNAllVars_10()";
   1319     try {
   1320         LOGD("%s", method_name);
   1321         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1322         int _retval_ = me->getNAllVars(  );
   1323         return _retval_;
   1324     } catch(const std::exception &e) {
   1325         throwJavaException(env, &e, method_name);
   1326     } catch (...) {
   1327         throwJavaException(env, 0, method_name);
   1328     }
   1329     return 0;
   1330 }
   1331 
   1332 
   1333 
   1334 //
   1335 //  Mat getMissing()
   1336 //
   1337 
   1338 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getMissing_10 (JNIEnv*, jclass, jlong);
   1339 
   1340 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getMissing_10
   1341   (JNIEnv* env, jclass , jlong self)
   1342 {
   1343     static const char method_name[] = "ml::getMissing_10()";
   1344     try {
   1345         LOGD("%s", method_name);
   1346         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1347         ::Mat _retval_ = me->getMissing(  );
   1348         return (jlong) new ::Mat(_retval_);
   1349     } catch(const std::exception &e) {
   1350         throwJavaException(env, &e, method_name);
   1351     } catch (...) {
   1352         throwJavaException(env, 0, method_name);
   1353     }
   1354     return 0;
   1355 }
   1356 
   1357 
   1358 
   1359 //
   1360 //  Mat getTrainSamples(int layout = ROW_SAMPLE, bool compressSamples = true, bool compressVars = true)
   1361 //
   1362 
   1363 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSamples_10 (JNIEnv*, jclass, jlong, jint, jboolean, jboolean);
   1364 
   1365 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSamples_10
   1366   (JNIEnv* env, jclass , jlong self, jint layout, jboolean compressSamples, jboolean compressVars)
   1367 {
   1368     static const char method_name[] = "ml::getTrainSamples_10()";
   1369     try {
   1370         LOGD("%s", method_name);
   1371         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1372         ::Mat _retval_ = me->getTrainSamples( (int)layout, (bool)compressSamples, (bool)compressVars );
   1373         return (jlong) new ::Mat(_retval_);
   1374     } catch(const std::exception &e) {
   1375         throwJavaException(env, &e, method_name);
   1376     } catch (...) {
   1377         throwJavaException(env, 0, method_name);
   1378     }
   1379     return 0;
   1380 }
   1381 
   1382 
   1383 
   1384 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSamples_11 (JNIEnv*, jclass, jlong);
   1385 
   1386 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSamples_11
   1387   (JNIEnv* env, jclass , jlong self)
   1388 {
   1389     static const char method_name[] = "ml::getTrainSamples_11()";
   1390     try {
   1391         LOGD("%s", method_name);
   1392         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1393         ::Mat _retval_ = me->getTrainSamples(  );
   1394         return (jlong) new ::Mat(_retval_);
   1395     } catch(const std::exception &e) {
   1396         throwJavaException(env, &e, method_name);
   1397     } catch (...) {
   1398         throwJavaException(env, 0, method_name);
   1399     }
   1400     return 0;
   1401 }
   1402 
   1403 
   1404 
   1405 //
   1406 //  Mat getTrainResponses()
   1407 //
   1408 
   1409 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainResponses_10 (JNIEnv*, jclass, jlong);
   1410 
   1411 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainResponses_10
   1412   (JNIEnv* env, jclass , jlong self)
   1413 {
   1414     static const char method_name[] = "ml::getTrainResponses_10()";
   1415     try {
   1416         LOGD("%s", method_name);
   1417         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1418         ::Mat _retval_ = me->getTrainResponses(  );
   1419         return (jlong) new ::Mat(_retval_);
   1420     } catch(const std::exception &e) {
   1421         throwJavaException(env, &e, method_name);
   1422     } catch (...) {
   1423         throwJavaException(env, 0, method_name);
   1424     }
   1425     return 0;
   1426 }
   1427 
   1428 
   1429 
   1430 //
   1431 //  Mat getTrainNormCatResponses()
   1432 //
   1433 
   1434 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainNormCatResponses_10 (JNIEnv*, jclass, jlong);
   1435 
   1436 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainNormCatResponses_10
   1437   (JNIEnv* env, jclass , jlong self)
   1438 {
   1439     static const char method_name[] = "ml::getTrainNormCatResponses_10()";
   1440     try {
   1441         LOGD("%s", method_name);
   1442         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1443         ::Mat _retval_ = me->getTrainNormCatResponses(  );
   1444         return (jlong) new ::Mat(_retval_);
   1445     } catch(const std::exception &e) {
   1446         throwJavaException(env, &e, method_name);
   1447     } catch (...) {
   1448         throwJavaException(env, 0, method_name);
   1449     }
   1450     return 0;
   1451 }
   1452 
   1453 
   1454 
   1455 //
   1456 //  Mat getTestResponses()
   1457 //
   1458 
   1459 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestResponses_10 (JNIEnv*, jclass, jlong);
   1460 
   1461 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestResponses_10
   1462   (JNIEnv* env, jclass , jlong self)
   1463 {
   1464     static const char method_name[] = "ml::getTestResponses_10()";
   1465     try {
   1466         LOGD("%s", method_name);
   1467         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1468         ::Mat _retval_ = me->getTestResponses(  );
   1469         return (jlong) new ::Mat(_retval_);
   1470     } catch(const std::exception &e) {
   1471         throwJavaException(env, &e, method_name);
   1472     } catch (...) {
   1473         throwJavaException(env, 0, method_name);
   1474     }
   1475     return 0;
   1476 }
   1477 
   1478 
   1479 
   1480 //
   1481 //  Mat getTestNormCatResponses()
   1482 //
   1483 
   1484 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestNormCatResponses_10 (JNIEnv*, jclass, jlong);
   1485 
   1486 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestNormCatResponses_10
   1487   (JNIEnv* env, jclass , jlong self)
   1488 {
   1489     static const char method_name[] = "ml::getTestNormCatResponses_10()";
   1490     try {
   1491         LOGD("%s", method_name);
   1492         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1493         ::Mat _retval_ = me->getTestNormCatResponses(  );
   1494         return (jlong) new ::Mat(_retval_);
   1495     } catch(const std::exception &e) {
   1496         throwJavaException(env, &e, method_name);
   1497     } catch (...) {
   1498         throwJavaException(env, 0, method_name);
   1499     }
   1500     return 0;
   1501 }
   1502 
   1503 
   1504 
   1505 //
   1506 //  Mat getResponses()
   1507 //
   1508 
   1509 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getResponses_10 (JNIEnv*, jclass, jlong);
   1510 
   1511 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getResponses_10
   1512   (JNIEnv* env, jclass , jlong self)
   1513 {
   1514     static const char method_name[] = "ml::getResponses_10()";
   1515     try {
   1516         LOGD("%s", method_name);
   1517         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1518         ::Mat _retval_ = me->getResponses(  );
   1519         return (jlong) new ::Mat(_retval_);
   1520     } catch(const std::exception &e) {
   1521         throwJavaException(env, &e, method_name);
   1522     } catch (...) {
   1523         throwJavaException(env, 0, method_name);
   1524     }
   1525     return 0;
   1526 }
   1527 
   1528 
   1529 
   1530 //
   1531 //  Mat getSamples()
   1532 //
   1533 
   1534 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSamples_10 (JNIEnv*, jclass, jlong);
   1535 
   1536 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSamples_10
   1537   (JNIEnv* env, jclass , jlong self)
   1538 {
   1539     static const char method_name[] = "ml::getSamples_10()";
   1540     try {
   1541         LOGD("%s", method_name);
   1542         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1543         ::Mat _retval_ = me->getSamples(  );
   1544         return (jlong) new ::Mat(_retval_);
   1545     } catch(const std::exception &e) {
   1546         throwJavaException(env, &e, method_name);
   1547     } catch (...) {
   1548         throwJavaException(env, 0, method_name);
   1549     }
   1550     return 0;
   1551 }
   1552 
   1553 
   1554 
   1555 //
   1556 //  Mat getNormCatResponses()
   1557 //
   1558 
   1559 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getNormCatResponses_10 (JNIEnv*, jclass, jlong);
   1560 
   1561 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getNormCatResponses_10
   1562   (JNIEnv* env, jclass , jlong self)
   1563 {
   1564     static const char method_name[] = "ml::getNormCatResponses_10()";
   1565     try {
   1566         LOGD("%s", method_name);
   1567         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1568         ::Mat _retval_ = me->getNormCatResponses(  );
   1569         return (jlong) new ::Mat(_retval_);
   1570     } catch(const std::exception &e) {
   1571         throwJavaException(env, &e, method_name);
   1572     } catch (...) {
   1573         throwJavaException(env, 0, method_name);
   1574     }
   1575     return 0;
   1576 }
   1577 
   1578 
   1579 
   1580 //
   1581 //  Mat getSampleWeights()
   1582 //
   1583 
   1584 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSampleWeights_10 (JNIEnv*, jclass, jlong);
   1585 
   1586 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSampleWeights_10
   1587   (JNIEnv* env, jclass , jlong self)
   1588 {
   1589     static const char method_name[] = "ml::getSampleWeights_10()";
   1590     try {
   1591         LOGD("%s", method_name);
   1592         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1593         ::Mat _retval_ = me->getSampleWeights(  );
   1594         return (jlong) new ::Mat(_retval_);
   1595     } catch(const std::exception &e) {
   1596         throwJavaException(env, &e, method_name);
   1597     } catch (...) {
   1598         throwJavaException(env, 0, method_name);
   1599     }
   1600     return 0;
   1601 }
   1602 
   1603 
   1604 
   1605 //
   1606 //  Mat getTrainSampleWeights()
   1607 //
   1608 
   1609 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSampleWeights_10 (JNIEnv*, jclass, jlong);
   1610 
   1611 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSampleWeights_10
   1612   (JNIEnv* env, jclass , jlong self)
   1613 {
   1614     static const char method_name[] = "ml::getTrainSampleWeights_10()";
   1615     try {
   1616         LOGD("%s", method_name);
   1617         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1618         ::Mat _retval_ = me->getTrainSampleWeights(  );
   1619         return (jlong) new ::Mat(_retval_);
   1620     } catch(const std::exception &e) {
   1621         throwJavaException(env, &e, method_name);
   1622     } catch (...) {
   1623         throwJavaException(env, 0, method_name);
   1624     }
   1625     return 0;
   1626 }
   1627 
   1628 
   1629 
   1630 //
   1631 //  Mat getTestSampleWeights()
   1632 //
   1633 
   1634 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestSampleWeights_10 (JNIEnv*, jclass, jlong);
   1635 
   1636 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestSampleWeights_10
   1637   (JNIEnv* env, jclass , jlong self)
   1638 {
   1639     static const char method_name[] = "ml::getTestSampleWeights_10()";
   1640     try {
   1641         LOGD("%s", method_name);
   1642         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1643         ::Mat _retval_ = me->getTestSampleWeights(  );
   1644         return (jlong) new ::Mat(_retval_);
   1645     } catch(const std::exception &e) {
   1646         throwJavaException(env, &e, method_name);
   1647     } catch (...) {
   1648         throwJavaException(env, 0, method_name);
   1649     }
   1650     return 0;
   1651 }
   1652 
   1653 
   1654 
   1655 //
   1656 //  Mat getVarIdx()
   1657 //
   1658 
   1659 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getVarIdx_10 (JNIEnv*, jclass, jlong);
   1660 
   1661 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getVarIdx_10
   1662   (JNIEnv* env, jclass , jlong self)
   1663 {
   1664     static const char method_name[] = "ml::getVarIdx_10()";
   1665     try {
   1666         LOGD("%s", method_name);
   1667         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1668         ::Mat _retval_ = me->getVarIdx(  );
   1669         return (jlong) new ::Mat(_retval_);
   1670     } catch(const std::exception &e) {
   1671         throwJavaException(env, &e, method_name);
   1672     } catch (...) {
   1673         throwJavaException(env, 0, method_name);
   1674     }
   1675     return 0;
   1676 }
   1677 
   1678 
   1679 
   1680 //
   1681 //  Mat getVarType()
   1682 //
   1683 
   1684 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getVarType_10 (JNIEnv*, jclass, jlong);
   1685 
   1686 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getVarType_10
   1687   (JNIEnv* env, jclass , jlong self)
   1688 {
   1689     static const char method_name[] = "ml::getVarType_10()";
   1690     try {
   1691         LOGD("%s", method_name);
   1692         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1693         ::Mat _retval_ = me->getVarType(  );
   1694         return (jlong) new ::Mat(_retval_);
   1695     } catch(const std::exception &e) {
   1696         throwJavaException(env, &e, method_name);
   1697     } catch (...) {
   1698         throwJavaException(env, 0, method_name);
   1699     }
   1700     return 0;
   1701 }
   1702 
   1703 
   1704 
   1705 //
   1706 //  int getResponseType()
   1707 //
   1708 
   1709 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getResponseType_10 (JNIEnv*, jclass, jlong);
   1710 
   1711 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getResponseType_10
   1712   (JNIEnv* env, jclass , jlong self)
   1713 {
   1714     static const char method_name[] = "ml::getResponseType_10()";
   1715     try {
   1716         LOGD("%s", method_name);
   1717         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1718         int _retval_ = me->getResponseType(  );
   1719         return _retval_;
   1720     } catch(const std::exception &e) {
   1721         throwJavaException(env, &e, method_name);
   1722     } catch (...) {
   1723         throwJavaException(env, 0, method_name);
   1724     }
   1725     return 0;
   1726 }
   1727 
   1728 
   1729 
   1730 //
   1731 //  Mat getTrainSampleIdx()
   1732 //
   1733 
   1734 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSampleIdx_10 (JNIEnv*, jclass, jlong);
   1735 
   1736 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTrainSampleIdx_10
   1737   (JNIEnv* env, jclass , jlong self)
   1738 {
   1739     static const char method_name[] = "ml::getTrainSampleIdx_10()";
   1740     try {
   1741         LOGD("%s", method_name);
   1742         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1743         ::Mat _retval_ = me->getTrainSampleIdx(  );
   1744         return (jlong) new ::Mat(_retval_);
   1745     } catch(const std::exception &e) {
   1746         throwJavaException(env, &e, method_name);
   1747     } catch (...) {
   1748         throwJavaException(env, 0, method_name);
   1749     }
   1750     return 0;
   1751 }
   1752 
   1753 
   1754 
   1755 //
   1756 //  Mat getTestSampleIdx()
   1757 //
   1758 
   1759 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestSampleIdx_10 (JNIEnv*, jclass, jlong);
   1760 
   1761 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getTestSampleIdx_10
   1762   (JNIEnv* env, jclass , jlong self)
   1763 {
   1764     static const char method_name[] = "ml::getTestSampleIdx_10()";
   1765     try {
   1766         LOGD("%s", method_name);
   1767         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1768         ::Mat _retval_ = me->getTestSampleIdx(  );
   1769         return (jlong) new ::Mat(_retval_);
   1770     } catch(const std::exception &e) {
   1771         throwJavaException(env, &e, method_name);
   1772     } catch (...) {
   1773         throwJavaException(env, 0, method_name);
   1774     }
   1775     return 0;
   1776 }
   1777 
   1778 
   1779 
   1780 //
   1781 //  void getValues(int vi, Mat sidx, float* values)
   1782 //
   1783 
   1784 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_getValues_10 (JNIEnv*, jclass, jlong, jint, jlong, jfloat);
   1785 
   1786 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_getValues_10
   1787   (JNIEnv* env, jclass , jlong self, jint vi, jlong sidx_nativeObj, jfloat values)
   1788 {
   1789     static const char method_name[] = "ml::getValues_10()";
   1790     try {
   1791         LOGD("%s", method_name);
   1792         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1793         Mat& sidx = *((Mat*)sidx_nativeObj);
   1794         me->getValues( (int)vi, sidx, &values );
   1795         return;
   1796     } catch(const std::exception &e) {
   1797         throwJavaException(env, &e, method_name);
   1798     } catch (...) {
   1799         throwJavaException(env, 0, method_name);
   1800     }
   1801     return;
   1802 }
   1803 
   1804 
   1805 
   1806 //
   1807 //  Mat getDefaultSubstValues()
   1808 //
   1809 
   1810 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getDefaultSubstValues_10 (JNIEnv*, jclass, jlong);
   1811 
   1812 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getDefaultSubstValues_10
   1813   (JNIEnv* env, jclass , jlong self)
   1814 {
   1815     static const char method_name[] = "ml::getDefaultSubstValues_10()";
   1816     try {
   1817         LOGD("%s", method_name);
   1818         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1819         ::Mat _retval_ = me->getDefaultSubstValues(  );
   1820         return (jlong) new ::Mat(_retval_);
   1821     } catch(const std::exception &e) {
   1822         throwJavaException(env, &e, method_name);
   1823     } catch (...) {
   1824         throwJavaException(env, 0, method_name);
   1825     }
   1826     return 0;
   1827 }
   1828 
   1829 
   1830 
   1831 //
   1832 //  int getCatCount(int vi)
   1833 //
   1834 
   1835 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getCatCount_10 (JNIEnv*, jclass, jlong, jint);
   1836 
   1837 JNIEXPORT jint JNICALL Java_org_opencv_ml_TrainData_getCatCount_10
   1838   (JNIEnv* env, jclass , jlong self, jint vi)
   1839 {
   1840     static const char method_name[] = "ml::getCatCount_10()";
   1841     try {
   1842         LOGD("%s", method_name);
   1843         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1844         int _retval_ = me->getCatCount( (int)vi );
   1845         return _retval_;
   1846     } catch(const std::exception &e) {
   1847         throwJavaException(env, &e, method_name);
   1848     } catch (...) {
   1849         throwJavaException(env, 0, method_name);
   1850     }
   1851     return 0;
   1852 }
   1853 
   1854 
   1855 
   1856 //
   1857 //  Mat getClassLabels()
   1858 //
   1859 
   1860 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getClassLabels_10 (JNIEnv*, jclass, jlong);
   1861 
   1862 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getClassLabels_10
   1863   (JNIEnv* env, jclass , jlong self)
   1864 {
   1865     static const char method_name[] = "ml::getClassLabels_10()";
   1866     try {
   1867         LOGD("%s", method_name);
   1868         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1869         ::Mat _retval_ = me->getClassLabels(  );
   1870         return (jlong) new ::Mat(_retval_);
   1871     } catch(const std::exception &e) {
   1872         throwJavaException(env, &e, method_name);
   1873     } catch (...) {
   1874         throwJavaException(env, 0, method_name);
   1875     }
   1876     return 0;
   1877 }
   1878 
   1879 
   1880 
   1881 //
   1882 //  Mat getCatOfs()
   1883 //
   1884 
   1885 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getCatOfs_10 (JNIEnv*, jclass, jlong);
   1886 
   1887 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getCatOfs_10
   1888   (JNIEnv* env, jclass , jlong self)
   1889 {
   1890     static const char method_name[] = "ml::getCatOfs_10()";
   1891     try {
   1892         LOGD("%s", method_name);
   1893         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1894         ::Mat _retval_ = me->getCatOfs(  );
   1895         return (jlong) new ::Mat(_retval_);
   1896     } catch(const std::exception &e) {
   1897         throwJavaException(env, &e, method_name);
   1898     } catch (...) {
   1899         throwJavaException(env, 0, method_name);
   1900     }
   1901     return 0;
   1902 }
   1903 
   1904 
   1905 
   1906 //
   1907 //  Mat getCatMap()
   1908 //
   1909 
   1910 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getCatMap_10 (JNIEnv*, jclass, jlong);
   1911 
   1912 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getCatMap_10
   1913   (JNIEnv* env, jclass , jlong self)
   1914 {
   1915     static const char method_name[] = "ml::getCatMap_10()";
   1916     try {
   1917         LOGD("%s", method_name);
   1918         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1919         ::Mat _retval_ = me->getCatMap(  );
   1920         return (jlong) new ::Mat(_retval_);
   1921     } catch(const std::exception &e) {
   1922         throwJavaException(env, &e, method_name);
   1923     } catch (...) {
   1924         throwJavaException(env, 0, method_name);
   1925     }
   1926     return 0;
   1927 }
   1928 
   1929 
   1930 
   1931 //
   1932 //  void setTrainTestSplit(int count, bool shuffle = true)
   1933 //
   1934 
   1935 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplit_10 (JNIEnv*, jclass, jlong, jint, jboolean);
   1936 
   1937 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplit_10
   1938   (JNIEnv* env, jclass , jlong self, jint count, jboolean shuffle)
   1939 {
   1940     static const char method_name[] = "ml::setTrainTestSplit_10()";
   1941     try {
   1942         LOGD("%s", method_name);
   1943         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1944         me->setTrainTestSplit( (int)count, (bool)shuffle );
   1945         return;
   1946     } catch(const std::exception &e) {
   1947         throwJavaException(env, &e, method_name);
   1948     } catch (...) {
   1949         throwJavaException(env, 0, method_name);
   1950     }
   1951     return;
   1952 }
   1953 
   1954 
   1955 
   1956 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplit_11 (JNIEnv*, jclass, jlong, jint);
   1957 
   1958 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplit_11
   1959   (JNIEnv* env, jclass , jlong self, jint count)
   1960 {
   1961     static const char method_name[] = "ml::setTrainTestSplit_11()";
   1962     try {
   1963         LOGD("%s", method_name);
   1964         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1965         me->setTrainTestSplit( (int)count );
   1966         return;
   1967     } catch(const std::exception &e) {
   1968         throwJavaException(env, &e, method_name);
   1969     } catch (...) {
   1970         throwJavaException(env, 0, method_name);
   1971     }
   1972     return;
   1973 }
   1974 
   1975 
   1976 
   1977 //
   1978 //  void setTrainTestSplitRatio(double ratio, bool shuffle = true)
   1979 //
   1980 
   1981 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplitRatio_10 (JNIEnv*, jclass, jlong, jdouble, jboolean);
   1982 
   1983 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplitRatio_10
   1984   (JNIEnv* env, jclass , jlong self, jdouble ratio, jboolean shuffle)
   1985 {
   1986     static const char method_name[] = "ml::setTrainTestSplitRatio_10()";
   1987     try {
   1988         LOGD("%s", method_name);
   1989         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   1990         me->setTrainTestSplitRatio( (double)ratio, (bool)shuffle );
   1991         return;
   1992     } catch(const std::exception &e) {
   1993         throwJavaException(env, &e, method_name);
   1994     } catch (...) {
   1995         throwJavaException(env, 0, method_name);
   1996     }
   1997     return;
   1998 }
   1999 
   2000 
   2001 
   2002 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplitRatio_11 (JNIEnv*, jclass, jlong, jdouble);
   2003 
   2004 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_setTrainTestSplitRatio_11
   2005   (JNIEnv* env, jclass , jlong self, jdouble ratio)
   2006 {
   2007     static const char method_name[] = "ml::setTrainTestSplitRatio_11()";
   2008     try {
   2009         LOGD("%s", method_name);
   2010         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   2011         me->setTrainTestSplitRatio( (double)ratio );
   2012         return;
   2013     } catch(const std::exception &e) {
   2014         throwJavaException(env, &e, method_name);
   2015     } catch (...) {
   2016         throwJavaException(env, 0, method_name);
   2017     }
   2018     return;
   2019 }
   2020 
   2021 
   2022 
   2023 //
   2024 //  void shuffleTrainTest()
   2025 //
   2026 
   2027 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_shuffleTrainTest_10 (JNIEnv*, jclass, jlong);
   2028 
   2029 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_shuffleTrainTest_10
   2030   (JNIEnv* env, jclass , jlong self)
   2031 {
   2032     static const char method_name[] = "ml::shuffleTrainTest_10()";
   2033     try {
   2034         LOGD("%s", method_name);
   2035         cv::ml::TrainData* me = (cv::ml::TrainData*) self; //TODO: check for NULL
   2036         me->shuffleTrainTest(  );
   2037         return;
   2038     } catch(const std::exception &e) {
   2039         throwJavaException(env, &e, method_name);
   2040     } catch (...) {
   2041         throwJavaException(env, 0, method_name);
   2042     }
   2043     return;
   2044 }
   2045 
   2046 
   2047 
   2048 //
   2049 // static Mat getSubVector(Mat vec, Mat idx)
   2050 //
   2051 
   2052 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSubVector_10 (JNIEnv*, jclass, jlong, jlong);
   2053 
   2054 JNIEXPORT jlong JNICALL Java_org_opencv_ml_TrainData_getSubVector_10
   2055   (JNIEnv* env, jclass , jlong vec_nativeObj, jlong idx_nativeObj)
   2056 {
   2057     static const char method_name[] = "ml::getSubVector_10()";
   2058     try {
   2059         LOGD("%s", method_name);
   2060         Mat& vec = *((Mat*)vec_nativeObj);
   2061         Mat& idx = *((Mat*)idx_nativeObj);
   2062         ::Mat _retval_ = cv::ml::TrainData::getSubVector( vec, idx );
   2063         return (jlong) new ::Mat(_retval_);
   2064     } catch(const std::exception &e) {
   2065         throwJavaException(env, &e, method_name);
   2066     } catch (...) {
   2067         throwJavaException(env, 0, method_name);
   2068     }
   2069     return 0;
   2070 }
   2071 
   2072 
   2073 
   2074 //
   2075 //  native support for java finalize()
   2076 //  static void cv::ml::TrainData::delete( __int64 self )
   2077 //
   2078 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_delete(JNIEnv*, jclass, jlong);
   2079 
   2080 JNIEXPORT void JNICALL Java_org_opencv_ml_TrainData_delete
   2081   (JNIEnv*, jclass, jlong self)
   2082 {
   2083     delete (cv::ml::TrainData*) self;
   2084 }
   2085 
   2086 
   2087 //
   2088 //  int getBoostType()
   2089 //
   2090 
   2091 JNIEXPORT jint JNICALL Java_org_opencv_ml_Boost_getBoostType_10 (JNIEnv*, jclass, jlong);
   2092 
   2093 JNIEXPORT jint JNICALL Java_org_opencv_ml_Boost_getBoostType_10
   2094   (JNIEnv* env, jclass , jlong self)
   2095 {
   2096     static const char method_name[] = "ml::getBoostType_10()";
   2097     try {
   2098         LOGD("%s", method_name);
   2099         Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
   2100         int _retval_ = (*me)->getBoostType(  );
   2101         return _retval_;
   2102     } catch(const std::exception &e) {
   2103         throwJavaException(env, &e, method_name);
   2104     } catch (...) {
   2105         throwJavaException(env, 0, method_name);
   2106     }
   2107     return 0;
   2108 }
   2109 
   2110 
   2111 
   2112 //
   2113 //  void setBoostType(int val)
   2114 //
   2115 
   2116 JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setBoostType_10 (JNIEnv*, jclass, jlong, jint);
   2117 
   2118 JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setBoostType_10
   2119   (JNIEnv* env, jclass , jlong self, jint val)
   2120 {
   2121     static const char method_name[] = "ml::setBoostType_10()";
   2122     try {
   2123         LOGD("%s", method_name);
   2124         Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
   2125         (*me)->setBoostType( (int)val );
   2126         return;
   2127     } catch(const std::exception &e) {
   2128         throwJavaException(env, &e, method_name);
   2129     } catch (...) {
   2130         throwJavaException(env, 0, method_name);
   2131     }
   2132     return;
   2133 }
   2134 
   2135 
   2136 
   2137 //
   2138 //  int getWeakCount()
   2139 //
   2140 
   2141 JNIEXPORT jint JNICALL Java_org_opencv_ml_Boost_getWeakCount_10 (JNIEnv*, jclass, jlong);
   2142 
   2143 JNIEXPORT jint JNICALL Java_org_opencv_ml_Boost_getWeakCount_10
   2144   (JNIEnv* env, jclass , jlong self)
   2145 {
   2146     static const char method_name[] = "ml::getWeakCount_10()";
   2147     try {
   2148         LOGD("%s", method_name);
   2149         Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
   2150         int _retval_ = (*me)->getWeakCount(  );
   2151         return _retval_;
   2152     } catch(const std::exception &e) {
   2153         throwJavaException(env, &e, method_name);
   2154     } catch (...) {
   2155         throwJavaException(env, 0, method_name);
   2156     }
   2157     return 0;
   2158 }
   2159 
   2160 
   2161 
   2162 //
   2163 //  void setWeakCount(int val)
   2164 //
   2165 
   2166 JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setWeakCount_10 (JNIEnv*, jclass, jlong, jint);
   2167 
   2168 JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setWeakCount_10
   2169   (JNIEnv* env, jclass , jlong self, jint val)
   2170 {
   2171     static const char method_name[] = "ml::setWeakCount_10()";
   2172     try {
   2173         LOGD("%s", method_name);
   2174         Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
   2175         (*me)->setWeakCount( (int)val );
   2176         return;
   2177     } catch(const std::exception &e) {
   2178         throwJavaException(env, &e, method_name);
   2179     } catch (...) {
   2180         throwJavaException(env, 0, method_name);
   2181     }
   2182     return;
   2183 }
   2184 
   2185 
   2186 
   2187 //
   2188 //  double getWeightTrimRate()
   2189 //
   2190 
   2191 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_Boost_getWeightTrimRate_10 (JNIEnv*, jclass, jlong);
   2192 
   2193 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_Boost_getWeightTrimRate_10
   2194   (JNIEnv* env, jclass , jlong self)
   2195 {
   2196     static const char method_name[] = "ml::getWeightTrimRate_10()";
   2197     try {
   2198         LOGD("%s", method_name);
   2199         Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
   2200         double _retval_ = (*me)->getWeightTrimRate(  );
   2201         return _retval_;
   2202     } catch(const std::exception &e) {
   2203         throwJavaException(env, &e, method_name);
   2204     } catch (...) {
   2205         throwJavaException(env, 0, method_name);
   2206     }
   2207     return 0;
   2208 }
   2209 
   2210 
   2211 
   2212 //
   2213 //  void setWeightTrimRate(double val)
   2214 //
   2215 
   2216 JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setWeightTrimRate_10 (JNIEnv*, jclass, jlong, jdouble);
   2217 
   2218 JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_setWeightTrimRate_10
   2219   (JNIEnv* env, jclass , jlong self, jdouble val)
   2220 {
   2221     static const char method_name[] = "ml::setWeightTrimRate_10()";
   2222     try {
   2223         LOGD("%s", method_name);
   2224         Ptr<cv::ml::Boost>* me = (Ptr<cv::ml::Boost>*) self; //TODO: check for NULL
   2225         (*me)->setWeightTrimRate( (double)val );
   2226         return;
   2227     } catch(const std::exception &e) {
   2228         throwJavaException(env, &e, method_name);
   2229     } catch (...) {
   2230         throwJavaException(env, 0, method_name);
   2231     }
   2232     return;
   2233 }
   2234 
   2235 
   2236 
   2237 //
   2238 // static Ptr_Boost create()
   2239 //
   2240 
   2241 JNIEXPORT jlong JNICALL Java_org_opencv_ml_Boost_create_10 (JNIEnv*, jclass);
   2242 
   2243 JNIEXPORT jlong JNICALL Java_org_opencv_ml_Boost_create_10
   2244   (JNIEnv* env, jclass )
   2245 {
   2246     static const char method_name[] = "ml::create_10()";
   2247     try {
   2248         LOGD("%s", method_name);
   2249         typedef Ptr<cv::ml::Boost> Ptr_Boost;
   2250         Ptr_Boost _retval_ = cv::ml::Boost::create(  );
   2251         return (jlong)(new Ptr_Boost(_retval_));
   2252     } catch(const std::exception &e) {
   2253         throwJavaException(env, &e, method_name);
   2254     } catch (...) {
   2255         throwJavaException(env, 0, method_name);
   2256     }
   2257     return 0;
   2258 }
   2259 
   2260 
   2261 
   2262 //
   2263 //  native support for java finalize()
   2264 //  static void Ptr<cv::ml::Boost>::delete( __int64 self )
   2265 //
   2266 JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_delete(JNIEnv*, jclass, jlong);
   2267 
   2268 JNIEXPORT void JNICALL Java_org_opencv_ml_Boost_delete
   2269   (JNIEnv*, jclass, jlong self)
   2270 {
   2271     delete (Ptr<cv::ml::Boost>*) self;
   2272 }
   2273 
   2274 
   2275 //
   2276 //  double getLearningRate()
   2277 //
   2278 
   2279 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_LogisticRegression_getLearningRate_10 (JNIEnv*, jclass, jlong);
   2280 
   2281 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_LogisticRegression_getLearningRate_10
   2282   (JNIEnv* env, jclass , jlong self)
   2283 {
   2284     static const char method_name[] = "ml::getLearningRate_10()";
   2285     try {
   2286         LOGD("%s", method_name);
   2287         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2288         double _retval_ = (*me)->getLearningRate(  );
   2289         return _retval_;
   2290     } catch(const std::exception &e) {
   2291         throwJavaException(env, &e, method_name);
   2292     } catch (...) {
   2293         throwJavaException(env, 0, method_name);
   2294     }
   2295     return 0;
   2296 }
   2297 
   2298 
   2299 
   2300 //
   2301 //  void setLearningRate(double val)
   2302 //
   2303 
   2304 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setLearningRate_10 (JNIEnv*, jclass, jlong, jdouble);
   2305 
   2306 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setLearningRate_10
   2307   (JNIEnv* env, jclass , jlong self, jdouble val)
   2308 {
   2309     static const char method_name[] = "ml::setLearningRate_10()";
   2310     try {
   2311         LOGD("%s", method_name);
   2312         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2313         (*me)->setLearningRate( (double)val );
   2314         return;
   2315     } catch(const std::exception &e) {
   2316         throwJavaException(env, &e, method_name);
   2317     } catch (...) {
   2318         throwJavaException(env, 0, method_name);
   2319     }
   2320     return;
   2321 }
   2322 
   2323 
   2324 
   2325 //
   2326 //  int getIterations()
   2327 //
   2328 
   2329 JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getIterations_10 (JNIEnv*, jclass, jlong);
   2330 
   2331 JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getIterations_10
   2332   (JNIEnv* env, jclass , jlong self)
   2333 {
   2334     static const char method_name[] = "ml::getIterations_10()";
   2335     try {
   2336         LOGD("%s", method_name);
   2337         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2338         int _retval_ = (*me)->getIterations(  );
   2339         return _retval_;
   2340     } catch(const std::exception &e) {
   2341         throwJavaException(env, &e, method_name);
   2342     } catch (...) {
   2343         throwJavaException(env, 0, method_name);
   2344     }
   2345     return 0;
   2346 }
   2347 
   2348 
   2349 
   2350 //
   2351 //  void setIterations(int val)
   2352 //
   2353 
   2354 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setIterations_10 (JNIEnv*, jclass, jlong, jint);
   2355 
   2356 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setIterations_10
   2357   (JNIEnv* env, jclass , jlong self, jint val)
   2358 {
   2359     static const char method_name[] = "ml::setIterations_10()";
   2360     try {
   2361         LOGD("%s", method_name);
   2362         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2363         (*me)->setIterations( (int)val );
   2364         return;
   2365     } catch(const std::exception &e) {
   2366         throwJavaException(env, &e, method_name);
   2367     } catch (...) {
   2368         throwJavaException(env, 0, method_name);
   2369     }
   2370     return;
   2371 }
   2372 
   2373 
   2374 
   2375 //
   2376 //  int getRegularization()
   2377 //
   2378 
   2379 JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getRegularization_10 (JNIEnv*, jclass, jlong);
   2380 
   2381 JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getRegularization_10
   2382   (JNIEnv* env, jclass , jlong self)
   2383 {
   2384     static const char method_name[] = "ml::getRegularization_10()";
   2385     try {
   2386         LOGD("%s", method_name);
   2387         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2388         int _retval_ = (*me)->getRegularization(  );
   2389         return _retval_;
   2390     } catch(const std::exception &e) {
   2391         throwJavaException(env, &e, method_name);
   2392     } catch (...) {
   2393         throwJavaException(env, 0, method_name);
   2394     }
   2395     return 0;
   2396 }
   2397 
   2398 
   2399 
   2400 //
   2401 //  void setRegularization(int val)
   2402 //
   2403 
   2404 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setRegularization_10 (JNIEnv*, jclass, jlong, jint);
   2405 
   2406 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setRegularization_10
   2407   (JNIEnv* env, jclass , jlong self, jint val)
   2408 {
   2409     static const char method_name[] = "ml::setRegularization_10()";
   2410     try {
   2411         LOGD("%s", method_name);
   2412         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2413         (*me)->setRegularization( (int)val );
   2414         return;
   2415     } catch(const std::exception &e) {
   2416         throwJavaException(env, &e, method_name);
   2417     } catch (...) {
   2418         throwJavaException(env, 0, method_name);
   2419     }
   2420     return;
   2421 }
   2422 
   2423 
   2424 
   2425 //
   2426 //  int getTrainMethod()
   2427 //
   2428 
   2429 JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getTrainMethod_10 (JNIEnv*, jclass, jlong);
   2430 
   2431 JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getTrainMethod_10
   2432   (JNIEnv* env, jclass , jlong self)
   2433 {
   2434     static const char method_name[] = "ml::getTrainMethod_10()";
   2435     try {
   2436         LOGD("%s", method_name);
   2437         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2438         int _retval_ = (*me)->getTrainMethod(  );
   2439         return _retval_;
   2440     } catch(const std::exception &e) {
   2441         throwJavaException(env, &e, method_name);
   2442     } catch (...) {
   2443         throwJavaException(env, 0, method_name);
   2444     }
   2445     return 0;
   2446 }
   2447 
   2448 
   2449 
   2450 //
   2451 //  void setTrainMethod(int val)
   2452 //
   2453 
   2454 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setTrainMethod_10 (JNIEnv*, jclass, jlong, jint);
   2455 
   2456 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setTrainMethod_10
   2457   (JNIEnv* env, jclass , jlong self, jint val)
   2458 {
   2459     static const char method_name[] = "ml::setTrainMethod_10()";
   2460     try {
   2461         LOGD("%s", method_name);
   2462         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2463         (*me)->setTrainMethod( (int)val );
   2464         return;
   2465     } catch(const std::exception &e) {
   2466         throwJavaException(env, &e, method_name);
   2467     } catch (...) {
   2468         throwJavaException(env, 0, method_name);
   2469     }
   2470     return;
   2471 }
   2472 
   2473 
   2474 
   2475 //
   2476 //  int getMiniBatchSize()
   2477 //
   2478 
   2479 JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getMiniBatchSize_10 (JNIEnv*, jclass, jlong);
   2480 
   2481 JNIEXPORT jint JNICALL Java_org_opencv_ml_LogisticRegression_getMiniBatchSize_10
   2482   (JNIEnv* env, jclass , jlong self)
   2483 {
   2484     static const char method_name[] = "ml::getMiniBatchSize_10()";
   2485     try {
   2486         LOGD("%s", method_name);
   2487         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2488         int _retval_ = (*me)->getMiniBatchSize(  );
   2489         return _retval_;
   2490     } catch(const std::exception &e) {
   2491         throwJavaException(env, &e, method_name);
   2492     } catch (...) {
   2493         throwJavaException(env, 0, method_name);
   2494     }
   2495     return 0;
   2496 }
   2497 
   2498 
   2499 
   2500 //
   2501 //  void setMiniBatchSize(int val)
   2502 //
   2503 
   2504 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setMiniBatchSize_10 (JNIEnv*, jclass, jlong, jint);
   2505 
   2506 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setMiniBatchSize_10
   2507   (JNIEnv* env, jclass , jlong self, jint val)
   2508 {
   2509     static const char method_name[] = "ml::setMiniBatchSize_10()";
   2510     try {
   2511         LOGD("%s", method_name);
   2512         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2513         (*me)->setMiniBatchSize( (int)val );
   2514         return;
   2515     } catch(const std::exception &e) {
   2516         throwJavaException(env, &e, method_name);
   2517     } catch (...) {
   2518         throwJavaException(env, 0, method_name);
   2519     }
   2520     return;
   2521 }
   2522 
   2523 
   2524 
   2525 //
   2526 //  TermCriteria getTermCriteria()
   2527 //
   2528 
   2529 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_LogisticRegression_getTermCriteria_10 (JNIEnv*, jclass, jlong);
   2530 
   2531 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_LogisticRegression_getTermCriteria_10
   2532   (JNIEnv* env, jclass , jlong self)
   2533 {
   2534     static const char method_name[] = "ml::getTermCriteria_10()";
   2535     try {
   2536         LOGD("%s", method_name);
   2537         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2538         TermCriteria _retval_ = (*me)->getTermCriteria(  );
   2539         jdoubleArray _da_retval_ = env->NewDoubleArray(3);  jdouble _tmp_retval_[3] = {_retval_.type, _retval_.maxCount, _retval_.epsilon}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
   2540         return _da_retval_;
   2541     } catch(const std::exception &e) {
   2542         throwJavaException(env, &e, method_name);
   2543     } catch (...) {
   2544         throwJavaException(env, 0, method_name);
   2545     }
   2546     return 0;
   2547 }
   2548 
   2549 
   2550 
   2551 //
   2552 //  void setTermCriteria(TermCriteria val)
   2553 //
   2554 
   2555 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setTermCriteria_10 (JNIEnv*, jclass, jlong, jint, jint, jdouble);
   2556 
   2557 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_setTermCriteria_10
   2558   (JNIEnv* env, jclass , jlong self, jint val_type, jint val_maxCount, jdouble val_epsilon)
   2559 {
   2560     static const char method_name[] = "ml::setTermCriteria_10()";
   2561     try {
   2562         LOGD("%s", method_name);
   2563         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2564         TermCriteria val(val_type, val_maxCount, val_epsilon);
   2565         (*me)->setTermCriteria( val );
   2566         return;
   2567     } catch(const std::exception &e) {
   2568         throwJavaException(env, &e, method_name);
   2569     } catch (...) {
   2570         throwJavaException(env, 0, method_name);
   2571     }
   2572     return;
   2573 }
   2574 
   2575 
   2576 
   2577 //
   2578 //  float predict(Mat samples, Mat& results = Mat(), int flags = 0)
   2579 //
   2580 
   2581 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_LogisticRegression_predict_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
   2582 
   2583 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_LogisticRegression_predict_10
   2584   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong results_nativeObj, jint flags)
   2585 {
   2586     static const char method_name[] = "ml::predict_10()";
   2587     try {
   2588         LOGD("%s", method_name);
   2589         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2590         Mat& samples = *((Mat*)samples_nativeObj);
   2591         Mat& results = *((Mat*)results_nativeObj);
   2592         float _retval_ = (*me)->predict( samples, results, (int)flags );
   2593         return _retval_;
   2594     } catch(const std::exception &e) {
   2595         throwJavaException(env, &e, method_name);
   2596     } catch (...) {
   2597         throwJavaException(env, 0, method_name);
   2598     }
   2599     return 0;
   2600 }
   2601 
   2602 
   2603 
   2604 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_LogisticRegression_predict_11 (JNIEnv*, jclass, jlong, jlong);
   2605 
   2606 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_LogisticRegression_predict_11
   2607   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj)
   2608 {
   2609     static const char method_name[] = "ml::predict_11()";
   2610     try {
   2611         LOGD("%s", method_name);
   2612         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2613         Mat& samples = *((Mat*)samples_nativeObj);
   2614         float _retval_ = (*me)->predict( samples );
   2615         return _retval_;
   2616     } catch(const std::exception &e) {
   2617         throwJavaException(env, &e, method_name);
   2618     } catch (...) {
   2619         throwJavaException(env, 0, method_name);
   2620     }
   2621     return 0;
   2622 }
   2623 
   2624 
   2625 
   2626 //
   2627 //  Mat get_learnt_thetas()
   2628 //
   2629 
   2630 JNIEXPORT jlong JNICALL Java_org_opencv_ml_LogisticRegression_get_1learnt_1thetas_10 (JNIEnv*, jclass, jlong);
   2631 
   2632 JNIEXPORT jlong JNICALL Java_org_opencv_ml_LogisticRegression_get_1learnt_1thetas_10
   2633   (JNIEnv* env, jclass , jlong self)
   2634 {
   2635     static const char method_name[] = "ml::get_1learnt_1thetas_10()";
   2636     try {
   2637         LOGD("%s", method_name);
   2638         Ptr<cv::ml::LogisticRegression>* me = (Ptr<cv::ml::LogisticRegression>*) self; //TODO: check for NULL
   2639         ::Mat _retval_ = (*me)->get_learnt_thetas(  );
   2640         return (jlong) new ::Mat(_retval_);
   2641     } catch(const std::exception &e) {
   2642         throwJavaException(env, &e, method_name);
   2643     } catch (...) {
   2644         throwJavaException(env, 0, method_name);
   2645     }
   2646     return 0;
   2647 }
   2648 
   2649 
   2650 
   2651 //
   2652 // static Ptr_LogisticRegression create()
   2653 //
   2654 
   2655 JNIEXPORT jlong JNICALL Java_org_opencv_ml_LogisticRegression_create_10 (JNIEnv*, jclass);
   2656 
   2657 JNIEXPORT jlong JNICALL Java_org_opencv_ml_LogisticRegression_create_10
   2658   (JNIEnv* env, jclass )
   2659 {
   2660     static const char method_name[] = "ml::create_10()";
   2661     try {
   2662         LOGD("%s", method_name);
   2663         typedef Ptr<cv::ml::LogisticRegression> Ptr_LogisticRegression;
   2664         Ptr_LogisticRegression _retval_ = cv::ml::LogisticRegression::create(  );
   2665         return (jlong)(new Ptr_LogisticRegression(_retval_));
   2666     } catch(const std::exception &e) {
   2667         throwJavaException(env, &e, method_name);
   2668     } catch (...) {
   2669         throwJavaException(env, 0, method_name);
   2670     }
   2671     return 0;
   2672 }
   2673 
   2674 
   2675 
   2676 //
   2677 //  native support for java finalize()
   2678 //  static void Ptr<cv::ml::LogisticRegression>::delete( __int64 self )
   2679 //
   2680 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_delete(JNIEnv*, jclass, jlong);
   2681 
   2682 JNIEXPORT void JNICALL Java_org_opencv_ml_LogisticRegression_delete
   2683   (JNIEnv*, jclass, jlong self)
   2684 {
   2685     delete (Ptr<cv::ml::LogisticRegression>*) self;
   2686 }
   2687 
   2688 
   2689 //
   2690 //  void setDefaultK(int val)
   2691 //
   2692 
   2693 JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setDefaultK_10 (JNIEnv*, jclass, jlong, jint);
   2694 
   2695 JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setDefaultK_10
   2696   (JNIEnv* env, jclass , jlong self, jint val)
   2697 {
   2698     static const char method_name[] = "ml::setDefaultK_10()";
   2699     try {
   2700         LOGD("%s", method_name);
   2701         Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
   2702         (*me)->setDefaultK( (int)val );
   2703         return;
   2704     } catch(const std::exception &e) {
   2705         throwJavaException(env, &e, method_name);
   2706     } catch (...) {
   2707         throwJavaException(env, 0, method_name);
   2708     }
   2709     return;
   2710 }
   2711 
   2712 
   2713 
   2714 //
   2715 //  int getDefaultK()
   2716 //
   2717 
   2718 JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getDefaultK_10 (JNIEnv*, jclass, jlong);
   2719 
   2720 JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getDefaultK_10
   2721   (JNIEnv* env, jclass , jlong self)
   2722 {
   2723     static const char method_name[] = "ml::getDefaultK_10()";
   2724     try {
   2725         LOGD("%s", method_name);
   2726         Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
   2727         int _retval_ = (*me)->getDefaultK(  );
   2728         return _retval_;
   2729     } catch(const std::exception &e) {
   2730         throwJavaException(env, &e, method_name);
   2731     } catch (...) {
   2732         throwJavaException(env, 0, method_name);
   2733     }
   2734     return 0;
   2735 }
   2736 
   2737 
   2738 
   2739 //
   2740 //  bool getIsClassifier()
   2741 //
   2742 
   2743 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_KNearest_getIsClassifier_10 (JNIEnv*, jclass, jlong);
   2744 
   2745 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_KNearest_getIsClassifier_10
   2746   (JNIEnv* env, jclass , jlong self)
   2747 {
   2748     static const char method_name[] = "ml::getIsClassifier_10()";
   2749     try {
   2750         LOGD("%s", method_name);
   2751         Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
   2752         bool _retval_ = (*me)->getIsClassifier(  );
   2753         return _retval_;
   2754     } catch(const std::exception &e) {
   2755         throwJavaException(env, &e, method_name);
   2756     } catch (...) {
   2757         throwJavaException(env, 0, method_name);
   2758     }
   2759     return 0;
   2760 }
   2761 
   2762 
   2763 
   2764 //
   2765 //  void setIsClassifier(bool val)
   2766 //
   2767 
   2768 JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setIsClassifier_10 (JNIEnv*, jclass, jlong, jboolean);
   2769 
   2770 JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setIsClassifier_10
   2771   (JNIEnv* env, jclass , jlong self, jboolean val)
   2772 {
   2773     static const char method_name[] = "ml::setIsClassifier_10()";
   2774     try {
   2775         LOGD("%s", method_name);
   2776         Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
   2777         (*me)->setIsClassifier( (bool)val );
   2778         return;
   2779     } catch(const std::exception &e) {
   2780         throwJavaException(env, &e, method_name);
   2781     } catch (...) {
   2782         throwJavaException(env, 0, method_name);
   2783     }
   2784     return;
   2785 }
   2786 
   2787 
   2788 
   2789 //
   2790 //  int getEmax()
   2791 //
   2792 
   2793 JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getEmax_10 (JNIEnv*, jclass, jlong);
   2794 
   2795 JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getEmax_10
   2796   (JNIEnv* env, jclass , jlong self)
   2797 {
   2798     static const char method_name[] = "ml::getEmax_10()";
   2799     try {
   2800         LOGD("%s", method_name);
   2801         Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
   2802         int _retval_ = (*me)->getEmax(  );
   2803         return _retval_;
   2804     } catch(const std::exception &e) {
   2805         throwJavaException(env, &e, method_name);
   2806     } catch (...) {
   2807         throwJavaException(env, 0, method_name);
   2808     }
   2809     return 0;
   2810 }
   2811 
   2812 
   2813 
   2814 //
   2815 //  void setEmax(int val)
   2816 //
   2817 
   2818 JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setEmax_10 (JNIEnv*, jclass, jlong, jint);
   2819 
   2820 JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setEmax_10
   2821   (JNIEnv* env, jclass , jlong self, jint val)
   2822 {
   2823     static const char method_name[] = "ml::setEmax_10()";
   2824     try {
   2825         LOGD("%s", method_name);
   2826         Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
   2827         (*me)->setEmax( (int)val );
   2828         return;
   2829     } catch(const std::exception &e) {
   2830         throwJavaException(env, &e, method_name);
   2831     } catch (...) {
   2832         throwJavaException(env, 0, method_name);
   2833     }
   2834     return;
   2835 }
   2836 
   2837 
   2838 
   2839 //
   2840 //  int getAlgorithmType()
   2841 //
   2842 
   2843 JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getAlgorithmType_10 (JNIEnv*, jclass, jlong);
   2844 
   2845 JNIEXPORT jint JNICALL Java_org_opencv_ml_KNearest_getAlgorithmType_10
   2846   (JNIEnv* env, jclass , jlong self)
   2847 {
   2848     static const char method_name[] = "ml::getAlgorithmType_10()";
   2849     try {
   2850         LOGD("%s", method_name);
   2851         Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
   2852         int _retval_ = (*me)->getAlgorithmType(  );
   2853         return _retval_;
   2854     } catch(const std::exception &e) {
   2855         throwJavaException(env, &e, method_name);
   2856     } catch (...) {
   2857         throwJavaException(env, 0, method_name);
   2858     }
   2859     return 0;
   2860 }
   2861 
   2862 
   2863 
   2864 //
   2865 //  void setAlgorithmType(int val)
   2866 //
   2867 
   2868 JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setAlgorithmType_10 (JNIEnv*, jclass, jlong, jint);
   2869 
   2870 JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_setAlgorithmType_10
   2871   (JNIEnv* env, jclass , jlong self, jint val)
   2872 {
   2873     static const char method_name[] = "ml::setAlgorithmType_10()";
   2874     try {
   2875         LOGD("%s", method_name);
   2876         Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
   2877         (*me)->setAlgorithmType( (int)val );
   2878         return;
   2879     } catch(const std::exception &e) {
   2880         throwJavaException(env, &e, method_name);
   2881     } catch (...) {
   2882         throwJavaException(env, 0, method_name);
   2883     }
   2884     return;
   2885 }
   2886 
   2887 
   2888 
   2889 //
   2890 //  float findNearest(Mat samples, int k, Mat& results, Mat& neighborResponses = Mat(), Mat& dist = Mat())
   2891 //
   2892 
   2893 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_KNearest_findNearest_10 (JNIEnv*, jclass, jlong, jlong, jint, jlong, jlong, jlong);
   2894 
   2895 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_KNearest_findNearest_10
   2896   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jint k, jlong results_nativeObj, jlong neighborResponses_nativeObj, jlong dist_nativeObj)
   2897 {
   2898     static const char method_name[] = "ml::findNearest_10()";
   2899     try {
   2900         LOGD("%s", method_name);
   2901         Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
   2902         Mat& samples = *((Mat*)samples_nativeObj);
   2903         Mat& results = *((Mat*)results_nativeObj);
   2904         Mat& neighborResponses = *((Mat*)neighborResponses_nativeObj);
   2905         Mat& dist = *((Mat*)dist_nativeObj);
   2906         float _retval_ = (*me)->findNearest( samples, (int)k, results, neighborResponses, dist );
   2907         return _retval_;
   2908     } catch(const std::exception &e) {
   2909         throwJavaException(env, &e, method_name);
   2910     } catch (...) {
   2911         throwJavaException(env, 0, method_name);
   2912     }
   2913     return 0;
   2914 }
   2915 
   2916 
   2917 
   2918 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_KNearest_findNearest_11 (JNIEnv*, jclass, jlong, jlong, jint, jlong);
   2919 
   2920 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_KNearest_findNearest_11
   2921   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jint k, jlong results_nativeObj)
   2922 {
   2923     static const char method_name[] = "ml::findNearest_11()";
   2924     try {
   2925         LOGD("%s", method_name);
   2926         Ptr<cv::ml::KNearest>* me = (Ptr<cv::ml::KNearest>*) self; //TODO: check for NULL
   2927         Mat& samples = *((Mat*)samples_nativeObj);
   2928         Mat& results = *((Mat*)results_nativeObj);
   2929         float _retval_ = (*me)->findNearest( samples, (int)k, results );
   2930         return _retval_;
   2931     } catch(const std::exception &e) {
   2932         throwJavaException(env, &e, method_name);
   2933     } catch (...) {
   2934         throwJavaException(env, 0, method_name);
   2935     }
   2936     return 0;
   2937 }
   2938 
   2939 
   2940 
   2941 //
   2942 // static Ptr_KNearest create()
   2943 //
   2944 
   2945 JNIEXPORT jlong JNICALL Java_org_opencv_ml_KNearest_create_10 (JNIEnv*, jclass);
   2946 
   2947 JNIEXPORT jlong JNICALL Java_org_opencv_ml_KNearest_create_10
   2948   (JNIEnv* env, jclass )
   2949 {
   2950     static const char method_name[] = "ml::create_10()";
   2951     try {
   2952         LOGD("%s", method_name);
   2953         typedef Ptr<cv::ml::KNearest> Ptr_KNearest;
   2954         Ptr_KNearest _retval_ = cv::ml::KNearest::create(  );
   2955         return (jlong)(new Ptr_KNearest(_retval_));
   2956     } catch(const std::exception &e) {
   2957         throwJavaException(env, &e, method_name);
   2958     } catch (...) {
   2959         throwJavaException(env, 0, method_name);
   2960     }
   2961     return 0;
   2962 }
   2963 
   2964 
   2965 
   2966 //
   2967 //  native support for java finalize()
   2968 //  static void Ptr<cv::ml::KNearest>::delete( __int64 self )
   2969 //
   2970 JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_delete(JNIEnv*, jclass, jlong);
   2971 
   2972 JNIEXPORT void JNICALL Java_org_opencv_ml_KNearest_delete
   2973   (JNIEnv*, jclass, jlong self)
   2974 {
   2975     delete (Ptr<cv::ml::KNearest>*) self;
   2976 }
   2977 
   2978 
   2979 //
   2980 //  int getMaxCategories()
   2981 //
   2982 
   2983 JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMaxCategories_10 (JNIEnv*, jclass, jlong);
   2984 
   2985 JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMaxCategories_10
   2986   (JNIEnv* env, jclass , jlong self)
   2987 {
   2988     static const char method_name[] = "ml::getMaxCategories_10()";
   2989     try {
   2990         LOGD("%s", method_name);
   2991         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   2992         int _retval_ = (*me)->getMaxCategories(  );
   2993         return _retval_;
   2994     } catch(const std::exception &e) {
   2995         throwJavaException(env, &e, method_name);
   2996     } catch (...) {
   2997         throwJavaException(env, 0, method_name);
   2998     }
   2999     return 0;
   3000 }
   3001 
   3002 
   3003 
   3004 //
   3005 //  void setMaxCategories(int val)
   3006 //
   3007 
   3008 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMaxCategories_10 (JNIEnv*, jclass, jlong, jint);
   3009 
   3010 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMaxCategories_10
   3011   (JNIEnv* env, jclass , jlong self, jint val)
   3012 {
   3013     static const char method_name[] = "ml::setMaxCategories_10()";
   3014     try {
   3015         LOGD("%s", method_name);
   3016         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3017         (*me)->setMaxCategories( (int)val );
   3018         return;
   3019     } catch(const std::exception &e) {
   3020         throwJavaException(env, &e, method_name);
   3021     } catch (...) {
   3022         throwJavaException(env, 0, method_name);
   3023     }
   3024     return;
   3025 }
   3026 
   3027 
   3028 
   3029 //
   3030 //  int getMaxDepth()
   3031 //
   3032 
   3033 JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMaxDepth_10 (JNIEnv*, jclass, jlong);
   3034 
   3035 JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMaxDepth_10
   3036   (JNIEnv* env, jclass , jlong self)
   3037 {
   3038     static const char method_name[] = "ml::getMaxDepth_10()";
   3039     try {
   3040         LOGD("%s", method_name);
   3041         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3042         int _retval_ = (*me)->getMaxDepth(  );
   3043         return _retval_;
   3044     } catch(const std::exception &e) {
   3045         throwJavaException(env, &e, method_name);
   3046     } catch (...) {
   3047         throwJavaException(env, 0, method_name);
   3048     }
   3049     return 0;
   3050 }
   3051 
   3052 
   3053 
   3054 //
   3055 //  void setMaxDepth(int val)
   3056 //
   3057 
   3058 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMaxDepth_10 (JNIEnv*, jclass, jlong, jint);
   3059 
   3060 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMaxDepth_10
   3061   (JNIEnv* env, jclass , jlong self, jint val)
   3062 {
   3063     static const char method_name[] = "ml::setMaxDepth_10()";
   3064     try {
   3065         LOGD("%s", method_name);
   3066         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3067         (*me)->setMaxDepth( (int)val );
   3068         return;
   3069     } catch(const std::exception &e) {
   3070         throwJavaException(env, &e, method_name);
   3071     } catch (...) {
   3072         throwJavaException(env, 0, method_name);
   3073     }
   3074     return;
   3075 }
   3076 
   3077 
   3078 
   3079 //
   3080 //  int getMinSampleCount()
   3081 //
   3082 
   3083 JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMinSampleCount_10 (JNIEnv*, jclass, jlong);
   3084 
   3085 JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getMinSampleCount_10
   3086   (JNIEnv* env, jclass , jlong self)
   3087 {
   3088     static const char method_name[] = "ml::getMinSampleCount_10()";
   3089     try {
   3090         LOGD("%s", method_name);
   3091         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3092         int _retval_ = (*me)->getMinSampleCount(  );
   3093         return _retval_;
   3094     } catch(const std::exception &e) {
   3095         throwJavaException(env, &e, method_name);
   3096     } catch (...) {
   3097         throwJavaException(env, 0, method_name);
   3098     }
   3099     return 0;
   3100 }
   3101 
   3102 
   3103 
   3104 //
   3105 //  void setMinSampleCount(int val)
   3106 //
   3107 
   3108 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMinSampleCount_10 (JNIEnv*, jclass, jlong, jint);
   3109 
   3110 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setMinSampleCount_10
   3111   (JNIEnv* env, jclass , jlong self, jint val)
   3112 {
   3113     static const char method_name[] = "ml::setMinSampleCount_10()";
   3114     try {
   3115         LOGD("%s", method_name);
   3116         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3117         (*me)->setMinSampleCount( (int)val );
   3118         return;
   3119     } catch(const std::exception &e) {
   3120         throwJavaException(env, &e, method_name);
   3121     } catch (...) {
   3122         throwJavaException(env, 0, method_name);
   3123     }
   3124     return;
   3125 }
   3126 
   3127 
   3128 
   3129 //
   3130 //  int getCVFolds()
   3131 //
   3132 
   3133 JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getCVFolds_10 (JNIEnv*, jclass, jlong);
   3134 
   3135 JNIEXPORT jint JNICALL Java_org_opencv_ml_DTrees_getCVFolds_10
   3136   (JNIEnv* env, jclass , jlong self)
   3137 {
   3138     static const char method_name[] = "ml::getCVFolds_10()";
   3139     try {
   3140         LOGD("%s", method_name);
   3141         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3142         int _retval_ = (*me)->getCVFolds(  );
   3143         return _retval_;
   3144     } catch(const std::exception &e) {
   3145         throwJavaException(env, &e, method_name);
   3146     } catch (...) {
   3147         throwJavaException(env, 0, method_name);
   3148     }
   3149     return 0;
   3150 }
   3151 
   3152 
   3153 
   3154 //
   3155 //  void setCVFolds(int val)
   3156 //
   3157 
   3158 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setCVFolds_10 (JNIEnv*, jclass, jlong, jint);
   3159 
   3160 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setCVFolds_10
   3161   (JNIEnv* env, jclass , jlong self, jint val)
   3162 {
   3163     static const char method_name[] = "ml::setCVFolds_10()";
   3164     try {
   3165         LOGD("%s", method_name);
   3166         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3167         (*me)->setCVFolds( (int)val );
   3168         return;
   3169     } catch(const std::exception &e) {
   3170         throwJavaException(env, &e, method_name);
   3171     } catch (...) {
   3172         throwJavaException(env, 0, method_name);
   3173     }
   3174     return;
   3175 }
   3176 
   3177 
   3178 
   3179 //
   3180 //  bool getUseSurrogates()
   3181 //
   3182 
   3183 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getUseSurrogates_10 (JNIEnv*, jclass, jlong);
   3184 
   3185 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getUseSurrogates_10
   3186   (JNIEnv* env, jclass , jlong self)
   3187 {
   3188     static const char method_name[] = "ml::getUseSurrogates_10()";
   3189     try {
   3190         LOGD("%s", method_name);
   3191         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3192         bool _retval_ = (*me)->getUseSurrogates(  );
   3193         return _retval_;
   3194     } catch(const std::exception &e) {
   3195         throwJavaException(env, &e, method_name);
   3196     } catch (...) {
   3197         throwJavaException(env, 0, method_name);
   3198     }
   3199     return 0;
   3200 }
   3201 
   3202 
   3203 
   3204 //
   3205 //  void setUseSurrogates(bool val)
   3206 //
   3207 
   3208 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setUseSurrogates_10 (JNIEnv*, jclass, jlong, jboolean);
   3209 
   3210 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setUseSurrogates_10
   3211   (JNIEnv* env, jclass , jlong self, jboolean val)
   3212 {
   3213     static const char method_name[] = "ml::setUseSurrogates_10()";
   3214     try {
   3215         LOGD("%s", method_name);
   3216         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3217         (*me)->setUseSurrogates( (bool)val );
   3218         return;
   3219     } catch(const std::exception &e) {
   3220         throwJavaException(env, &e, method_name);
   3221     } catch (...) {
   3222         throwJavaException(env, 0, method_name);
   3223     }
   3224     return;
   3225 }
   3226 
   3227 
   3228 
   3229 //
   3230 //  bool getUse1SERule()
   3231 //
   3232 
   3233 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getUse1SERule_10 (JNIEnv*, jclass, jlong);
   3234 
   3235 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getUse1SERule_10
   3236   (JNIEnv* env, jclass , jlong self)
   3237 {
   3238     static const char method_name[] = "ml::getUse1SERule_10()";
   3239     try {
   3240         LOGD("%s", method_name);
   3241         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3242         bool _retval_ = (*me)->getUse1SERule(  );
   3243         return _retval_;
   3244     } catch(const std::exception &e) {
   3245         throwJavaException(env, &e, method_name);
   3246     } catch (...) {
   3247         throwJavaException(env, 0, method_name);
   3248     }
   3249     return 0;
   3250 }
   3251 
   3252 
   3253 
   3254 //
   3255 //  void setUse1SERule(bool val)
   3256 //
   3257 
   3258 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setUse1SERule_10 (JNIEnv*, jclass, jlong, jboolean);
   3259 
   3260 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setUse1SERule_10
   3261   (JNIEnv* env, jclass , jlong self, jboolean val)
   3262 {
   3263     static const char method_name[] = "ml::setUse1SERule_10()";
   3264     try {
   3265         LOGD("%s", method_name);
   3266         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3267         (*me)->setUse1SERule( (bool)val );
   3268         return;
   3269     } catch(const std::exception &e) {
   3270         throwJavaException(env, &e, method_name);
   3271     } catch (...) {
   3272         throwJavaException(env, 0, method_name);
   3273     }
   3274     return;
   3275 }
   3276 
   3277 
   3278 
   3279 //
   3280 //  bool getTruncatePrunedTree()
   3281 //
   3282 
   3283 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getTruncatePrunedTree_10 (JNIEnv*, jclass, jlong);
   3284 
   3285 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_DTrees_getTruncatePrunedTree_10
   3286   (JNIEnv* env, jclass , jlong self)
   3287 {
   3288     static const char method_name[] = "ml::getTruncatePrunedTree_10()";
   3289     try {
   3290         LOGD("%s", method_name);
   3291         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3292         bool _retval_ = (*me)->getTruncatePrunedTree(  );
   3293         return _retval_;
   3294     } catch(const std::exception &e) {
   3295         throwJavaException(env, &e, method_name);
   3296     } catch (...) {
   3297         throwJavaException(env, 0, method_name);
   3298     }
   3299     return 0;
   3300 }
   3301 
   3302 
   3303 
   3304 //
   3305 //  void setTruncatePrunedTree(bool val)
   3306 //
   3307 
   3308 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setTruncatePrunedTree_10 (JNIEnv*, jclass, jlong, jboolean);
   3309 
   3310 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setTruncatePrunedTree_10
   3311   (JNIEnv* env, jclass , jlong self, jboolean val)
   3312 {
   3313     static const char method_name[] = "ml::setTruncatePrunedTree_10()";
   3314     try {
   3315         LOGD("%s", method_name);
   3316         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3317         (*me)->setTruncatePrunedTree( (bool)val );
   3318         return;
   3319     } catch(const std::exception &e) {
   3320         throwJavaException(env, &e, method_name);
   3321     } catch (...) {
   3322         throwJavaException(env, 0, method_name);
   3323     }
   3324     return;
   3325 }
   3326 
   3327 
   3328 
   3329 //
   3330 //  float getRegressionAccuracy()
   3331 //
   3332 
   3333 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_DTrees_getRegressionAccuracy_10 (JNIEnv*, jclass, jlong);
   3334 
   3335 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_DTrees_getRegressionAccuracy_10
   3336   (JNIEnv* env, jclass , jlong self)
   3337 {
   3338     static const char method_name[] = "ml::getRegressionAccuracy_10()";
   3339     try {
   3340         LOGD("%s", method_name);
   3341         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3342         float _retval_ = (*me)->getRegressionAccuracy(  );
   3343         return _retval_;
   3344     } catch(const std::exception &e) {
   3345         throwJavaException(env, &e, method_name);
   3346     } catch (...) {
   3347         throwJavaException(env, 0, method_name);
   3348     }
   3349     return 0;
   3350 }
   3351 
   3352 
   3353 
   3354 //
   3355 //  void setRegressionAccuracy(float val)
   3356 //
   3357 
   3358 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setRegressionAccuracy_10 (JNIEnv*, jclass, jlong, jfloat);
   3359 
   3360 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setRegressionAccuracy_10
   3361   (JNIEnv* env, jclass , jlong self, jfloat val)
   3362 {
   3363     static const char method_name[] = "ml::setRegressionAccuracy_10()";
   3364     try {
   3365         LOGD("%s", method_name);
   3366         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3367         (*me)->setRegressionAccuracy( (float)val );
   3368         return;
   3369     } catch(const std::exception &e) {
   3370         throwJavaException(env, &e, method_name);
   3371     } catch (...) {
   3372         throwJavaException(env, 0, method_name);
   3373     }
   3374     return;
   3375 }
   3376 
   3377 
   3378 
   3379 //
   3380 //  Mat getPriors()
   3381 //
   3382 
   3383 JNIEXPORT jlong JNICALL Java_org_opencv_ml_DTrees_getPriors_10 (JNIEnv*, jclass, jlong);
   3384 
   3385 JNIEXPORT jlong JNICALL Java_org_opencv_ml_DTrees_getPriors_10
   3386   (JNIEnv* env, jclass , jlong self)
   3387 {
   3388     static const char method_name[] = "ml::getPriors_10()";
   3389     try {
   3390         LOGD("%s", method_name);
   3391         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3392         ::Mat _retval_ = (*me)->getPriors(  );
   3393         return (jlong) new ::Mat(_retval_);
   3394     } catch(const std::exception &e) {
   3395         throwJavaException(env, &e, method_name);
   3396     } catch (...) {
   3397         throwJavaException(env, 0, method_name);
   3398     }
   3399     return 0;
   3400 }
   3401 
   3402 
   3403 
   3404 //
   3405 //  void setPriors(Mat val)
   3406 //
   3407 
   3408 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setPriors_10 (JNIEnv*, jclass, jlong, jlong);
   3409 
   3410 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_setPriors_10
   3411   (JNIEnv* env, jclass , jlong self, jlong val_nativeObj)
   3412 {
   3413     static const char method_name[] = "ml::setPriors_10()";
   3414     try {
   3415         LOGD("%s", method_name);
   3416         Ptr<cv::ml::DTrees>* me = (Ptr<cv::ml::DTrees>*) self; //TODO: check for NULL
   3417         Mat& val = *((Mat*)val_nativeObj);
   3418         (*me)->setPriors( val );
   3419         return;
   3420     } catch(const std::exception &e) {
   3421         throwJavaException(env, &e, method_name);
   3422     } catch (...) {
   3423         throwJavaException(env, 0, method_name);
   3424     }
   3425     return;
   3426 }
   3427 
   3428 
   3429 
   3430 //
   3431 // static Ptr_DTrees create()
   3432 //
   3433 
   3434 JNIEXPORT jlong JNICALL Java_org_opencv_ml_DTrees_create_10 (JNIEnv*, jclass);
   3435 
   3436 JNIEXPORT jlong JNICALL Java_org_opencv_ml_DTrees_create_10
   3437   (JNIEnv* env, jclass )
   3438 {
   3439     static const char method_name[] = "ml::create_10()";
   3440     try {
   3441         LOGD("%s", method_name);
   3442         typedef Ptr<cv::ml::DTrees> Ptr_DTrees;
   3443         Ptr_DTrees _retval_ = cv::ml::DTrees::create(  );
   3444         return (jlong)(new Ptr_DTrees(_retval_));
   3445     } catch(const std::exception &e) {
   3446         throwJavaException(env, &e, method_name);
   3447     } catch (...) {
   3448         throwJavaException(env, 0, method_name);
   3449     }
   3450     return 0;
   3451 }
   3452 
   3453 
   3454 
   3455 //
   3456 //  native support for java finalize()
   3457 //  static void Ptr<cv::ml::DTrees>::delete( __int64 self )
   3458 //
   3459 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_delete(JNIEnv*, jclass, jlong);
   3460 
   3461 JNIEXPORT void JNICALL Java_org_opencv_ml_DTrees_delete
   3462   (JNIEnv*, jclass, jlong self)
   3463 {
   3464     delete (Ptr<cv::ml::DTrees>*) self;
   3465 }
   3466 
   3467 
   3468 //
   3469 //  void setTrainMethod(int method, double param1 = 0, double param2 = 0)
   3470 //
   3471 
   3472 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTrainMethod_10 (JNIEnv*, jclass, jlong, jint, jdouble, jdouble);
   3473 
   3474 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTrainMethod_10
   3475   (JNIEnv* env, jclass , jlong self, jint method, jdouble param1, jdouble param2)
   3476 {
   3477     static const char method_name[] = "ml::setTrainMethod_10()";
   3478     try {
   3479         LOGD("%s", method_name);
   3480         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3481         (*me)->setTrainMethod( (int)method, (double)param1, (double)param2 );
   3482         return;
   3483     } catch(const std::exception &e) {
   3484         throwJavaException(env, &e, method_name);
   3485     } catch (...) {
   3486         throwJavaException(env, 0, method_name);
   3487     }
   3488     return;
   3489 }
   3490 
   3491 
   3492 
   3493 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTrainMethod_11 (JNIEnv*, jclass, jlong, jint);
   3494 
   3495 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTrainMethod_11
   3496   (JNIEnv* env, jclass , jlong self, jint method)
   3497 {
   3498     static const char method_name[] = "ml::setTrainMethod_11()";
   3499     try {
   3500         LOGD("%s", method_name);
   3501         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3502         (*me)->setTrainMethod( (int)method );
   3503         return;
   3504     } catch(const std::exception &e) {
   3505         throwJavaException(env, &e, method_name);
   3506     } catch (...) {
   3507         throwJavaException(env, 0, method_name);
   3508     }
   3509     return;
   3510 }
   3511 
   3512 
   3513 
   3514 //
   3515 //  void setActivationFunction(int type, double param1 = 0, double param2 = 0)
   3516 //
   3517 
   3518 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setActivationFunction_10 (JNIEnv*, jclass, jlong, jint, jdouble, jdouble);
   3519 
   3520 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setActivationFunction_10
   3521   (JNIEnv* env, jclass , jlong self, jint type, jdouble param1, jdouble param2)
   3522 {
   3523     static const char method_name[] = "ml::setActivationFunction_10()";
   3524     try {
   3525         LOGD("%s", method_name);
   3526         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3527         (*me)->setActivationFunction( (int)type, (double)param1, (double)param2 );
   3528         return;
   3529     } catch(const std::exception &e) {
   3530         throwJavaException(env, &e, method_name);
   3531     } catch (...) {
   3532         throwJavaException(env, 0, method_name);
   3533     }
   3534     return;
   3535 }
   3536 
   3537 
   3538 
   3539 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setActivationFunction_11 (JNIEnv*, jclass, jlong, jint);
   3540 
   3541 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setActivationFunction_11
   3542   (JNIEnv* env, jclass , jlong self, jint type)
   3543 {
   3544     static const char method_name[] = "ml::setActivationFunction_11()";
   3545     try {
   3546         LOGD("%s", method_name);
   3547         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3548         (*me)->setActivationFunction( (int)type );
   3549         return;
   3550     } catch(const std::exception &e) {
   3551         throwJavaException(env, &e, method_name);
   3552     } catch (...) {
   3553         throwJavaException(env, 0, method_name);
   3554     }
   3555     return;
   3556 }
   3557 
   3558 
   3559 
   3560 //
   3561 //  int getTrainMethod()
   3562 //
   3563 
   3564 JNIEXPORT jint JNICALL Java_org_opencv_ml_ANN_1MLP_getTrainMethod_10 (JNIEnv*, jclass, jlong);
   3565 
   3566 JNIEXPORT jint JNICALL Java_org_opencv_ml_ANN_1MLP_getTrainMethod_10
   3567   (JNIEnv* env, jclass , jlong self)
   3568 {
   3569     static const char method_name[] = "ml::getTrainMethod_10()";
   3570     try {
   3571         LOGD("%s", method_name);
   3572         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3573         int _retval_ = (*me)->getTrainMethod(  );
   3574         return _retval_;
   3575     } catch(const std::exception &e) {
   3576         throwJavaException(env, &e, method_name);
   3577     } catch (...) {
   3578         throwJavaException(env, 0, method_name);
   3579     }
   3580     return 0;
   3581 }
   3582 
   3583 
   3584 
   3585 //
   3586 //  void setLayerSizes(Mat _layer_sizes)
   3587 //
   3588 
   3589 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setLayerSizes_10 (JNIEnv*, jclass, jlong, jlong);
   3590 
   3591 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setLayerSizes_10
   3592   (JNIEnv* env, jclass , jlong self, jlong _layer_sizes_nativeObj)
   3593 {
   3594     static const char method_name[] = "ml::setLayerSizes_10()";
   3595     try {
   3596         LOGD("%s", method_name);
   3597         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3598         Mat& _layer_sizes = *((Mat*)_layer_sizes_nativeObj);
   3599         (*me)->setLayerSizes( _layer_sizes );
   3600         return;
   3601     } catch(const std::exception &e) {
   3602         throwJavaException(env, &e, method_name);
   3603     } catch (...) {
   3604         throwJavaException(env, 0, method_name);
   3605     }
   3606     return;
   3607 }
   3608 
   3609 
   3610 
   3611 //
   3612 //  Mat getLayerSizes()
   3613 //
   3614 
   3615 JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_getLayerSizes_10 (JNIEnv*, jclass, jlong);
   3616 
   3617 JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_getLayerSizes_10
   3618   (JNIEnv* env, jclass , jlong self)
   3619 {
   3620     static const char method_name[] = "ml::getLayerSizes_10()";
   3621     try {
   3622         LOGD("%s", method_name);
   3623         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3624         ::Mat _retval_ = (*me)->getLayerSizes(  );
   3625         return (jlong) new ::Mat(_retval_);
   3626     } catch(const std::exception &e) {
   3627         throwJavaException(env, &e, method_name);
   3628     } catch (...) {
   3629         throwJavaException(env, 0, method_name);
   3630     }
   3631     return 0;
   3632 }
   3633 
   3634 
   3635 
   3636 //
   3637 //  TermCriteria getTermCriteria()
   3638 //
   3639 
   3640 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_ANN_1MLP_getTermCriteria_10 (JNIEnv*, jclass, jlong);
   3641 
   3642 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_ANN_1MLP_getTermCriteria_10
   3643   (JNIEnv* env, jclass , jlong self)
   3644 {
   3645     static const char method_name[] = "ml::getTermCriteria_10()";
   3646     try {
   3647         LOGD("%s", method_name);
   3648         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3649         TermCriteria _retval_ = (*me)->getTermCriteria(  );
   3650         jdoubleArray _da_retval_ = env->NewDoubleArray(3);  jdouble _tmp_retval_[3] = {_retval_.type, _retval_.maxCount, _retval_.epsilon}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
   3651         return _da_retval_;
   3652     } catch(const std::exception &e) {
   3653         throwJavaException(env, &e, method_name);
   3654     } catch (...) {
   3655         throwJavaException(env, 0, method_name);
   3656     }
   3657     return 0;
   3658 }
   3659 
   3660 
   3661 
   3662 //
   3663 //  void setTermCriteria(TermCriteria val)
   3664 //
   3665 
   3666 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTermCriteria_10 (JNIEnv*, jclass, jlong, jint, jint, jdouble);
   3667 
   3668 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setTermCriteria_10
   3669   (JNIEnv* env, jclass , jlong self, jint val_type, jint val_maxCount, jdouble val_epsilon)
   3670 {
   3671     static const char method_name[] = "ml::setTermCriteria_10()";
   3672     try {
   3673         LOGD("%s", method_name);
   3674         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3675         TermCriteria val(val_type, val_maxCount, val_epsilon);
   3676         (*me)->setTermCriteria( val );
   3677         return;
   3678     } catch(const std::exception &e) {
   3679         throwJavaException(env, &e, method_name);
   3680     } catch (...) {
   3681         throwJavaException(env, 0, method_name);
   3682     }
   3683     return;
   3684 }
   3685 
   3686 
   3687 
   3688 //
   3689 //  double getBackpropWeightScale()
   3690 //
   3691 
   3692 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getBackpropWeightScale_10 (JNIEnv*, jclass, jlong);
   3693 
   3694 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getBackpropWeightScale_10
   3695   (JNIEnv* env, jclass , jlong self)
   3696 {
   3697     static const char method_name[] = "ml::getBackpropWeightScale_10()";
   3698     try {
   3699         LOGD("%s", method_name);
   3700         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3701         double _retval_ = (*me)->getBackpropWeightScale(  );
   3702         return _retval_;
   3703     } catch(const std::exception &e) {
   3704         throwJavaException(env, &e, method_name);
   3705     } catch (...) {
   3706         throwJavaException(env, 0, method_name);
   3707     }
   3708     return 0;
   3709 }
   3710 
   3711 
   3712 
   3713 //
   3714 //  void setBackpropWeightScale(double val)
   3715 //
   3716 
   3717 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setBackpropWeightScale_10 (JNIEnv*, jclass, jlong, jdouble);
   3718 
   3719 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setBackpropWeightScale_10
   3720   (JNIEnv* env, jclass , jlong self, jdouble val)
   3721 {
   3722     static const char method_name[] = "ml::setBackpropWeightScale_10()";
   3723     try {
   3724         LOGD("%s", method_name);
   3725         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3726         (*me)->setBackpropWeightScale( (double)val );
   3727         return;
   3728     } catch(const std::exception &e) {
   3729         throwJavaException(env, &e, method_name);
   3730     } catch (...) {
   3731         throwJavaException(env, 0, method_name);
   3732     }
   3733     return;
   3734 }
   3735 
   3736 
   3737 
   3738 //
   3739 //  double getBackpropMomentumScale()
   3740 //
   3741 
   3742 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getBackpropMomentumScale_10 (JNIEnv*, jclass, jlong);
   3743 
   3744 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getBackpropMomentumScale_10
   3745   (JNIEnv* env, jclass , jlong self)
   3746 {
   3747     static const char method_name[] = "ml::getBackpropMomentumScale_10()";
   3748     try {
   3749         LOGD("%s", method_name);
   3750         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3751         double _retval_ = (*me)->getBackpropMomentumScale(  );
   3752         return _retval_;
   3753     } catch(const std::exception &e) {
   3754         throwJavaException(env, &e, method_name);
   3755     } catch (...) {
   3756         throwJavaException(env, 0, method_name);
   3757     }
   3758     return 0;
   3759 }
   3760 
   3761 
   3762 
   3763 //
   3764 //  void setBackpropMomentumScale(double val)
   3765 //
   3766 
   3767 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setBackpropMomentumScale_10 (JNIEnv*, jclass, jlong, jdouble);
   3768 
   3769 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setBackpropMomentumScale_10
   3770   (JNIEnv* env, jclass , jlong self, jdouble val)
   3771 {
   3772     static const char method_name[] = "ml::setBackpropMomentumScale_10()";
   3773     try {
   3774         LOGD("%s", method_name);
   3775         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3776         (*me)->setBackpropMomentumScale( (double)val );
   3777         return;
   3778     } catch(const std::exception &e) {
   3779         throwJavaException(env, &e, method_name);
   3780     } catch (...) {
   3781         throwJavaException(env, 0, method_name);
   3782     }
   3783     return;
   3784 }
   3785 
   3786 
   3787 
   3788 //
   3789 //  double getRpropDW0()
   3790 //
   3791 
   3792 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDW0_10 (JNIEnv*, jclass, jlong);
   3793 
   3794 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDW0_10
   3795   (JNIEnv* env, jclass , jlong self)
   3796 {
   3797     static const char method_name[] = "ml::getRpropDW0_10()";
   3798     try {
   3799         LOGD("%s", method_name);
   3800         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3801         double _retval_ = (*me)->getRpropDW0(  );
   3802         return _retval_;
   3803     } catch(const std::exception &e) {
   3804         throwJavaException(env, &e, method_name);
   3805     } catch (...) {
   3806         throwJavaException(env, 0, method_name);
   3807     }
   3808     return 0;
   3809 }
   3810 
   3811 
   3812 
   3813 //
   3814 //  void setRpropDW0(double val)
   3815 //
   3816 
   3817 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDW0_10 (JNIEnv*, jclass, jlong, jdouble);
   3818 
   3819 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDW0_10
   3820   (JNIEnv* env, jclass , jlong self, jdouble val)
   3821 {
   3822     static const char method_name[] = "ml::setRpropDW0_10()";
   3823     try {
   3824         LOGD("%s", method_name);
   3825         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3826         (*me)->setRpropDW0( (double)val );
   3827         return;
   3828     } catch(const std::exception &e) {
   3829         throwJavaException(env, &e, method_name);
   3830     } catch (...) {
   3831         throwJavaException(env, 0, method_name);
   3832     }
   3833     return;
   3834 }
   3835 
   3836 
   3837 
   3838 //
   3839 //  double getRpropDWPlus()
   3840 //
   3841 
   3842 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWPlus_10 (JNIEnv*, jclass, jlong);
   3843 
   3844 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWPlus_10
   3845   (JNIEnv* env, jclass , jlong self)
   3846 {
   3847     static const char method_name[] = "ml::getRpropDWPlus_10()";
   3848     try {
   3849         LOGD("%s", method_name);
   3850         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3851         double _retval_ = (*me)->getRpropDWPlus(  );
   3852         return _retval_;
   3853     } catch(const std::exception &e) {
   3854         throwJavaException(env, &e, method_name);
   3855     } catch (...) {
   3856         throwJavaException(env, 0, method_name);
   3857     }
   3858     return 0;
   3859 }
   3860 
   3861 
   3862 
   3863 //
   3864 //  void setRpropDWPlus(double val)
   3865 //
   3866 
   3867 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWPlus_10 (JNIEnv*, jclass, jlong, jdouble);
   3868 
   3869 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWPlus_10
   3870   (JNIEnv* env, jclass , jlong self, jdouble val)
   3871 {
   3872     static const char method_name[] = "ml::setRpropDWPlus_10()";
   3873     try {
   3874         LOGD("%s", method_name);
   3875         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3876         (*me)->setRpropDWPlus( (double)val );
   3877         return;
   3878     } catch(const std::exception &e) {
   3879         throwJavaException(env, &e, method_name);
   3880     } catch (...) {
   3881         throwJavaException(env, 0, method_name);
   3882     }
   3883     return;
   3884 }
   3885 
   3886 
   3887 
   3888 //
   3889 //  double getRpropDWMinus()
   3890 //
   3891 
   3892 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMinus_10 (JNIEnv*, jclass, jlong);
   3893 
   3894 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMinus_10
   3895   (JNIEnv* env, jclass , jlong self)
   3896 {
   3897     static const char method_name[] = "ml::getRpropDWMinus_10()";
   3898     try {
   3899         LOGD("%s", method_name);
   3900         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3901         double _retval_ = (*me)->getRpropDWMinus(  );
   3902         return _retval_;
   3903     } catch(const std::exception &e) {
   3904         throwJavaException(env, &e, method_name);
   3905     } catch (...) {
   3906         throwJavaException(env, 0, method_name);
   3907     }
   3908     return 0;
   3909 }
   3910 
   3911 
   3912 
   3913 //
   3914 //  void setRpropDWMinus(double val)
   3915 //
   3916 
   3917 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMinus_10 (JNIEnv*, jclass, jlong, jdouble);
   3918 
   3919 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMinus_10
   3920   (JNIEnv* env, jclass , jlong self, jdouble val)
   3921 {
   3922     static const char method_name[] = "ml::setRpropDWMinus_10()";
   3923     try {
   3924         LOGD("%s", method_name);
   3925         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3926         (*me)->setRpropDWMinus( (double)val );
   3927         return;
   3928     } catch(const std::exception &e) {
   3929         throwJavaException(env, &e, method_name);
   3930     } catch (...) {
   3931         throwJavaException(env, 0, method_name);
   3932     }
   3933     return;
   3934 }
   3935 
   3936 
   3937 
   3938 //
   3939 //  double getRpropDWMin()
   3940 //
   3941 
   3942 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMin_10 (JNIEnv*, jclass, jlong);
   3943 
   3944 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMin_10
   3945   (JNIEnv* env, jclass , jlong self)
   3946 {
   3947     static const char method_name[] = "ml::getRpropDWMin_10()";
   3948     try {
   3949         LOGD("%s", method_name);
   3950         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3951         double _retval_ = (*me)->getRpropDWMin(  );
   3952         return _retval_;
   3953     } catch(const std::exception &e) {
   3954         throwJavaException(env, &e, method_name);
   3955     } catch (...) {
   3956         throwJavaException(env, 0, method_name);
   3957     }
   3958     return 0;
   3959 }
   3960 
   3961 
   3962 
   3963 //
   3964 //  void setRpropDWMin(double val)
   3965 //
   3966 
   3967 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMin_10 (JNIEnv*, jclass, jlong, jdouble);
   3968 
   3969 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMin_10
   3970   (JNIEnv* env, jclass , jlong self, jdouble val)
   3971 {
   3972     static const char method_name[] = "ml::setRpropDWMin_10()";
   3973     try {
   3974         LOGD("%s", method_name);
   3975         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   3976         (*me)->setRpropDWMin( (double)val );
   3977         return;
   3978     } catch(const std::exception &e) {
   3979         throwJavaException(env, &e, method_name);
   3980     } catch (...) {
   3981         throwJavaException(env, 0, method_name);
   3982     }
   3983     return;
   3984 }
   3985 
   3986 
   3987 
   3988 //
   3989 //  double getRpropDWMax()
   3990 //
   3991 
   3992 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMax_10 (JNIEnv*, jclass, jlong);
   3993 
   3994 JNIEXPORT jdouble JNICALL Java_org_opencv_ml_ANN_1MLP_getRpropDWMax_10
   3995   (JNIEnv* env, jclass , jlong self)
   3996 {
   3997     static const char method_name[] = "ml::getRpropDWMax_10()";
   3998     try {
   3999         LOGD("%s", method_name);
   4000         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   4001         double _retval_ = (*me)->getRpropDWMax(  );
   4002         return _retval_;
   4003     } catch(const std::exception &e) {
   4004         throwJavaException(env, &e, method_name);
   4005     } catch (...) {
   4006         throwJavaException(env, 0, method_name);
   4007     }
   4008     return 0;
   4009 }
   4010 
   4011 
   4012 
   4013 //
   4014 //  void setRpropDWMax(double val)
   4015 //
   4016 
   4017 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMax_10 (JNIEnv*, jclass, jlong, jdouble);
   4018 
   4019 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_setRpropDWMax_10
   4020   (JNIEnv* env, jclass , jlong self, jdouble val)
   4021 {
   4022     static const char method_name[] = "ml::setRpropDWMax_10()";
   4023     try {
   4024         LOGD("%s", method_name);
   4025         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   4026         (*me)->setRpropDWMax( (double)val );
   4027         return;
   4028     } catch(const std::exception &e) {
   4029         throwJavaException(env, &e, method_name);
   4030     } catch (...) {
   4031         throwJavaException(env, 0, method_name);
   4032     }
   4033     return;
   4034 }
   4035 
   4036 
   4037 
   4038 //
   4039 //  Mat getWeights(int layerIdx)
   4040 //
   4041 
   4042 JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_getWeights_10 (JNIEnv*, jclass, jlong, jint);
   4043 
   4044 JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_getWeights_10
   4045   (JNIEnv* env, jclass , jlong self, jint layerIdx)
   4046 {
   4047     static const char method_name[] = "ml::getWeights_10()";
   4048     try {
   4049         LOGD("%s", method_name);
   4050         Ptr<cv::ml::ANN_MLP>* me = (Ptr<cv::ml::ANN_MLP>*) self; //TODO: check for NULL
   4051         ::Mat _retval_ = (*me)->getWeights( (int)layerIdx );
   4052         return (jlong) new ::Mat(_retval_);
   4053     } catch(const std::exception &e) {
   4054         throwJavaException(env, &e, method_name);
   4055     } catch (...) {
   4056         throwJavaException(env, 0, method_name);
   4057     }
   4058     return 0;
   4059 }
   4060 
   4061 
   4062 
   4063 //
   4064 // static Ptr_ANN_MLP create()
   4065 //
   4066 
   4067 JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_create_10 (JNIEnv*, jclass);
   4068 
   4069 JNIEXPORT jlong JNICALL Java_org_opencv_ml_ANN_1MLP_create_10
   4070   (JNIEnv* env, jclass )
   4071 {
   4072     static const char method_name[] = "ml::create_10()";
   4073     try {
   4074         LOGD("%s", method_name);
   4075         typedef Ptr<cv::ml::ANN_MLP> Ptr_ANN_MLP;
   4076         Ptr_ANN_MLP _retval_ = cv::ml::ANN_MLP::create(  );
   4077         return (jlong)(new Ptr_ANN_MLP(_retval_));
   4078     } catch(const std::exception &e) {
   4079         throwJavaException(env, &e, method_name);
   4080     } catch (...) {
   4081         throwJavaException(env, 0, method_name);
   4082     }
   4083     return 0;
   4084 }
   4085 
   4086 
   4087 
   4088 //
   4089 //  native support for java finalize()
   4090 //  static void Ptr<cv::ml::ANN_MLP>::delete( __int64 self )
   4091 //
   4092 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_delete(JNIEnv*, jclass, jlong);
   4093 
   4094 JNIEXPORT void JNICALL Java_org_opencv_ml_ANN_1MLP_delete
   4095   (JNIEnv*, jclass, jlong self)
   4096 {
   4097     delete (Ptr<cv::ml::ANN_MLP>*) self;
   4098 }
   4099 
   4100 
   4101 //
   4102 //  int getVarCount()
   4103 //
   4104 
   4105 JNIEXPORT jint JNICALL Java_org_opencv_ml_StatModel_getVarCount_10 (JNIEnv*, jclass, jlong);
   4106 
   4107 JNIEXPORT jint JNICALL Java_org_opencv_ml_StatModel_getVarCount_10
   4108   (JNIEnv* env, jclass , jlong self)
   4109 {
   4110     static const char method_name[] = "ml::getVarCount_10()";
   4111     try {
   4112         LOGD("%s", method_name);
   4113         Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
   4114         int _retval_ = (*me)->getVarCount(  );
   4115         return _retval_;
   4116     } catch(const std::exception &e) {
   4117         throwJavaException(env, &e, method_name);
   4118     } catch (...) {
   4119         throwJavaException(env, 0, method_name);
   4120     }
   4121     return 0;
   4122 }
   4123 
   4124 
   4125 
   4126 //
   4127 //  bool empty()
   4128 //
   4129 
   4130 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_empty_10 (JNIEnv*, jclass, jlong);
   4131 
   4132 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_empty_10
   4133   (JNIEnv* env, jclass , jlong self)
   4134 {
   4135     static const char method_name[] = "ml::empty_10()";
   4136     try {
   4137         LOGD("%s", method_name);
   4138         Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
   4139         bool _retval_ = (*me)->empty(  );
   4140         return _retval_;
   4141     } catch(const std::exception &e) {
   4142         throwJavaException(env, &e, method_name);
   4143     } catch (...) {
   4144         throwJavaException(env, 0, method_name);
   4145     }
   4146     return 0;
   4147 }
   4148 
   4149 
   4150 
   4151 //
   4152 //  bool isTrained()
   4153 //
   4154 
   4155 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_isTrained_10 (JNIEnv*, jclass, jlong);
   4156 
   4157 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_isTrained_10
   4158   (JNIEnv* env, jclass , jlong self)
   4159 {
   4160     static const char method_name[] = "ml::isTrained_10()";
   4161     try {
   4162         LOGD("%s", method_name);
   4163         Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
   4164         bool _retval_ = (*me)->isTrained(  );
   4165         return _retval_;
   4166     } catch(const std::exception &e) {
   4167         throwJavaException(env, &e, method_name);
   4168     } catch (...) {
   4169         throwJavaException(env, 0, method_name);
   4170     }
   4171     return 0;
   4172 }
   4173 
   4174 
   4175 
   4176 //
   4177 //  bool isClassifier()
   4178 //
   4179 
   4180 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_isClassifier_10 (JNIEnv*, jclass, jlong);
   4181 
   4182 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_isClassifier_10
   4183   (JNIEnv* env, jclass , jlong self)
   4184 {
   4185     static const char method_name[] = "ml::isClassifier_10()";
   4186     try {
   4187         LOGD("%s", method_name);
   4188         Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
   4189         bool _retval_ = (*me)->isClassifier(  );
   4190         return _retval_;
   4191     } catch(const std::exception &e) {
   4192         throwJavaException(env, &e, method_name);
   4193     } catch (...) {
   4194         throwJavaException(env, 0, method_name);
   4195     }
   4196     return 0;
   4197 }
   4198 
   4199 
   4200 
   4201 //
   4202 //  bool train(Mat samples, int layout, Mat responses)
   4203 //
   4204 
   4205 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_train_10 (JNIEnv*, jclass, jlong, jlong, jint, jlong);
   4206 
   4207 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_StatModel_train_10
   4208   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jint layout, jlong responses_nativeObj)
   4209 {
   4210     static const char method_name[] = "ml::train_10()";
   4211     try {
   4212         LOGD("%s", method_name);
   4213         Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
   4214         Mat& samples = *((Mat*)samples_nativeObj);
   4215         Mat& responses = *((Mat*)responses_nativeObj);
   4216         bool _retval_ = (*me)->train( samples, (int)layout, responses );
   4217         return _retval_;
   4218     } catch(const std::exception &e) {
   4219         throwJavaException(env, &e, method_name);
   4220     } catch (...) {
   4221         throwJavaException(env, 0, method_name);
   4222     }
   4223     return 0;
   4224 }
   4225 
   4226 
   4227 
   4228 //
   4229 //  float predict(Mat samples, Mat& results = Mat(), int flags = 0)
   4230 //
   4231 
   4232 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_StatModel_predict_10 (JNIEnv*, jclass, jlong, jlong, jlong, jint);
   4233 
   4234 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_StatModel_predict_10
   4235   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj, jlong results_nativeObj, jint flags)
   4236 {
   4237     static const char method_name[] = "ml::predict_10()";
   4238     try {
   4239         LOGD("%s", method_name);
   4240         Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
   4241         Mat& samples = *((Mat*)samples_nativeObj);
   4242         Mat& results = *((Mat*)results_nativeObj);
   4243         float _retval_ = (*me)->predict( samples, results, (int)flags );
   4244         return _retval_;
   4245     } catch(const std::exception &e) {
   4246         throwJavaException(env, &e, method_name);
   4247     } catch (...) {
   4248         throwJavaException(env, 0, method_name);
   4249     }
   4250     return 0;
   4251 }
   4252 
   4253 
   4254 
   4255 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_StatModel_predict_11 (JNIEnv*, jclass, jlong, jlong);
   4256 
   4257 JNIEXPORT jfloat JNICALL Java_org_opencv_ml_StatModel_predict_11
   4258   (JNIEnv* env, jclass , jlong self, jlong samples_nativeObj)
   4259 {
   4260     static const char method_name[] = "ml::predict_11()";
   4261     try {
   4262         LOGD("%s", method_name);
   4263         Ptr<cv::ml::StatModel>* me = (Ptr<cv::ml::StatModel>*) self; //TODO: check for NULL
   4264         Mat& samples = *((Mat*)samples_nativeObj);
   4265         float _retval_ = (*me)->predict( samples );
   4266         return _retval_;
   4267     } catch(const std::exception &e) {
   4268         throwJavaException(env, &e, method_name);
   4269     } catch (...) {
   4270         throwJavaException(env, 0, method_name);
   4271     }
   4272     return 0;
   4273 }
   4274 
   4275 
   4276 
   4277 //
   4278 //  native support for java finalize()
   4279 //  static void Ptr<cv::ml::StatModel>::delete( __int64 self )
   4280 //
   4281 JNIEXPORT void JNICALL Java_org_opencv_ml_StatModel_delete(JNIEnv*, jclass, jlong);
   4282 
   4283 JNIEXPORT void JNICALL Java_org_opencv_ml_StatModel_delete
   4284   (JNIEnv*, jclass, jlong self)
   4285 {
   4286     delete (Ptr<cv::ml::StatModel>*) self;
   4287 }
   4288 
   4289 
   4290 //
   4291 //  bool getCalculateVarImportance()
   4292 //
   4293 
   4294 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_RTrees_getCalculateVarImportance_10 (JNIEnv*, jclass, jlong);
   4295 
   4296 JNIEXPORT jboolean JNICALL Java_org_opencv_ml_RTrees_getCalculateVarImportance_10
   4297   (JNIEnv* env, jclass , jlong self)
   4298 {
   4299     static const char method_name[] = "ml::getCalculateVarImportance_10()";
   4300     try {
   4301         LOGD("%s", method_name);
   4302         Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
   4303         bool _retval_ = (*me)->getCalculateVarImportance(  );
   4304         return _retval_;
   4305     } catch(const std::exception &e) {
   4306         throwJavaException(env, &e, method_name);
   4307     } catch (...) {
   4308         throwJavaException(env, 0, method_name);
   4309     }
   4310     return 0;
   4311 }
   4312 
   4313 
   4314 
   4315 //
   4316 //  void setCalculateVarImportance(bool val)
   4317 //
   4318 
   4319 JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setCalculateVarImportance_10 (JNIEnv*, jclass, jlong, jboolean);
   4320 
   4321 JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setCalculateVarImportance_10
   4322   (JNIEnv* env, jclass , jlong self, jboolean val)
   4323 {
   4324     static const char method_name[] = "ml::setCalculateVarImportance_10()";
   4325     try {
   4326         LOGD("%s", method_name);
   4327         Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
   4328         (*me)->setCalculateVarImportance( (bool)val );
   4329         return;
   4330     } catch(const std::exception &e) {
   4331         throwJavaException(env, &e, method_name);
   4332     } catch (...) {
   4333         throwJavaException(env, 0, method_name);
   4334     }
   4335     return;
   4336 }
   4337 
   4338 
   4339 
   4340 //
   4341 //  int getActiveVarCount()
   4342 //
   4343 
   4344 JNIEXPORT jint JNICALL Java_org_opencv_ml_RTrees_getActiveVarCount_10 (JNIEnv*, jclass, jlong);
   4345 
   4346 JNIEXPORT jint JNICALL Java_org_opencv_ml_RTrees_getActiveVarCount_10
   4347   (JNIEnv* env, jclass , jlong self)
   4348 {
   4349     static const char method_name[] = "ml::getActiveVarCount_10()";
   4350     try {
   4351         LOGD("%s", method_name);
   4352         Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
   4353         int _retval_ = (*me)->getActiveVarCount(  );
   4354         return _retval_;
   4355     } catch(const std::exception &e) {
   4356         throwJavaException(env, &e, method_name);
   4357     } catch (...) {
   4358         throwJavaException(env, 0, method_name);
   4359     }
   4360     return 0;
   4361 }
   4362 
   4363 
   4364 
   4365 //
   4366 //  void setActiveVarCount(int val)
   4367 //
   4368 
   4369 JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setActiveVarCount_10 (JNIEnv*, jclass, jlong, jint);
   4370 
   4371 JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setActiveVarCount_10
   4372   (JNIEnv* env, jclass , jlong self, jint val)
   4373 {
   4374     static const char method_name[] = "ml::setActiveVarCount_10()";
   4375     try {
   4376         LOGD("%s", method_name);
   4377         Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
   4378         (*me)->setActiveVarCount( (int)val );
   4379         return;
   4380     } catch(const std::exception &e) {
   4381         throwJavaException(env, &e, method_name);
   4382     } catch (...) {
   4383         throwJavaException(env, 0, method_name);
   4384     }
   4385     return;
   4386 }
   4387 
   4388 
   4389 
   4390 //
   4391 //  TermCriteria getTermCriteria()
   4392 //
   4393 
   4394 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_RTrees_getTermCriteria_10 (JNIEnv*, jclass, jlong);
   4395 
   4396 JNIEXPORT jdoubleArray JNICALL Java_org_opencv_ml_RTrees_getTermCriteria_10
   4397   (JNIEnv* env, jclass , jlong self)
   4398 {
   4399     static const char method_name[] = "ml::getTermCriteria_10()";
   4400     try {
   4401         LOGD("%s", method_name);
   4402         Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
   4403         TermCriteria _retval_ = (*me)->getTermCriteria(  );
   4404         jdoubleArray _da_retval_ = env->NewDoubleArray(3);  jdouble _tmp_retval_[3] = {_retval_.type, _retval_.maxCount, _retval_.epsilon}; env->SetDoubleArrayRegion(_da_retval_, 0, 3, _tmp_retval_);
   4405         return _da_retval_;
   4406     } catch(const std::exception &e) {
   4407         throwJavaException(env, &e, method_name);
   4408     } catch (...) {
   4409         throwJavaException(env, 0, method_name);
   4410     }
   4411     return 0;
   4412 }
   4413 
   4414 
   4415 
   4416 //
   4417 //  void setTermCriteria(TermCriteria val)
   4418 //
   4419 
   4420 JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setTermCriteria_10 (JNIEnv*, jclass, jlong, jint, jint, jdouble);
   4421 
   4422 JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_setTermCriteria_10
   4423   (JNIEnv* env, jclass , jlong self, jint val_type, jint val_maxCount, jdouble val_epsilon)
   4424 {
   4425     static const char method_name[] = "ml::setTermCriteria_10()";
   4426     try {
   4427         LOGD("%s", method_name);
   4428         Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
   4429         TermCriteria val(val_type, val_maxCount, val_epsilon);
   4430         (*me)->setTermCriteria( val );
   4431         return;
   4432     } catch(const std::exception &e) {
   4433         throwJavaException(env, &e, method_name);
   4434     } catch (...) {
   4435         throwJavaException(env, 0, method_name);
   4436     }
   4437     return;
   4438 }
   4439 
   4440 
   4441 
   4442 //
   4443 //  Mat getVarImportance()
   4444 //
   4445 
   4446 JNIEXPORT jlong JNICALL Java_org_opencv_ml_RTrees_getVarImportance_10 (JNIEnv*, jclass, jlong);
   4447 
   4448 JNIEXPORT jlong JNICALL Java_org_opencv_ml_RTrees_getVarImportance_10
   4449   (JNIEnv* env, jclass , jlong self)
   4450 {
   4451     static const char method_name[] = "ml::getVarImportance_10()";
   4452     try {
   4453         LOGD("%s", method_name);
   4454         Ptr<cv::ml::RTrees>* me = (Ptr<cv::ml::RTrees>*) self; //TODO: check for NULL
   4455         ::Mat _retval_ = (*me)->getVarImportance(  );
   4456         return (jlong) new ::Mat(_retval_);
   4457     } catch(const std::exception &e) {
   4458         throwJavaException(env, &e, method_name);
   4459     } catch (...) {
   4460         throwJavaException(env, 0, method_name);
   4461     }
   4462     return 0;
   4463 }
   4464 
   4465 
   4466 
   4467 //
   4468 // static Ptr_RTrees create()
   4469 //
   4470 
   4471 JNIEXPORT jlong JNICALL Java_org_opencv_ml_RTrees_create_10 (JNIEnv*, jclass);
   4472 
   4473 JNIEXPORT jlong JNICALL Java_org_opencv_ml_RTrees_create_10
   4474   (JNIEnv* env, jclass )
   4475 {
   4476     static const char method_name[] = "ml::create_10()";
   4477     try {
   4478         LOGD("%s", method_name);
   4479         typedef Ptr<cv::ml::RTrees> Ptr_RTrees;
   4480         Ptr_RTrees _retval_ = cv::ml::RTrees::create(  );
   4481         return (jlong)(new Ptr_RTrees(_retval_));
   4482     } catch(const std::exception &e) {
   4483         throwJavaException(env, &e, method_name);
   4484     } catch (...) {
   4485         throwJavaException(env, 0, method_name);
   4486     }
   4487     return 0;
   4488 }
   4489 
   4490 
   4491 
   4492 //
   4493 //  native support for java finalize()
   4494 //  static void Ptr<cv::ml::RTrees>::delete( __int64 self )
   4495 //
   4496 JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_delete(JNIEnv*, jclass, jlong);
   4497 
   4498 JNIEXPORT void JNICALL Java_org_opencv_ml_RTrees_delete
   4499   (JNIEnv*, jclass, jlong self)
   4500 {
   4501     delete (Ptr<cv::ml::RTrees>*) self;
   4502 }
   4503 
   4504 
   4505 
   4506 } // extern "C"
   4507 
   4508 #endif // HAVE_OPENCV_ML
   4509