001
002//
003// This file is auto-generated. Please don't modify it!
004//
005package org.opencv.ml;
006
007import org.opencv.core.Mat;
008import org.opencv.core.TermCriteria;
009
010// C++: class SVMSGD
011//javadoc: SVMSGD
012public class SVMSGD extends StatModel {
013
014    protected SVMSGD(long addr) { super(addr); }
015
016
017    public static final int
018            SGD = 0,
019            ASGD = 1,
020            SOFT_MARGIN = 0,
021            HARD_MARGIN = 1;
022
023
024    //
025    // C++:  Mat getWeights()
026    //
027
028    //javadoc: SVMSGD::getWeights()
029    public  Mat getWeights()
030    {
031        
032        Mat retVal = new Mat(getWeights_0(nativeObj));
033        
034        return retVal;
035    }
036
037
038    //
039    // C++: static Ptr_SVMSGD create()
040    //
041
042    //javadoc: SVMSGD::create()
043    public static SVMSGD create()
044    {
045        
046        SVMSGD retVal = new SVMSGD(create_0());
047        
048        return retVal;
049    }
050
051
052    //
053    // C++:  TermCriteria getTermCriteria()
054    //
055
056    //javadoc: SVMSGD::getTermCriteria()
057    public  TermCriteria getTermCriteria()
058    {
059        
060        TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj));
061        
062        return retVal;
063    }
064
065
066    //
067    // C++:  float getInitialStepSize()
068    //
069
070    //javadoc: SVMSGD::getInitialStepSize()
071    public  float getInitialStepSize()
072    {
073        
074        float retVal = getInitialStepSize_0(nativeObj);
075        
076        return retVal;
077    }
078
079
080    //
081    // C++:  float getMarginRegularization()
082    //
083
084    //javadoc: SVMSGD::getMarginRegularization()
085    public  float getMarginRegularization()
086    {
087        
088        float retVal = getMarginRegularization_0(nativeObj);
089        
090        return retVal;
091    }
092
093
094    //
095    // C++:  float getShift()
096    //
097
098    //javadoc: SVMSGD::getShift()
099    public  float getShift()
100    {
101        
102        float retVal = getShift_0(nativeObj);
103        
104        return retVal;
105    }
106
107
108    //
109    // C++:  float getStepDecreasingPower()
110    //
111
112    //javadoc: SVMSGD::getStepDecreasingPower()
113    public  float getStepDecreasingPower()
114    {
115        
116        float retVal = getStepDecreasingPower_0(nativeObj);
117        
118        return retVal;
119    }
120
121
122    //
123    // C++:  int getMarginType()
124    //
125
126    //javadoc: SVMSGD::getMarginType()
127    public  int getMarginType()
128    {
129        
130        int retVal = getMarginType_0(nativeObj);
131        
132        return retVal;
133    }
134
135
136    //
137    // C++:  int getSvmsgdType()
138    //
139
140    //javadoc: SVMSGD::getSvmsgdType()
141    public  int getSvmsgdType()
142    {
143        
144        int retVal = getSvmsgdType_0(nativeObj);
145        
146        return retVal;
147    }
148
149
150    //
151    // C++:  void setInitialStepSize(float InitialStepSize)
152    //
153
154    //javadoc: SVMSGD::setInitialStepSize(InitialStepSize)
155    public  void setInitialStepSize(float InitialStepSize)
156    {
157        
158        setInitialStepSize_0(nativeObj, InitialStepSize);
159        
160        return;
161    }
162
163
164    //
165    // C++:  void setMarginRegularization(float marginRegularization)
166    //
167
168    //javadoc: SVMSGD::setMarginRegularization(marginRegularization)
169    public  void setMarginRegularization(float marginRegularization)
170    {
171        
172        setMarginRegularization_0(nativeObj, marginRegularization);
173        
174        return;
175    }
176
177
178    //
179    // C++:  void setMarginType(int marginType)
180    //
181
182    //javadoc: SVMSGD::setMarginType(marginType)
183    public  void setMarginType(int marginType)
184    {
185        
186        setMarginType_0(nativeObj, marginType);
187        
188        return;
189    }
190
191
192    //
193    // C++:  void setOptimalParameters(int svmsgdType = SVMSGD::ASGD, int marginType = SVMSGD::SOFT_MARGIN)
194    //
195
196    //javadoc: SVMSGD::setOptimalParameters(svmsgdType, marginType)
197    public  void setOptimalParameters(int svmsgdType, int marginType)
198    {
199        
200        setOptimalParameters_0(nativeObj, svmsgdType, marginType);
201        
202        return;
203    }
204
205    //javadoc: SVMSGD::setOptimalParameters()
206    public  void setOptimalParameters()
207    {
208        
209        setOptimalParameters_1(nativeObj);
210        
211        return;
212    }
213
214
215    //
216    // C++:  void setStepDecreasingPower(float stepDecreasingPower)
217    //
218
219    //javadoc: SVMSGD::setStepDecreasingPower(stepDecreasingPower)
220    public  void setStepDecreasingPower(float stepDecreasingPower)
221    {
222        
223        setStepDecreasingPower_0(nativeObj, stepDecreasingPower);
224        
225        return;
226    }
227
228
229    //
230    // C++:  void setSvmsgdType(int svmsgdType)
231    //
232
233    //javadoc: SVMSGD::setSvmsgdType(svmsgdType)
234    public  void setSvmsgdType(int svmsgdType)
235    {
236        
237        setSvmsgdType_0(nativeObj, svmsgdType);
238        
239        return;
240    }
241
242
243    //
244    // C++:  void setTermCriteria(TermCriteria val)
245    //
246
247    //javadoc: SVMSGD::setTermCriteria(val)
248    public  void setTermCriteria(TermCriteria val)
249    {
250        
251        setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon);
252        
253        return;
254    }
255
256
257    @Override
258    protected void finalize() throws Throwable {
259        delete(nativeObj);
260    }
261
262
263
264    // C++:  Mat getWeights()
265    private static native long getWeights_0(long nativeObj);
266
267    // C++: static Ptr_SVMSGD create()
268    private static native long create_0();
269
270    // C++:  TermCriteria getTermCriteria()
271    private static native double[] getTermCriteria_0(long nativeObj);
272
273    // C++:  float getInitialStepSize()
274    private static native float getInitialStepSize_0(long nativeObj);
275
276    // C++:  float getMarginRegularization()
277    private static native float getMarginRegularization_0(long nativeObj);
278
279    // C++:  float getShift()
280    private static native float getShift_0(long nativeObj);
281
282    // C++:  float getStepDecreasingPower()
283    private static native float getStepDecreasingPower_0(long nativeObj);
284
285    // C++:  int getMarginType()
286    private static native int getMarginType_0(long nativeObj);
287
288    // C++:  int getSvmsgdType()
289    private static native int getSvmsgdType_0(long nativeObj);
290
291    // C++:  void setInitialStepSize(float InitialStepSize)
292    private static native void setInitialStepSize_0(long nativeObj, float InitialStepSize);
293
294    // C++:  void setMarginRegularization(float marginRegularization)
295    private static native void setMarginRegularization_0(long nativeObj, float marginRegularization);
296
297    // C++:  void setMarginType(int marginType)
298    private static native void setMarginType_0(long nativeObj, int marginType);
299
300    // C++:  void setOptimalParameters(int svmsgdType = SVMSGD::ASGD, int marginType = SVMSGD::SOFT_MARGIN)
301    private static native void setOptimalParameters_0(long nativeObj, int svmsgdType, int marginType);
302    private static native void setOptimalParameters_1(long nativeObj);
303
304    // C++:  void setStepDecreasingPower(float stepDecreasingPower)
305    private static native void setStepDecreasingPower_0(long nativeObj, float stepDecreasingPower);
306
307    // C++:  void setSvmsgdType(int svmsgdType)
308    private static native void setSvmsgdType_0(long nativeObj, int svmsgdType);
309
310    // C++:  void setTermCriteria(TermCriteria val)
311    private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon);
312
313    // native support for java finalize()
314    private static native void delete(long nativeObj);
315
316}