ParamGrid.java 4.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
//
// This file is auto-generated. Please don't modify it!
//
package org.opencv.ml;

import org.opencv.ml.ParamGrid;

// C++: class ParamGrid
/**
 * The structure represents the logarithmic grid range of statmodel parameters.
 *
 * It is used for optimizing statmodel accuracy by varying model parameters, the accuracy estimate
 * being computed by cross-validation.
 */
public class ParamGrid {

    protected final long nativeObj;
    protected ParamGrid(long addr) { nativeObj = addr; }

    public long getNativeObjAddr() { return nativeObj; }

    // internal usage only
    public static ParamGrid __fromPtr__(long addr) { return new ParamGrid(addr); }

    //
    // C++: static Ptr_ParamGrid cv::ml::ParamGrid::create(double minVal = 0., double maxVal = 0., double logstep = 1.)
    //

    /**
     * Creates a ParamGrid Ptr that can be given to the %SVM::trainAuto method
     *
     *     @param minVal minimum value of the parameter grid
     *     @param maxVal maximum value of the parameter grid
     *     @param logstep Logarithmic step for iterating the statmodel parameter
     * @return automatically generated
     */
    public static ParamGrid create(double minVal, double maxVal, double logstep) {
        return ParamGrid.__fromPtr__(create_0(minVal, maxVal, logstep));
    }

    /**
     * Creates a ParamGrid Ptr that can be given to the %SVM::trainAuto method
     *
     *     @param minVal minimum value of the parameter grid
     *     @param maxVal maximum value of the parameter grid
     * @return automatically generated
     */
    public static ParamGrid create(double minVal, double maxVal) {
        return ParamGrid.__fromPtr__(create_1(minVal, maxVal));
    }

    /**
     * Creates a ParamGrid Ptr that can be given to the %SVM::trainAuto method
     *
     *     @param minVal minimum value of the parameter grid
     * @return automatically generated
     */
    public static ParamGrid create(double minVal) {
        return ParamGrid.__fromPtr__(create_2(minVal));
    }

    /**
     * Creates a ParamGrid Ptr that can be given to the %SVM::trainAuto method
     *
     * @return automatically generated
     */
    public static ParamGrid create() {
        return ParamGrid.__fromPtr__(create_3());
    }


    //
    // C++: double ParamGrid::minVal
    //

    public double get_minVal() {
        return get_minVal_0(nativeObj);
    }


    //
    // C++: void ParamGrid::minVal
    //

    public void set_minVal(double minVal) {
        set_minVal_0(nativeObj, minVal);
    }


    //
    // C++: double ParamGrid::maxVal
    //

    public double get_maxVal() {
        return get_maxVal_0(nativeObj);
    }


    //
    // C++: void ParamGrid::maxVal
    //

    public void set_maxVal(double maxVal) {
        set_maxVal_0(nativeObj, maxVal);
    }


    //
    // C++: double ParamGrid::logStep
    //

    public double get_logStep() {
        return get_logStep_0(nativeObj);
    }


    //
    // C++: void ParamGrid::logStep
    //

    public void set_logStep(double logStep) {
        set_logStep_0(nativeObj, logStep);
    }


    @Override
    protected void finalize() throws Throwable {
        delete(nativeObj);
    }



    // C++: static Ptr_ParamGrid cv::ml::ParamGrid::create(double minVal = 0., double maxVal = 0., double logstep = 1.)
    private static native long create_0(double minVal, double maxVal, double logstep);
    private static native long create_1(double minVal, double maxVal);
    private static native long create_2(double minVal);
    private static native long create_3();

    // C++: double ParamGrid::minVal
    private static native double get_minVal_0(long nativeObj);

    // C++: void ParamGrid::minVal
    private static native void set_minVal_0(long nativeObj, double minVal);

    // C++: double ParamGrid::maxVal
    private static native double get_maxVal_0(long nativeObj);

    // C++: void ParamGrid::maxVal
    private static native void set_maxVal_0(long nativeObj, double maxVal);

    // C++: double ParamGrid::logStep
    private static native double get_logStep_0(long nativeObj);

    // C++: void ParamGrid::logStep
    private static native void set_logStep_0(long nativeObj, double logStep);

    // native support for java finalize()
    private static native void delete(long nativeObj);

}