001
002//
003// This file is auto-generated. Please don't modify it!
004//
005package org.opencv.ml;
006
007import org.opencv.core.Mat;
008
009// C++: class TrainData
010//javadoc: TrainData
011public class TrainData {
012
013    protected final long nativeObj;
014    protected TrainData(long addr) { nativeObj = addr; }
015
016
017    //
018    // C++:  Mat getCatMap()
019    //
020
021    //javadoc: TrainData::getCatMap()
022    public  Mat getCatMap()
023    {
024        
025        Mat retVal = new Mat(getCatMap_0(nativeObj));
026        
027        return retVal;
028    }
029
030
031    //
032    // C++:  Mat getCatOfs()
033    //
034
035    //javadoc: TrainData::getCatOfs()
036    public  Mat getCatOfs()
037    {
038        
039        Mat retVal = new Mat(getCatOfs_0(nativeObj));
040        
041        return retVal;
042    }
043
044
045    //
046    // C++:  Mat getClassLabels()
047    //
048
049    //javadoc: TrainData::getClassLabels()
050    public  Mat getClassLabels()
051    {
052        
053        Mat retVal = new Mat(getClassLabels_0(nativeObj));
054        
055        return retVal;
056    }
057
058
059    //
060    // C++:  Mat getDefaultSubstValues()
061    //
062
063    //javadoc: TrainData::getDefaultSubstValues()
064    public  Mat getDefaultSubstValues()
065    {
066        
067        Mat retVal = new Mat(getDefaultSubstValues_0(nativeObj));
068        
069        return retVal;
070    }
071
072
073    //
074    // C++:  Mat getMissing()
075    //
076
077    //javadoc: TrainData::getMissing()
078    public  Mat getMissing()
079    {
080        
081        Mat retVal = new Mat(getMissing_0(nativeObj));
082        
083        return retVal;
084    }
085
086
087    //
088    // C++:  Mat getNormCatResponses()
089    //
090
091    //javadoc: TrainData::getNormCatResponses()
092    public  Mat getNormCatResponses()
093    {
094        
095        Mat retVal = new Mat(getNormCatResponses_0(nativeObj));
096        
097        return retVal;
098    }
099
100
101    //
102    // C++:  Mat getResponses()
103    //
104
105    //javadoc: TrainData::getResponses()
106    public  Mat getResponses()
107    {
108        
109        Mat retVal = new Mat(getResponses_0(nativeObj));
110        
111        return retVal;
112    }
113
114
115    //
116    // C++:  Mat getSampleWeights()
117    //
118
119    //javadoc: TrainData::getSampleWeights()
120    public  Mat getSampleWeights()
121    {
122        
123        Mat retVal = new Mat(getSampleWeights_0(nativeObj));
124        
125        return retVal;
126    }
127
128
129    //
130    // C++:  Mat getSamples()
131    //
132
133    //javadoc: TrainData::getSamples()
134    public  Mat getSamples()
135    {
136        
137        Mat retVal = new Mat(getSamples_0(nativeObj));
138        
139        return retVal;
140    }
141
142
143    //
144    // C++: static Mat getSubVector(Mat vec, Mat idx)
145    //
146
147    //javadoc: TrainData::getSubVector(vec, idx)
148    public static Mat getSubVector(Mat vec, Mat idx)
149    {
150        
151        Mat retVal = new Mat(getSubVector_0(vec.nativeObj, idx.nativeObj));
152        
153        return retVal;
154    }
155
156
157    //
158    // C++:  Mat getTestNormCatResponses()
159    //
160
161    //javadoc: TrainData::getTestNormCatResponses()
162    public  Mat getTestNormCatResponses()
163    {
164        
165        Mat retVal = new Mat(getTestNormCatResponses_0(nativeObj));
166        
167        return retVal;
168    }
169
170
171    //
172    // C++:  Mat getTestResponses()
173    //
174
175    //javadoc: TrainData::getTestResponses()
176    public  Mat getTestResponses()
177    {
178        
179        Mat retVal = new Mat(getTestResponses_0(nativeObj));
180        
181        return retVal;
182    }
183
184
185    //
186    // C++:  Mat getTestSampleIdx()
187    //
188
189    //javadoc: TrainData::getTestSampleIdx()
190    public  Mat getTestSampleIdx()
191    {
192        
193        Mat retVal = new Mat(getTestSampleIdx_0(nativeObj));
194        
195        return retVal;
196    }
197
198
199    //
200    // C++:  Mat getTestSampleWeights()
201    //
202
203    //javadoc: TrainData::getTestSampleWeights()
204    public  Mat getTestSampleWeights()
205    {
206        
207        Mat retVal = new Mat(getTestSampleWeights_0(nativeObj));
208        
209        return retVal;
210    }
211
212
213    //
214    // C++:  Mat getTrainNormCatResponses()
215    //
216
217    //javadoc: TrainData::getTrainNormCatResponses()
218    public  Mat getTrainNormCatResponses()
219    {
220        
221        Mat retVal = new Mat(getTrainNormCatResponses_0(nativeObj));
222        
223        return retVal;
224    }
225
226
227    //
228    // C++:  Mat getTrainResponses()
229    //
230
231    //javadoc: TrainData::getTrainResponses()
232    public  Mat getTrainResponses()
233    {
234        
235        Mat retVal = new Mat(getTrainResponses_0(nativeObj));
236        
237        return retVal;
238    }
239
240
241    //
242    // C++:  Mat getTrainSampleIdx()
243    //
244
245    //javadoc: TrainData::getTrainSampleIdx()
246    public  Mat getTrainSampleIdx()
247    {
248        
249        Mat retVal = new Mat(getTrainSampleIdx_0(nativeObj));
250        
251        return retVal;
252    }
253
254
255    //
256    // C++:  Mat getTrainSampleWeights()
257    //
258
259    //javadoc: TrainData::getTrainSampleWeights()
260    public  Mat getTrainSampleWeights()
261    {
262        
263        Mat retVal = new Mat(getTrainSampleWeights_0(nativeObj));
264        
265        return retVal;
266    }
267
268
269    //
270    // C++:  Mat getTrainSamples(int layout = ROW_SAMPLE, bool compressSamples = true, bool compressVars = true)
271    //
272
273    //javadoc: TrainData::getTrainSamples(layout, compressSamples, compressVars)
274    public  Mat getTrainSamples(int layout, boolean compressSamples, boolean compressVars)
275    {
276        
277        Mat retVal = new Mat(getTrainSamples_0(nativeObj, layout, compressSamples, compressVars));
278        
279        return retVal;
280    }
281
282    //javadoc: TrainData::getTrainSamples()
283    public  Mat getTrainSamples()
284    {
285        
286        Mat retVal = new Mat(getTrainSamples_1(nativeObj));
287        
288        return retVal;
289    }
290
291
292    //
293    // C++:  Mat getVarIdx()
294    //
295
296    //javadoc: TrainData::getVarIdx()
297    public  Mat getVarIdx()
298    {
299        
300        Mat retVal = new Mat(getVarIdx_0(nativeObj));
301        
302        return retVal;
303    }
304
305
306    //
307    // C++:  Mat getVarType()
308    //
309
310    //javadoc: TrainData::getVarType()
311    public  Mat getVarType()
312    {
313        
314        Mat retVal = new Mat(getVarType_0(nativeObj));
315        
316        return retVal;
317    }
318
319
320    //
321    // C++: static Ptr_TrainData create(Mat samples, int layout, Mat responses, Mat varIdx = Mat(), Mat sampleIdx = Mat(), Mat sampleWeights = Mat(), Mat varType = Mat())
322    //
323
324    // Return type 'Ptr_TrainData' is not supported, skipping the function
325
326
327    //
328    // C++:  int getCatCount(int vi)
329    //
330
331    //javadoc: TrainData::getCatCount(vi)
332    public  int getCatCount(int vi)
333    {
334        
335        int retVal = getCatCount_0(nativeObj, vi);
336        
337        return retVal;
338    }
339
340
341    //
342    // C++:  int getLayout()
343    //
344
345    //javadoc: TrainData::getLayout()
346    public  int getLayout()
347    {
348        
349        int retVal = getLayout_0(nativeObj);
350        
351        return retVal;
352    }
353
354
355    //
356    // C++:  int getNAllVars()
357    //
358
359    //javadoc: TrainData::getNAllVars()
360    public  int getNAllVars()
361    {
362        
363        int retVal = getNAllVars_0(nativeObj);
364        
365        return retVal;
366    }
367
368
369    //
370    // C++:  int getNSamples()
371    //
372
373    //javadoc: TrainData::getNSamples()
374    public  int getNSamples()
375    {
376        
377        int retVal = getNSamples_0(nativeObj);
378        
379        return retVal;
380    }
381
382
383    //
384    // C++:  int getNTestSamples()
385    //
386
387    //javadoc: TrainData::getNTestSamples()
388    public  int getNTestSamples()
389    {
390        
391        int retVal = getNTestSamples_0(nativeObj);
392        
393        return retVal;
394    }
395
396
397    //
398    // C++:  int getNTrainSamples()
399    //
400
401    //javadoc: TrainData::getNTrainSamples()
402    public  int getNTrainSamples()
403    {
404        
405        int retVal = getNTrainSamples_0(nativeObj);
406        
407        return retVal;
408    }
409
410
411    //
412    // C++:  int getNVars()
413    //
414
415    //javadoc: TrainData::getNVars()
416    public  int getNVars()
417    {
418        
419        int retVal = getNVars_0(nativeObj);
420        
421        return retVal;
422    }
423
424
425    //
426    // C++:  int getResponseType()
427    //
428
429    //javadoc: TrainData::getResponseType()
430    public  int getResponseType()
431    {
432        
433        int retVal = getResponseType_0(nativeObj);
434        
435        return retVal;
436    }
437
438
439    //
440    // C++:  void getSample(Mat varIdx, int sidx, float* buf)
441    //
442
443    //javadoc: TrainData::getSample(varIdx, sidx, buf)
444    public  void getSample(Mat varIdx, int sidx, float buf)
445    {
446        
447        getSample_0(nativeObj, varIdx.nativeObj, sidx, buf);
448        
449        return;
450    }
451
452
453    //
454    // C++:  void getValues(int vi, Mat sidx, float* values)
455    //
456
457    //javadoc: TrainData::getValues(vi, sidx, values)
458    public  void getValues(int vi, Mat sidx, float values)
459    {
460        
461        getValues_0(nativeObj, vi, sidx.nativeObj, values);
462        
463        return;
464    }
465
466
467    //
468    // C++:  void setTrainTestSplit(int count, bool shuffle = true)
469    //
470
471    //javadoc: TrainData::setTrainTestSplit(count, shuffle)
472    public  void setTrainTestSplit(int count, boolean shuffle)
473    {
474        
475        setTrainTestSplit_0(nativeObj, count, shuffle);
476        
477        return;
478    }
479
480    //javadoc: TrainData::setTrainTestSplit(count)
481    public  void setTrainTestSplit(int count)
482    {
483        
484        setTrainTestSplit_1(nativeObj, count);
485        
486        return;
487    }
488
489
490    //
491    // C++:  void setTrainTestSplitRatio(double ratio, bool shuffle = true)
492    //
493
494    //javadoc: TrainData::setTrainTestSplitRatio(ratio, shuffle)
495    public  void setTrainTestSplitRatio(double ratio, boolean shuffle)
496    {
497        
498        setTrainTestSplitRatio_0(nativeObj, ratio, shuffle);
499        
500        return;
501    }
502
503    //javadoc: TrainData::setTrainTestSplitRatio(ratio)
504    public  void setTrainTestSplitRatio(double ratio)
505    {
506        
507        setTrainTestSplitRatio_1(nativeObj, ratio);
508        
509        return;
510    }
511
512
513    //
514    // C++:  void shuffleTrainTest()
515    //
516
517    //javadoc: TrainData::shuffleTrainTest()
518    public  void shuffleTrainTest()
519    {
520        
521        shuffleTrainTest_0(nativeObj);
522        
523        return;
524    }
525
526
527    @Override
528    protected void finalize() throws Throwable {
529        delete(nativeObj);
530    }
531
532
533
534    // C++:  Mat getCatMap()
535    private static native long getCatMap_0(long nativeObj);
536
537    // C++:  Mat getCatOfs()
538    private static native long getCatOfs_0(long nativeObj);
539
540    // C++:  Mat getClassLabels()
541    private static native long getClassLabels_0(long nativeObj);
542
543    // C++:  Mat getDefaultSubstValues()
544    private static native long getDefaultSubstValues_0(long nativeObj);
545
546    // C++:  Mat getMissing()
547    private static native long getMissing_0(long nativeObj);
548
549    // C++:  Mat getNormCatResponses()
550    private static native long getNormCatResponses_0(long nativeObj);
551
552    // C++:  Mat getResponses()
553    private static native long getResponses_0(long nativeObj);
554
555    // C++:  Mat getSampleWeights()
556    private static native long getSampleWeights_0(long nativeObj);
557
558    // C++:  Mat getSamples()
559    private static native long getSamples_0(long nativeObj);
560
561    // C++: static Mat getSubVector(Mat vec, Mat idx)
562    private static native long getSubVector_0(long vec_nativeObj, long idx_nativeObj);
563
564    // C++:  Mat getTestNormCatResponses()
565    private static native long getTestNormCatResponses_0(long nativeObj);
566
567    // C++:  Mat getTestResponses()
568    private static native long getTestResponses_0(long nativeObj);
569
570    // C++:  Mat getTestSampleIdx()
571    private static native long getTestSampleIdx_0(long nativeObj);
572
573    // C++:  Mat getTestSampleWeights()
574    private static native long getTestSampleWeights_0(long nativeObj);
575
576    // C++:  Mat getTrainNormCatResponses()
577    private static native long getTrainNormCatResponses_0(long nativeObj);
578
579    // C++:  Mat getTrainResponses()
580    private static native long getTrainResponses_0(long nativeObj);
581
582    // C++:  Mat getTrainSampleIdx()
583    private static native long getTrainSampleIdx_0(long nativeObj);
584
585    // C++:  Mat getTrainSampleWeights()
586    private static native long getTrainSampleWeights_0(long nativeObj);
587
588    // C++:  Mat getTrainSamples(int layout = ROW_SAMPLE, bool compressSamples = true, bool compressVars = true)
589    private static native long getTrainSamples_0(long nativeObj, int layout, boolean compressSamples, boolean compressVars);
590    private static native long getTrainSamples_1(long nativeObj);
591
592    // C++:  Mat getVarIdx()
593    private static native long getVarIdx_0(long nativeObj);
594
595    // C++:  Mat getVarType()
596    private static native long getVarType_0(long nativeObj);
597
598    // C++:  int getCatCount(int vi)
599    private static native int getCatCount_0(long nativeObj, int vi);
600
601    // C++:  int getLayout()
602    private static native int getLayout_0(long nativeObj);
603
604    // C++:  int getNAllVars()
605    private static native int getNAllVars_0(long nativeObj);
606
607    // C++:  int getNSamples()
608    private static native int getNSamples_0(long nativeObj);
609
610    // C++:  int getNTestSamples()
611    private static native int getNTestSamples_0(long nativeObj);
612
613    // C++:  int getNTrainSamples()
614    private static native int getNTrainSamples_0(long nativeObj);
615
616    // C++:  int getNVars()
617    private static native int getNVars_0(long nativeObj);
618
619    // C++:  int getResponseType()
620    private static native int getResponseType_0(long nativeObj);
621
622    // C++:  void getSample(Mat varIdx, int sidx, float* buf)
623    private static native void getSample_0(long nativeObj, long varIdx_nativeObj, int sidx, float buf);
624
625    // C++:  void getValues(int vi, Mat sidx, float* values)
626    private static native void getValues_0(long nativeObj, int vi, long sidx_nativeObj, float values);
627
628    // C++:  void setTrainTestSplit(int count, bool shuffle = true)
629    private static native void setTrainTestSplit_0(long nativeObj, int count, boolean shuffle);
630    private static native void setTrainTestSplit_1(long nativeObj, int count);
631
632    // C++:  void setTrainTestSplitRatio(double ratio, bool shuffle = true)
633    private static native void setTrainTestSplitRatio_0(long nativeObj, double ratio, boolean shuffle);
634    private static native void setTrainTestSplitRatio_1(long nativeObj, double ratio);
635
636    // C++:  void shuffleTrainTest()
637    private static native void shuffleTrainTest_0(long nativeObj);
638
639    // native support for java finalize()
640    private static native void delete(long nativeObj);
641
642}