001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.ml;
005
006import java.util.ArrayList;
007import java.util.List;
008import org.opencv.core.Mat;
009import org.opencv.ml.TrainData;
010import org.opencv.utils.Converters;
011
012// C++: class TrainData
013/**
014 * Class encapsulating training data.
015 *
016 * Please note that the class only specifies the interface of training data, but not implementation.
017 * All the statistical model classes in _ml_ module accepts Ptr<TrainData> as parameter. In other
018 * words, you can create your own class derived from TrainData and pass smart pointer to the instance
019 * of this class into StatModel::train.
020 *
021 * SEE: REF: ml_intro_data
022 */
023public class TrainData {
024
025    protected final long nativeObj;
026    protected TrainData(long addr) { nativeObj = addr; }
027
028    public long getNativeObjAddr() { return nativeObj; }
029
030    // internal usage only
031    public static TrainData __fromPtr__(long addr) { return new TrainData(addr); }
032
033    //
034    // C++:  int cv::ml::TrainData::getLayout()
035    //
036
037    public int getLayout() {
038        return getLayout_0(nativeObj);
039    }
040
041
042    //
043    // C++:  int cv::ml::TrainData::getNTrainSamples()
044    //
045
046    public int getNTrainSamples() {
047        return getNTrainSamples_0(nativeObj);
048    }
049
050
051    //
052    // C++:  int cv::ml::TrainData::getNTestSamples()
053    //
054
055    public int getNTestSamples() {
056        return getNTestSamples_0(nativeObj);
057    }
058
059
060    //
061    // C++:  int cv::ml::TrainData::getNSamples()
062    //
063
064    public int getNSamples() {
065        return getNSamples_0(nativeObj);
066    }
067
068
069    //
070    // C++:  int cv::ml::TrainData::getNVars()
071    //
072
073    public int getNVars() {
074        return getNVars_0(nativeObj);
075    }
076
077
078    //
079    // C++:  int cv::ml::TrainData::getNAllVars()
080    //
081
082    public int getNAllVars() {
083        return getNAllVars_0(nativeObj);
084    }
085
086
087    //
088    // C++:  void cv::ml::TrainData::getSample(Mat varIdx, int sidx, float* buf)
089    //
090
091    public void getSample(Mat varIdx, int sidx, float buf) {
092        getSample_0(nativeObj, varIdx.nativeObj, sidx, buf);
093    }
094
095
096    //
097    // C++:  Mat cv::ml::TrainData::getSamples()
098    //
099
100    public Mat getSamples() {
101        return new Mat(getSamples_0(nativeObj));
102    }
103
104
105    //
106    // C++:  Mat cv::ml::TrainData::getMissing()
107    //
108
109    public Mat getMissing() {
110        return new Mat(getMissing_0(nativeObj));
111    }
112
113
114    //
115    // C++:  Mat cv::ml::TrainData::getTrainSamples(int layout = ROW_SAMPLE, bool compressSamples = true, bool compressVars = true)
116    //
117
118    /**
119     * Returns matrix of train samples
120     *
121     *     @param layout The requested layout. If it's different from the initial one, the matrix is
122     *         transposed. See ml::SampleTypes.
123     *     @param compressSamples if true, the function returns only the training samples (specified by
124     *         sampleIdx)
125     *     @param compressVars if true, the function returns the shorter training samples, containing only
126     *         the active variables.
127     *
128     *     In current implementation the function tries to avoid physical data copying and returns the
129     *     matrix stored inside TrainData (unless the transposition or compression is needed).
130     * @return automatically generated
131     */
132    public Mat getTrainSamples(int layout, boolean compressSamples, boolean compressVars) {
133        return new Mat(getTrainSamples_0(nativeObj, layout, compressSamples, compressVars));
134    }
135
136    /**
137     * Returns matrix of train samples
138     *
139     *     @param layout The requested layout. If it's different from the initial one, the matrix is
140     *         transposed. See ml::SampleTypes.
141     *     @param compressSamples if true, the function returns only the training samples (specified by
142     *         sampleIdx)
143     *         the active variables.
144     *
145     *     In current implementation the function tries to avoid physical data copying and returns the
146     *     matrix stored inside TrainData (unless the transposition or compression is needed).
147     * @return automatically generated
148     */
149    public Mat getTrainSamples(int layout, boolean compressSamples) {
150        return new Mat(getTrainSamples_1(nativeObj, layout, compressSamples));
151    }
152
153    /**
154     * Returns matrix of train samples
155     *
156     *     @param layout The requested layout. If it's different from the initial one, the matrix is
157     *         transposed. See ml::SampleTypes.
158     *         sampleIdx)
159     *         the active variables.
160     *
161     *     In current implementation the function tries to avoid physical data copying and returns the
162     *     matrix stored inside TrainData (unless the transposition or compression is needed).
163     * @return automatically generated
164     */
165    public Mat getTrainSamples(int layout) {
166        return new Mat(getTrainSamples_2(nativeObj, layout));
167    }
168
169    /**
170     * Returns matrix of train samples
171     *
172     *         transposed. See ml::SampleTypes.
173     *         sampleIdx)
174     *         the active variables.
175     *
176     *     In current implementation the function tries to avoid physical data copying and returns the
177     *     matrix stored inside TrainData (unless the transposition or compression is needed).
178     * @return automatically generated
179     */
180    public Mat getTrainSamples() {
181        return new Mat(getTrainSamples_3(nativeObj));
182    }
183
184
185    //
186    // C++:  Mat cv::ml::TrainData::getTrainResponses()
187    //
188
189    /**
190     * Returns the vector of responses
191     *
192     *     The function returns ordered or the original categorical responses. Usually it's used in
193     *     regression algorithms.
194     * @return automatically generated
195     */
196    public Mat getTrainResponses() {
197        return new Mat(getTrainResponses_0(nativeObj));
198    }
199
200
201    //
202    // C++:  Mat cv::ml::TrainData::getTrainNormCatResponses()
203    //
204
205    /**
206     * Returns the vector of normalized categorical responses
207     *
208     *     The function returns vector of responses. Each response is integer from {@code 0} to `<number of
209     *     classes>-1`. The actual label value can be retrieved then from the class label vector, see
210     *     TrainData::getClassLabels.
211     * @return automatically generated
212     */
213    public Mat getTrainNormCatResponses() {
214        return new Mat(getTrainNormCatResponses_0(nativeObj));
215    }
216
217
218    //
219    // C++:  Mat cv::ml::TrainData::getTestResponses()
220    //
221
222    public Mat getTestResponses() {
223        return new Mat(getTestResponses_0(nativeObj));
224    }
225
226
227    //
228    // C++:  Mat cv::ml::TrainData::getTestNormCatResponses()
229    //
230
231    public Mat getTestNormCatResponses() {
232        return new Mat(getTestNormCatResponses_0(nativeObj));
233    }
234
235
236    //
237    // C++:  Mat cv::ml::TrainData::getResponses()
238    //
239
240    public Mat getResponses() {
241        return new Mat(getResponses_0(nativeObj));
242    }
243
244
245    //
246    // C++:  Mat cv::ml::TrainData::getNormCatResponses()
247    //
248
249    public Mat getNormCatResponses() {
250        return new Mat(getNormCatResponses_0(nativeObj));
251    }
252
253
254    //
255    // C++:  Mat cv::ml::TrainData::getSampleWeights()
256    //
257
258    public Mat getSampleWeights() {
259        return new Mat(getSampleWeights_0(nativeObj));
260    }
261
262
263    //
264    // C++:  Mat cv::ml::TrainData::getTrainSampleWeights()
265    //
266
267    public Mat getTrainSampleWeights() {
268        return new Mat(getTrainSampleWeights_0(nativeObj));
269    }
270
271
272    //
273    // C++:  Mat cv::ml::TrainData::getTestSampleWeights()
274    //
275
276    public Mat getTestSampleWeights() {
277        return new Mat(getTestSampleWeights_0(nativeObj));
278    }
279
280
281    //
282    // C++:  Mat cv::ml::TrainData::getVarIdx()
283    //
284
285    public Mat getVarIdx() {
286        return new Mat(getVarIdx_0(nativeObj));
287    }
288
289
290    //
291    // C++:  Mat cv::ml::TrainData::getVarType()
292    //
293
294    public Mat getVarType() {
295        return new Mat(getVarType_0(nativeObj));
296    }
297
298
299    //
300    // C++:  Mat cv::ml::TrainData::getVarSymbolFlags()
301    //
302
303    public Mat getVarSymbolFlags() {
304        return new Mat(getVarSymbolFlags_0(nativeObj));
305    }
306
307
308    //
309    // C++:  int cv::ml::TrainData::getResponseType()
310    //
311
312    public int getResponseType() {
313        return getResponseType_0(nativeObj);
314    }
315
316
317    //
318    // C++:  Mat cv::ml::TrainData::getTrainSampleIdx()
319    //
320
321    public Mat getTrainSampleIdx() {
322        return new Mat(getTrainSampleIdx_0(nativeObj));
323    }
324
325
326    //
327    // C++:  Mat cv::ml::TrainData::getTestSampleIdx()
328    //
329
330    public Mat getTestSampleIdx() {
331        return new Mat(getTestSampleIdx_0(nativeObj));
332    }
333
334
335    //
336    // C++:  void cv::ml::TrainData::getValues(int vi, Mat sidx, float* values)
337    //
338
339    public void getValues(int vi, Mat sidx, float values) {
340        getValues_0(nativeObj, vi, sidx.nativeObj, values);
341    }
342
343
344    //
345    // C++:  Mat cv::ml::TrainData::getDefaultSubstValues()
346    //
347
348    public Mat getDefaultSubstValues() {
349        return new Mat(getDefaultSubstValues_0(nativeObj));
350    }
351
352
353    //
354    // C++:  int cv::ml::TrainData::getCatCount(int vi)
355    //
356
357    public int getCatCount(int vi) {
358        return getCatCount_0(nativeObj, vi);
359    }
360
361
362    //
363    // C++:  Mat cv::ml::TrainData::getClassLabels()
364    //
365
366    /**
367     * Returns the vector of class labels
368     *
369     *     The function returns vector of unique labels occurred in the responses.
370     * @return automatically generated
371     */
372    public Mat getClassLabels() {
373        return new Mat(getClassLabels_0(nativeObj));
374    }
375
376
377    //
378    // C++:  Mat cv::ml::TrainData::getCatOfs()
379    //
380
381    public Mat getCatOfs() {
382        return new Mat(getCatOfs_0(nativeObj));
383    }
384
385
386    //
387    // C++:  Mat cv::ml::TrainData::getCatMap()
388    //
389
390    public Mat getCatMap() {
391        return new Mat(getCatMap_0(nativeObj));
392    }
393
394
395    //
396    // C++:  void cv::ml::TrainData::setTrainTestSplit(int count, bool shuffle = true)
397    //
398
399    /**
400     * Splits the training data into the training and test parts
401     *     SEE: TrainData::setTrainTestSplitRatio
402     * @param count automatically generated
403     * @param shuffle automatically generated
404     */
405    public void setTrainTestSplit(int count, boolean shuffle) {
406        setTrainTestSplit_0(nativeObj, count, shuffle);
407    }
408
409    /**
410     * Splits the training data into the training and test parts
411     *     SEE: TrainData::setTrainTestSplitRatio
412     * @param count automatically generated
413     */
414    public void setTrainTestSplit(int count) {
415        setTrainTestSplit_1(nativeObj, count);
416    }
417
418
419    //
420    // C++:  void cv::ml::TrainData::setTrainTestSplitRatio(double ratio, bool shuffle = true)
421    //
422
423    /**
424     * Splits the training data into the training and test parts
425     *
426     *     The function selects a subset of specified relative size and then returns it as the training
427     *     set. If the function is not called, all the data is used for training. Please, note that for
428     *     each of TrainData::getTrain\* there is corresponding TrainData::getTest\*, so that the test
429     *     subset can be retrieved and processed as well.
430     *     SEE: TrainData::setTrainTestSplit
431     * @param ratio automatically generated
432     * @param shuffle automatically generated
433     */
434    public void setTrainTestSplitRatio(double ratio, boolean shuffle) {
435        setTrainTestSplitRatio_0(nativeObj, ratio, shuffle);
436    }
437
438    /**
439     * Splits the training data into the training and test parts
440     *
441     *     The function selects a subset of specified relative size and then returns it as the training
442     *     set. If the function is not called, all the data is used for training. Please, note that for
443     *     each of TrainData::getTrain\* there is corresponding TrainData::getTest\*, so that the test
444     *     subset can be retrieved and processed as well.
445     *     SEE: TrainData::setTrainTestSplit
446     * @param ratio automatically generated
447     */
448    public void setTrainTestSplitRatio(double ratio) {
449        setTrainTestSplitRatio_1(nativeObj, ratio);
450    }
451
452
453    //
454    // C++:  void cv::ml::TrainData::shuffleTrainTest()
455    //
456
457    public void shuffleTrainTest() {
458        shuffleTrainTest_0(nativeObj);
459    }
460
461
462    //
463    // C++:  Mat cv::ml::TrainData::getTestSamples()
464    //
465
466    /**
467     * Returns matrix of test samples
468     * @return automatically generated
469     */
470    public Mat getTestSamples() {
471        return new Mat(getTestSamples_0(nativeObj));
472    }
473
474
475    //
476    // C++:  void cv::ml::TrainData::getNames(vector_String names)
477    //
478
479    /**
480     * Returns vector of symbolic names captured in loadFromCSV()
481     * @param names automatically generated
482     */
483    public void getNames(List<String> names) {
484        getNames_0(nativeObj, names);
485    }
486
487
488    //
489    // C++: static Mat cv::ml::TrainData::getSubVector(Mat vec, Mat idx)
490    //
491
492    /**
493     * Extract from 1D vector elements specified by passed indexes.
494     *     @param vec input vector (supported types: CV_32S, CV_32F, CV_64F)
495     *     @param idx 1D index vector
496     * @return automatically generated
497     */
498    public static Mat getSubVector(Mat vec, Mat idx) {
499        return new Mat(getSubVector_0(vec.nativeObj, idx.nativeObj));
500    }
501
502
503    //
504    // C++: static Mat cv::ml::TrainData::getSubMatrix(Mat matrix, Mat idx, int layout)
505    //
506
507    /**
508     * Extract from matrix rows/cols specified by passed indexes.
509     *     @param matrix input matrix (supported types: CV_32S, CV_32F, CV_64F)
510     *     @param idx 1D index vector
511     *     @param layout specifies to extract rows (cv::ml::ROW_SAMPLES) or to extract columns (cv::ml::COL_SAMPLES)
512     * @return automatically generated
513     */
514    public static Mat getSubMatrix(Mat matrix, Mat idx, int layout) {
515        return new Mat(getSubMatrix_0(matrix.nativeObj, idx.nativeObj, layout));
516    }
517
518
519    //
520    // C++: static Ptr_TrainData cv::ml::TrainData::create(Mat samples, int layout, Mat responses, Mat varIdx = Mat(), Mat sampleIdx = Mat(), Mat sampleWeights = Mat(), Mat varType = Mat())
521    //
522
523    /**
524     * Creates training data from in-memory arrays.
525     *
526     *     @param samples matrix of samples. It should have CV_32F type.
527     *     @param layout see ml::SampleTypes.
528     *     @param responses matrix of responses. If the responses are scalar, they should be stored as a
529     *         single row or as a single column. The matrix should have type CV_32F or CV_32S (in the
530     *         former case the responses are considered as ordered by default; in the latter case - as
531     *         categorical)
532     *     @param varIdx vector specifying which variables to use for training. It can be an integer vector
533     *         (CV_32S) containing 0-based variable indices or byte vector (CV_8U) containing a mask of
534     *         active variables.
535     *     @param sampleIdx vector specifying which samples to use for training. It can be an integer
536     *         vector (CV_32S) containing 0-based sample indices or byte vector (CV_8U) containing a mask
537     *         of training samples.
538     *     @param sampleWeights optional vector with weights for each sample. It should have CV_32F type.
539     *     @param varType optional vector of type CV_8U and size `&lt;number_of_variables_in_samples&gt; +
540     *         &lt;number_of_variables_in_responses&gt;`, containing types of each input and output variable. See
541     *         ml::VariableTypes.
542     * @return automatically generated
543     */
544    public static TrainData create(Mat samples, int layout, Mat responses, Mat varIdx, Mat sampleIdx, Mat sampleWeights, Mat varType) {
545        return TrainData.__fromPtr__(create_0(samples.nativeObj, layout, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, sampleWeights.nativeObj, varType.nativeObj));
546    }
547
548    /**
549     * Creates training data from in-memory arrays.
550     *
551     *     @param samples matrix of samples. It should have CV_32F type.
552     *     @param layout see ml::SampleTypes.
553     *     @param responses matrix of responses. If the responses are scalar, they should be stored as a
554     *         single row or as a single column. The matrix should have type CV_32F or CV_32S (in the
555     *         former case the responses are considered as ordered by default; in the latter case - as
556     *         categorical)
557     *     @param varIdx vector specifying which variables to use for training. It can be an integer vector
558     *         (CV_32S) containing 0-based variable indices or byte vector (CV_8U) containing a mask of
559     *         active variables.
560     *     @param sampleIdx vector specifying which samples to use for training. It can be an integer
561     *         vector (CV_32S) containing 0-based sample indices or byte vector (CV_8U) containing a mask
562     *         of training samples.
563     *     @param sampleWeights optional vector with weights for each sample. It should have CV_32F type.
564     *         &lt;number_of_variables_in_responses&gt;`, containing types of each input and output variable. See
565     *         ml::VariableTypes.
566     * @return automatically generated
567     */
568    public static TrainData create(Mat samples, int layout, Mat responses, Mat varIdx, Mat sampleIdx, Mat sampleWeights) {
569        return TrainData.__fromPtr__(create_1(samples.nativeObj, layout, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj, sampleWeights.nativeObj));
570    }
571
572    /**
573     * Creates training data from in-memory arrays.
574     *
575     *     @param samples matrix of samples. It should have CV_32F type.
576     *     @param layout see ml::SampleTypes.
577     *     @param responses matrix of responses. If the responses are scalar, they should be stored as a
578     *         single row or as a single column. The matrix should have type CV_32F or CV_32S (in the
579     *         former case the responses are considered as ordered by default; in the latter case - as
580     *         categorical)
581     *     @param varIdx vector specifying which variables to use for training. It can be an integer vector
582     *         (CV_32S) containing 0-based variable indices or byte vector (CV_8U) containing a mask of
583     *         active variables.
584     *     @param sampleIdx vector specifying which samples to use for training. It can be an integer
585     *         vector (CV_32S) containing 0-based sample indices or byte vector (CV_8U) containing a mask
586     *         of training samples.
587     *         &lt;number_of_variables_in_responses&gt;`, containing types of each input and output variable. See
588     *         ml::VariableTypes.
589     * @return automatically generated
590     */
591    public static TrainData create(Mat samples, int layout, Mat responses, Mat varIdx, Mat sampleIdx) {
592        return TrainData.__fromPtr__(create_2(samples.nativeObj, layout, responses.nativeObj, varIdx.nativeObj, sampleIdx.nativeObj));
593    }
594
595    /**
596     * Creates training data from in-memory arrays.
597     *
598     *     @param samples matrix of samples. It should have CV_32F type.
599     *     @param layout see ml::SampleTypes.
600     *     @param responses matrix of responses. If the responses are scalar, they should be stored as a
601     *         single row or as a single column. The matrix should have type CV_32F or CV_32S (in the
602     *         former case the responses are considered as ordered by default; in the latter case - as
603     *         categorical)
604     *     @param varIdx vector specifying which variables to use for training. It can be an integer vector
605     *         (CV_32S) containing 0-based variable indices or byte vector (CV_8U) containing a mask of
606     *         active variables.
607     *         vector (CV_32S) containing 0-based sample indices or byte vector (CV_8U) containing a mask
608     *         of training samples.
609     *         &lt;number_of_variables_in_responses&gt;`, containing types of each input and output variable. See
610     *         ml::VariableTypes.
611     * @return automatically generated
612     */
613    public static TrainData create(Mat samples, int layout, Mat responses, Mat varIdx) {
614        return TrainData.__fromPtr__(create_3(samples.nativeObj, layout, responses.nativeObj, varIdx.nativeObj));
615    }
616
617    /**
618     * Creates training data from in-memory arrays.
619     *
620     *     @param samples matrix of samples. It should have CV_32F type.
621     *     @param layout see ml::SampleTypes.
622     *     @param responses matrix of responses. If the responses are scalar, they should be stored as a
623     *         single row or as a single column. The matrix should have type CV_32F or CV_32S (in the
624     *         former case the responses are considered as ordered by default; in the latter case - as
625     *         categorical)
626     *         (CV_32S) containing 0-based variable indices or byte vector (CV_8U) containing a mask of
627     *         active variables.
628     *         vector (CV_32S) containing 0-based sample indices or byte vector (CV_8U) containing a mask
629     *         of training samples.
630     *         &lt;number_of_variables_in_responses&gt;`, containing types of each input and output variable. See
631     *         ml::VariableTypes.
632     * @return automatically generated
633     */
634    public static TrainData create(Mat samples, int layout, Mat responses) {
635        return TrainData.__fromPtr__(create_4(samples.nativeObj, layout, responses.nativeObj));
636    }
637
638
639    @Override
640    protected void finalize() throws Throwable {
641        delete(nativeObj);
642    }
643
644
645
646    // C++:  int cv::ml::TrainData::getLayout()
647    private static native int getLayout_0(long nativeObj);
648
649    // C++:  int cv::ml::TrainData::getNTrainSamples()
650    private static native int getNTrainSamples_0(long nativeObj);
651
652    // C++:  int cv::ml::TrainData::getNTestSamples()
653    private static native int getNTestSamples_0(long nativeObj);
654
655    // C++:  int cv::ml::TrainData::getNSamples()
656    private static native int getNSamples_0(long nativeObj);
657
658    // C++:  int cv::ml::TrainData::getNVars()
659    private static native int getNVars_0(long nativeObj);
660
661    // C++:  int cv::ml::TrainData::getNAllVars()
662    private static native int getNAllVars_0(long nativeObj);
663
664    // C++:  void cv::ml::TrainData::getSample(Mat varIdx, int sidx, float* buf)
665    private static native void getSample_0(long nativeObj, long varIdx_nativeObj, int sidx, float buf);
666
667    // C++:  Mat cv::ml::TrainData::getSamples()
668    private static native long getSamples_0(long nativeObj);
669
670    // C++:  Mat cv::ml::TrainData::getMissing()
671    private static native long getMissing_0(long nativeObj);
672
673    // C++:  Mat cv::ml::TrainData::getTrainSamples(int layout = ROW_SAMPLE, bool compressSamples = true, bool compressVars = true)
674    private static native long getTrainSamples_0(long nativeObj, int layout, boolean compressSamples, boolean compressVars);
675    private static native long getTrainSamples_1(long nativeObj, int layout, boolean compressSamples);
676    private static native long getTrainSamples_2(long nativeObj, int layout);
677    private static native long getTrainSamples_3(long nativeObj);
678
679    // C++:  Mat cv::ml::TrainData::getTrainResponses()
680    private static native long getTrainResponses_0(long nativeObj);
681
682    // C++:  Mat cv::ml::TrainData::getTrainNormCatResponses()
683    private static native long getTrainNormCatResponses_0(long nativeObj);
684
685    // C++:  Mat cv::ml::TrainData::getTestResponses()
686    private static native long getTestResponses_0(long nativeObj);
687
688    // C++:  Mat cv::ml::TrainData::getTestNormCatResponses()
689    private static native long getTestNormCatResponses_0(long nativeObj);
690
691    // C++:  Mat cv::ml::TrainData::getResponses()
692    private static native long getResponses_0(long nativeObj);
693
694    // C++:  Mat cv::ml::TrainData::getNormCatResponses()
695    private static native long getNormCatResponses_0(long nativeObj);
696
697    // C++:  Mat cv::ml::TrainData::getSampleWeights()
698    private static native long getSampleWeights_0(long nativeObj);
699
700    // C++:  Mat cv::ml::TrainData::getTrainSampleWeights()
701    private static native long getTrainSampleWeights_0(long nativeObj);
702
703    // C++:  Mat cv::ml::TrainData::getTestSampleWeights()
704    private static native long getTestSampleWeights_0(long nativeObj);
705
706    // C++:  Mat cv::ml::TrainData::getVarIdx()
707    private static native long getVarIdx_0(long nativeObj);
708
709    // C++:  Mat cv::ml::TrainData::getVarType()
710    private static native long getVarType_0(long nativeObj);
711
712    // C++:  Mat cv::ml::TrainData::getVarSymbolFlags()
713    private static native long getVarSymbolFlags_0(long nativeObj);
714
715    // C++:  int cv::ml::TrainData::getResponseType()
716    private static native int getResponseType_0(long nativeObj);
717
718    // C++:  Mat cv::ml::TrainData::getTrainSampleIdx()
719    private static native long getTrainSampleIdx_0(long nativeObj);
720
721    // C++:  Mat cv::ml::TrainData::getTestSampleIdx()
722    private static native long getTestSampleIdx_0(long nativeObj);
723
724    // C++:  void cv::ml::TrainData::getValues(int vi, Mat sidx, float* values)
725    private static native void getValues_0(long nativeObj, int vi, long sidx_nativeObj, float values);
726
727    // C++:  Mat cv::ml::TrainData::getDefaultSubstValues()
728    private static native long getDefaultSubstValues_0(long nativeObj);
729
730    // C++:  int cv::ml::TrainData::getCatCount(int vi)
731    private static native int getCatCount_0(long nativeObj, int vi);
732
733    // C++:  Mat cv::ml::TrainData::getClassLabels()
734    private static native long getClassLabels_0(long nativeObj);
735
736    // C++:  Mat cv::ml::TrainData::getCatOfs()
737    private static native long getCatOfs_0(long nativeObj);
738
739    // C++:  Mat cv::ml::TrainData::getCatMap()
740    private static native long getCatMap_0(long nativeObj);
741
742    // C++:  void cv::ml::TrainData::setTrainTestSplit(int count, bool shuffle = true)
743    private static native void setTrainTestSplit_0(long nativeObj, int count, boolean shuffle);
744    private static native void setTrainTestSplit_1(long nativeObj, int count);
745
746    // C++:  void cv::ml::TrainData::setTrainTestSplitRatio(double ratio, bool shuffle = true)
747    private static native void setTrainTestSplitRatio_0(long nativeObj, double ratio, boolean shuffle);
748    private static native void setTrainTestSplitRatio_1(long nativeObj, double ratio);
749
750    // C++:  void cv::ml::TrainData::shuffleTrainTest()
751    private static native void shuffleTrainTest_0(long nativeObj);
752
753    // C++:  Mat cv::ml::TrainData::getTestSamples()
754    private static native long getTestSamples_0(long nativeObj);
755
756    // C++:  void cv::ml::TrainData::getNames(vector_String names)
757    private static native void getNames_0(long nativeObj, List<String> names);
758
759    // C++: static Mat cv::ml::TrainData::getSubVector(Mat vec, Mat idx)
760    private static native long getSubVector_0(long vec_nativeObj, long idx_nativeObj);
761
762    // C++: static Mat cv::ml::TrainData::getSubMatrix(Mat matrix, Mat idx, int layout)
763    private static native long getSubMatrix_0(long matrix_nativeObj, long idx_nativeObj, int layout);
764
765    // C++: static Ptr_TrainData cv::ml::TrainData::create(Mat samples, int layout, Mat responses, Mat varIdx = Mat(), Mat sampleIdx = Mat(), Mat sampleWeights = Mat(), Mat varType = Mat())
766    private static native long create_0(long samples_nativeObj, int layout, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long sampleWeights_nativeObj, long varType_nativeObj);
767    private static native long create_1(long samples_nativeObj, int layout, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj, long sampleWeights_nativeObj);
768    private static native long create_2(long samples_nativeObj, int layout, long responses_nativeObj, long varIdx_nativeObj, long sampleIdx_nativeObj);
769    private static native long create_3(long samples_nativeObj, int layout, long responses_nativeObj, long varIdx_nativeObj);
770    private static native long create_4(long samples_nativeObj, int layout, long responses_nativeObj);
771
772    // native support for java finalize()
773    private static native void delete(long nativeObj);
774
775}