001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.ml;
005
006import org.opencv.ml.Boost;
007import org.opencv.ml.DTrees;
008
009// C++: class Boost
010/**
011 * Boosted tree classifier derived from DTrees
012 *
013 * SEE: REF: ml_intro_boost
014 */
015public class Boost extends DTrees {
016
017    protected Boost(long addr) { super(addr); }
018
019    // internal usage only
020    public static Boost __fromPtr__(long addr) { return new Boost(addr); }
021
022    // C++: enum Types (cv.ml.Boost.Types)
023    public static final int
024            DISCRETE = 0,
025            REAL = 1,
026            LOGIT = 2,
027            GENTLE = 3;
028
029
030    //
031    // C++:  int cv::ml::Boost::getBoostType()
032    //
033
034    /**
035     * SEE: setBoostType
036     * @return automatically generated
037     */
038    public int getBoostType() {
039        return getBoostType_0(nativeObj);
040    }
041
042
043    //
044    // C++:  void cv::ml::Boost::setBoostType(int val)
045    //
046
047    /**
048     *  getBoostType SEE: getBoostType
049     * @param val automatically generated
050     */
051    public void setBoostType(int val) {
052        setBoostType_0(nativeObj, val);
053    }
054
055
056    //
057    // C++:  int cv::ml::Boost::getWeakCount()
058    //
059
060    /**
061     * SEE: setWeakCount
062     * @return automatically generated
063     */
064    public int getWeakCount() {
065        return getWeakCount_0(nativeObj);
066    }
067
068
069    //
070    // C++:  void cv::ml::Boost::setWeakCount(int val)
071    //
072
073    /**
074     *  getWeakCount SEE: getWeakCount
075     * @param val automatically generated
076     */
077    public void setWeakCount(int val) {
078        setWeakCount_0(nativeObj, val);
079    }
080
081
082    //
083    // C++:  double cv::ml::Boost::getWeightTrimRate()
084    //
085
086    /**
087     * SEE: setWeightTrimRate
088     * @return automatically generated
089     */
090    public double getWeightTrimRate() {
091        return getWeightTrimRate_0(nativeObj);
092    }
093
094
095    //
096    // C++:  void cv::ml::Boost::setWeightTrimRate(double val)
097    //
098
099    /**
100     *  getWeightTrimRate SEE: getWeightTrimRate
101     * @param val automatically generated
102     */
103    public void setWeightTrimRate(double val) {
104        setWeightTrimRate_0(nativeObj, val);
105    }
106
107
108    //
109    // C++: static Ptr_Boost cv::ml::Boost::create()
110    //
111
112    /**
113     * Creates the empty model.
114     * Use StatModel::train to train the model, Algorithm::load<Boost>(filename) to load the pre-trained model.
115     * @return automatically generated
116     */
117    public static Boost create() {
118        return Boost.__fromPtr__(create_0());
119    }
120
121
122    //
123    // C++: static Ptr_Boost cv::ml::Boost::load(String filepath, String nodeName = String())
124    //
125
126    /**
127     * Loads and creates a serialized Boost from a file
128     *
129     * Use Boost::save to serialize and store an RTree to disk.
130     * Load the Boost from this file again, by calling this function with the path to the file.
131     * Optionally specify the node for the file containing the classifier
132     *
133     * @param filepath path to serialized Boost
134     * @param nodeName name of node containing the classifier
135     * @return automatically generated
136     */
137    public static Boost load(String filepath, String nodeName) {
138        return Boost.__fromPtr__(load_0(filepath, nodeName));
139    }
140
141    /**
142     * Loads and creates a serialized Boost from a file
143     *
144     * Use Boost::save to serialize and store an RTree to disk.
145     * Load the Boost from this file again, by calling this function with the path to the file.
146     * Optionally specify the node for the file containing the classifier
147     *
148     * @param filepath path to serialized Boost
149     * @return automatically generated
150     */
151    public static Boost load(String filepath) {
152        return Boost.__fromPtr__(load_1(filepath));
153    }
154
155
156    @Override
157    protected void finalize() throws Throwable {
158        delete(nativeObj);
159    }
160
161
162
163    // C++:  int cv::ml::Boost::getBoostType()
164    private static native int getBoostType_0(long nativeObj);
165
166    // C++:  void cv::ml::Boost::setBoostType(int val)
167    private static native void setBoostType_0(long nativeObj, int val);
168
169    // C++:  int cv::ml::Boost::getWeakCount()
170    private static native int getWeakCount_0(long nativeObj);
171
172    // C++:  void cv::ml::Boost::setWeakCount(int val)
173    private static native void setWeakCount_0(long nativeObj, int val);
174
175    // C++:  double cv::ml::Boost::getWeightTrimRate()
176    private static native double getWeightTrimRate_0(long nativeObj);
177
178    // C++:  void cv::ml::Boost::setWeightTrimRate(double val)
179    private static native void setWeightTrimRate_0(long nativeObj, double val);
180
181    // C++: static Ptr_Boost cv::ml::Boost::create()
182    private static native long create_0();
183
184    // C++: static Ptr_Boost cv::ml::Boost::load(String filepath, String nodeName = String())
185    private static native long load_0(String filepath, String nodeName);
186    private static native long load_1(String filepath);
187
188    // native support for java finalize()
189    private static native void delete(long nativeObj);
190
191}