1 2 // 3 // This file is auto-generated. Please don't modify it! 4 // 5 package org.opencv.ml; 6 7 import org.opencv.core.Mat; 8 import org.opencv.core.TermCriteria; 9 10 // C++: class ANN_MLP 11 //javadoc: ANN_MLP 12 public class ANN_MLP extends StatModel { 13 ANN_MLP(long addr)14 protected ANN_MLP(long addr) { super(addr); } 15 16 17 public static final int 18 BACKPROP = 0, 19 RPROP = 1, 20 IDENTITY = 0, 21 SIGMOID_SYM = 1, 22 GAUSSIAN = 2, 23 UPDATE_WEIGHTS = 1, 24 NO_INPUT_SCALE = 2, 25 NO_OUTPUT_SCALE = 4; 26 27 28 // 29 // C++: void setTrainMethod(int method, double param1 = 0, double param2 = 0) 30 // 31 32 //javadoc: ANN_MLP::setTrainMethod(method, param1, param2) setTrainMethod(int method, double param1, double param2)33 public void setTrainMethod(int method, double param1, double param2) 34 { 35 36 setTrainMethod_0(nativeObj, method, param1, param2); 37 38 return; 39 } 40 41 //javadoc: ANN_MLP::setTrainMethod(method) setTrainMethod(int method)42 public void setTrainMethod(int method) 43 { 44 45 setTrainMethod_1(nativeObj, method); 46 47 return; 48 } 49 50 51 // 52 // C++: void setActivationFunction(int type, double param1 = 0, double param2 = 0) 53 // 54 55 //javadoc: ANN_MLP::setActivationFunction(type, param1, param2) setActivationFunction(int type, double param1, double param2)56 public void setActivationFunction(int type, double param1, double param2) 57 { 58 59 setActivationFunction_0(nativeObj, type, param1, param2); 60 61 return; 62 } 63 64 //javadoc: ANN_MLP::setActivationFunction(type) setActivationFunction(int type)65 public void setActivationFunction(int type) 66 { 67 68 setActivationFunction_1(nativeObj, type); 69 70 return; 71 } 72 73 74 // 75 // C++: int getTrainMethod() 76 // 77 78 //javadoc: ANN_MLP::getTrainMethod() getTrainMethod()79 public int getTrainMethod() 80 { 81 82 int retVal = getTrainMethod_0(nativeObj); 83 84 return retVal; 85 } 86 87 88 // 89 // C++: void setLayerSizes(Mat _layer_sizes) 90 // 91 92 //javadoc: ANN_MLP::setLayerSizes(_layer_sizes) setLayerSizes(Mat _layer_sizes)93 public void setLayerSizes(Mat _layer_sizes) 94 { 95 96 setLayerSizes_0(nativeObj, _layer_sizes.nativeObj); 97 98 return; 99 } 100 101 102 // 103 // C++: Mat getLayerSizes() 104 // 105 106 //javadoc: ANN_MLP::getLayerSizes() getLayerSizes()107 public Mat getLayerSizes() 108 { 109 110 Mat retVal = new Mat(getLayerSizes_0(nativeObj)); 111 112 return retVal; 113 } 114 115 116 // 117 // C++: TermCriteria getTermCriteria() 118 // 119 120 //javadoc: ANN_MLP::getTermCriteria() getTermCriteria()121 public TermCriteria getTermCriteria() 122 { 123 124 TermCriteria retVal = new TermCriteria(getTermCriteria_0(nativeObj)); 125 126 return retVal; 127 } 128 129 130 // 131 // C++: void setTermCriteria(TermCriteria val) 132 // 133 134 //javadoc: ANN_MLP::setTermCriteria(val) setTermCriteria(TermCriteria val)135 public void setTermCriteria(TermCriteria val) 136 { 137 138 setTermCriteria_0(nativeObj, val.type, val.maxCount, val.epsilon); 139 140 return; 141 } 142 143 144 // 145 // C++: double getBackpropWeightScale() 146 // 147 148 //javadoc: ANN_MLP::getBackpropWeightScale() getBackpropWeightScale()149 public double getBackpropWeightScale() 150 { 151 152 double retVal = getBackpropWeightScale_0(nativeObj); 153 154 return retVal; 155 } 156 157 158 // 159 // C++: void setBackpropWeightScale(double val) 160 // 161 162 //javadoc: ANN_MLP::setBackpropWeightScale(val) setBackpropWeightScale(double val)163 public void setBackpropWeightScale(double val) 164 { 165 166 setBackpropWeightScale_0(nativeObj, val); 167 168 return; 169 } 170 171 172 // 173 // C++: double getBackpropMomentumScale() 174 // 175 176 //javadoc: ANN_MLP::getBackpropMomentumScale() getBackpropMomentumScale()177 public double getBackpropMomentumScale() 178 { 179 180 double retVal = getBackpropMomentumScale_0(nativeObj); 181 182 return retVal; 183 } 184 185 186 // 187 // C++: void setBackpropMomentumScale(double val) 188 // 189 190 //javadoc: ANN_MLP::setBackpropMomentumScale(val) setBackpropMomentumScale(double val)191 public void setBackpropMomentumScale(double val) 192 { 193 194 setBackpropMomentumScale_0(nativeObj, val); 195 196 return; 197 } 198 199 200 // 201 // C++: double getRpropDW0() 202 // 203 204 //javadoc: ANN_MLP::getRpropDW0() getRpropDW0()205 public double getRpropDW0() 206 { 207 208 double retVal = getRpropDW0_0(nativeObj); 209 210 return retVal; 211 } 212 213 214 // 215 // C++: void setRpropDW0(double val) 216 // 217 218 //javadoc: ANN_MLP::setRpropDW0(val) setRpropDW0(double val)219 public void setRpropDW0(double val) 220 { 221 222 setRpropDW0_0(nativeObj, val); 223 224 return; 225 } 226 227 228 // 229 // C++: double getRpropDWPlus() 230 // 231 232 //javadoc: ANN_MLP::getRpropDWPlus() getRpropDWPlus()233 public double getRpropDWPlus() 234 { 235 236 double retVal = getRpropDWPlus_0(nativeObj); 237 238 return retVal; 239 } 240 241 242 // 243 // C++: void setRpropDWPlus(double val) 244 // 245 246 //javadoc: ANN_MLP::setRpropDWPlus(val) setRpropDWPlus(double val)247 public void setRpropDWPlus(double val) 248 { 249 250 setRpropDWPlus_0(nativeObj, val); 251 252 return; 253 } 254 255 256 // 257 // C++: double getRpropDWMinus() 258 // 259 260 //javadoc: ANN_MLP::getRpropDWMinus() getRpropDWMinus()261 public double getRpropDWMinus() 262 { 263 264 double retVal = getRpropDWMinus_0(nativeObj); 265 266 return retVal; 267 } 268 269 270 // 271 // C++: void setRpropDWMinus(double val) 272 // 273 274 //javadoc: ANN_MLP::setRpropDWMinus(val) setRpropDWMinus(double val)275 public void setRpropDWMinus(double val) 276 { 277 278 setRpropDWMinus_0(nativeObj, val); 279 280 return; 281 } 282 283 284 // 285 // C++: double getRpropDWMin() 286 // 287 288 //javadoc: ANN_MLP::getRpropDWMin() getRpropDWMin()289 public double getRpropDWMin() 290 { 291 292 double retVal = getRpropDWMin_0(nativeObj); 293 294 return retVal; 295 } 296 297 298 // 299 // C++: void setRpropDWMin(double val) 300 // 301 302 //javadoc: ANN_MLP::setRpropDWMin(val) setRpropDWMin(double val)303 public void setRpropDWMin(double val) 304 { 305 306 setRpropDWMin_0(nativeObj, val); 307 308 return; 309 } 310 311 312 // 313 // C++: double getRpropDWMax() 314 // 315 316 //javadoc: ANN_MLP::getRpropDWMax() getRpropDWMax()317 public double getRpropDWMax() 318 { 319 320 double retVal = getRpropDWMax_0(nativeObj); 321 322 return retVal; 323 } 324 325 326 // 327 // C++: void setRpropDWMax(double val) 328 // 329 330 //javadoc: ANN_MLP::setRpropDWMax(val) setRpropDWMax(double val)331 public void setRpropDWMax(double val) 332 { 333 334 setRpropDWMax_0(nativeObj, val); 335 336 return; 337 } 338 339 340 // 341 // C++: Mat getWeights(int layerIdx) 342 // 343 344 //javadoc: ANN_MLP::getWeights(layerIdx) getWeights(int layerIdx)345 public Mat getWeights(int layerIdx) 346 { 347 348 Mat retVal = new Mat(getWeights_0(nativeObj, layerIdx)); 349 350 return retVal; 351 } 352 353 354 // 355 // C++: static Ptr_ANN_MLP create() 356 // 357 358 //javadoc: ANN_MLP::create() create()359 public static ANN_MLP create() 360 { 361 362 ANN_MLP retVal = new ANN_MLP(create_0()); 363 364 return retVal; 365 } 366 367 368 @Override finalize()369 protected void finalize() throws Throwable { 370 delete(nativeObj); 371 } 372 373 374 375 // C++: void setTrainMethod(int method, double param1 = 0, double param2 = 0) setTrainMethod_0(long nativeObj, int method, double param1, double param2)376 private static native void setTrainMethod_0(long nativeObj, int method, double param1, double param2); setTrainMethod_1(long nativeObj, int method)377 private static native void setTrainMethod_1(long nativeObj, int method); 378 379 // C++: void setActivationFunction(int type, double param1 = 0, double param2 = 0) setActivationFunction_0(long nativeObj, int type, double param1, double param2)380 private static native void setActivationFunction_0(long nativeObj, int type, double param1, double param2); setActivationFunction_1(long nativeObj, int type)381 private static native void setActivationFunction_1(long nativeObj, int type); 382 383 // C++: int getTrainMethod() getTrainMethod_0(long nativeObj)384 private static native int getTrainMethod_0(long nativeObj); 385 386 // C++: void setLayerSizes(Mat _layer_sizes) setLayerSizes_0(long nativeObj, long _layer_sizes_nativeObj)387 private static native void setLayerSizes_0(long nativeObj, long _layer_sizes_nativeObj); 388 389 // C++: Mat getLayerSizes() getLayerSizes_0(long nativeObj)390 private static native long getLayerSizes_0(long nativeObj); 391 392 // C++: TermCriteria getTermCriteria() getTermCriteria_0(long nativeObj)393 private static native double[] getTermCriteria_0(long nativeObj); 394 395 // C++: void setTermCriteria(TermCriteria val) setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon)396 private static native void setTermCriteria_0(long nativeObj, int val_type, int val_maxCount, double val_epsilon); 397 398 // C++: double getBackpropWeightScale() getBackpropWeightScale_0(long nativeObj)399 private static native double getBackpropWeightScale_0(long nativeObj); 400 401 // C++: void setBackpropWeightScale(double val) setBackpropWeightScale_0(long nativeObj, double val)402 private static native void setBackpropWeightScale_0(long nativeObj, double val); 403 404 // C++: double getBackpropMomentumScale() getBackpropMomentumScale_0(long nativeObj)405 private static native double getBackpropMomentumScale_0(long nativeObj); 406 407 // C++: void setBackpropMomentumScale(double val) setBackpropMomentumScale_0(long nativeObj, double val)408 private static native void setBackpropMomentumScale_0(long nativeObj, double val); 409 410 // C++: double getRpropDW0() getRpropDW0_0(long nativeObj)411 private static native double getRpropDW0_0(long nativeObj); 412 413 // C++: void setRpropDW0(double val) setRpropDW0_0(long nativeObj, double val)414 private static native void setRpropDW0_0(long nativeObj, double val); 415 416 // C++: double getRpropDWPlus() getRpropDWPlus_0(long nativeObj)417 private static native double getRpropDWPlus_0(long nativeObj); 418 419 // C++: void setRpropDWPlus(double val) setRpropDWPlus_0(long nativeObj, double val)420 private static native void setRpropDWPlus_0(long nativeObj, double val); 421 422 // C++: double getRpropDWMinus() getRpropDWMinus_0(long nativeObj)423 private static native double getRpropDWMinus_0(long nativeObj); 424 425 // C++: void setRpropDWMinus(double val) setRpropDWMinus_0(long nativeObj, double val)426 private static native void setRpropDWMinus_0(long nativeObj, double val); 427 428 // C++: double getRpropDWMin() getRpropDWMin_0(long nativeObj)429 private static native double getRpropDWMin_0(long nativeObj); 430 431 // C++: void setRpropDWMin(double val) setRpropDWMin_0(long nativeObj, double val)432 private static native void setRpropDWMin_0(long nativeObj, double val); 433 434 // C++: double getRpropDWMax() getRpropDWMax_0(long nativeObj)435 private static native double getRpropDWMax_0(long nativeObj); 436 437 // C++: void setRpropDWMax(double val) setRpropDWMax_0(long nativeObj, double val)438 private static native void setRpropDWMax_0(long nativeObj, double val); 439 440 // C++: Mat getWeights(int layerIdx) getWeights_0(long nativeObj, int layerIdx)441 private static native long getWeights_0(long nativeObj, int layerIdx); 442 443 // C++: static Ptr_ANN_MLP create() create_0()444 private static native long create_0(); 445 446 // native support for java finalize() delete(long nativeObj)447 private static native void delete(long nativeObj); 448 449 } 450