001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (https://www.swig.org).
003 * Version 4.1.1
004 *
005 * Do not make changes to this file unless you know what you are doing - modify
006 * the SWIG interface file instead.
007 * ----------------------------------------------------------------------------- */
008
009package org.quantlib;
010
011public class LogNormalSimulatedAnnealing extends OptimizationMethod implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable {
012  private transient long swigCPtr;
013  private transient boolean swigCMemOwnDerived;
014
015  protected LogNormalSimulatedAnnealing(long cPtr, boolean cMemoryOwn) {
016    super(QuantLibJNI.LogNormalSimulatedAnnealing_SWIGSmartPtrUpcast(cPtr), true);
017    swigCMemOwnDerived = cMemoryOwn;
018    swigCPtr = cPtr;
019  }
020
021  protected static long getCPtr(LogNormalSimulatedAnnealing obj) {
022    return (obj == null) ? 0 : obj.swigCPtr;
023  }
024
025  protected void swigSetCMemOwn(boolean own) {
026    swigCMemOwnDerived = own;
027    super.swigSetCMemOwn(own);
028  }
029
030  @SuppressWarnings("deprecation")
031  protected void finalize() {
032    delete();
033  }
034
035  public synchronized void delete() {
036    if (swigCPtr != 0) {
037      if (swigCMemOwnDerived) {
038        swigCMemOwnDerived = false;
039        QuantLibJNI.delete_LogNormalSimulatedAnnealing(swigCPtr);
040      }
041      swigCPtr = 0;
042    }
043    super.delete();
044  }
045
046  public LogNormalSimulatedAnnealing(SamplerLogNormal sampler, ProbabilityBoltzmannDownhill probability, TemperatureExponential temperature, ReannealingTrivial reannealing, double startTemperature, double endTemperature, long reAnnealSteps, LogNormalSimulatedAnnealing.ResetScheme resetScheme, long resetSteps) {
047    this(QuantLibJNI.new_LogNormalSimulatedAnnealing__SWIG_0(SamplerLogNormal.getCPtr(sampler), sampler, ProbabilityBoltzmannDownhill.getCPtr(probability), probability, TemperatureExponential.getCPtr(temperature), temperature, ReannealingTrivial.getCPtr(reannealing), reannealing, startTemperature, endTemperature, reAnnealSteps, resetScheme.swigValue(), resetSteps), true);
048  }
049
050  public LogNormalSimulatedAnnealing(SamplerLogNormal sampler, ProbabilityBoltzmannDownhill probability, TemperatureExponential temperature, ReannealingTrivial reannealing, double startTemperature, double endTemperature, long reAnnealSteps, LogNormalSimulatedAnnealing.ResetScheme resetScheme) {
051    this(QuantLibJNI.new_LogNormalSimulatedAnnealing__SWIG_1(SamplerLogNormal.getCPtr(sampler), sampler, ProbabilityBoltzmannDownhill.getCPtr(probability), probability, TemperatureExponential.getCPtr(temperature), temperature, ReannealingTrivial.getCPtr(reannealing), reannealing, startTemperature, endTemperature, reAnnealSteps, resetScheme.swigValue()), true);
052  }
053
054  public LogNormalSimulatedAnnealing(SamplerLogNormal sampler, ProbabilityBoltzmannDownhill probability, TemperatureExponential temperature, ReannealingTrivial reannealing, double startTemperature, double endTemperature, long reAnnealSteps) {
055    this(QuantLibJNI.new_LogNormalSimulatedAnnealing__SWIG_2(SamplerLogNormal.getCPtr(sampler), sampler, ProbabilityBoltzmannDownhill.getCPtr(probability), probability, TemperatureExponential.getCPtr(temperature), temperature, ReannealingTrivial.getCPtr(reannealing), reannealing, startTemperature, endTemperature, reAnnealSteps), true);
056  }
057
058  public LogNormalSimulatedAnnealing(SamplerLogNormal sampler, ProbabilityBoltzmannDownhill probability, TemperatureExponential temperature, ReannealingTrivial reannealing, double startTemperature, double endTemperature) {
059    this(QuantLibJNI.new_LogNormalSimulatedAnnealing__SWIG_3(SamplerLogNormal.getCPtr(sampler), sampler, ProbabilityBoltzmannDownhill.getCPtr(probability), probability, TemperatureExponential.getCPtr(temperature), temperature, ReannealingTrivial.getCPtr(reannealing), reannealing, startTemperature, endTemperature), true);
060  }
061
062  public LogNormalSimulatedAnnealing(SamplerLogNormal sampler, ProbabilityBoltzmannDownhill probability, TemperatureExponential temperature, ReannealingTrivial reannealing, double startTemperature) {
063    this(QuantLibJNI.new_LogNormalSimulatedAnnealing__SWIG_4(SamplerLogNormal.getCPtr(sampler), sampler, ProbabilityBoltzmannDownhill.getCPtr(probability), probability, TemperatureExponential.getCPtr(temperature), temperature, ReannealingTrivial.getCPtr(reannealing), reannealing, startTemperature), true);
064  }
065
066  public LogNormalSimulatedAnnealing(SamplerLogNormal sampler, ProbabilityBoltzmannDownhill probability, TemperatureExponential temperature, ReannealingTrivial reannealing) {
067    this(QuantLibJNI.new_LogNormalSimulatedAnnealing__SWIG_5(SamplerLogNormal.getCPtr(sampler), sampler, ProbabilityBoltzmannDownhill.getCPtr(probability), probability, TemperatureExponential.getCPtr(temperature), temperature, ReannealingTrivial.getCPtr(reannealing), reannealing), true);
068  }
069
070  public LogNormalSimulatedAnnealing(SamplerLogNormal sampler, ProbabilityBoltzmannDownhill probability, TemperatureExponential temperature) {
071    this(QuantLibJNI.new_LogNormalSimulatedAnnealing__SWIG_6(SamplerLogNormal.getCPtr(sampler), sampler, ProbabilityBoltzmannDownhill.getCPtr(probability), probability, TemperatureExponential.getCPtr(temperature), temperature), true);
072  }
073
074  public final static class ResetScheme {
075    public final static LogNormalSimulatedAnnealing.ResetScheme NoResetScheme = new LogNormalSimulatedAnnealing.ResetScheme("NoResetScheme");
076    public final static LogNormalSimulatedAnnealing.ResetScheme ResetToBestPoint = new LogNormalSimulatedAnnealing.ResetScheme("ResetToBestPoint");
077    public final static LogNormalSimulatedAnnealing.ResetScheme ResetToOrigin = new LogNormalSimulatedAnnealing.ResetScheme("ResetToOrigin");
078
079    public final int swigValue() {
080      return swigValue;
081    }
082
083    public String toString() {
084      return swigName;
085    }
086
087    public static ResetScheme swigToEnum(int swigValue) {
088      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
089        return swigValues[swigValue];
090      for (int i = 0; i < swigValues.length; i++)
091        if (swigValues[i].swigValue == swigValue)
092          return swigValues[i];
093      throw new IllegalArgumentException("No enum " + ResetScheme.class + " with value " + swigValue);
094    }
095
096    private ResetScheme(String swigName) {
097      this.swigName = swigName;
098      this.swigValue = swigNext++;
099    }
100
101    private ResetScheme(String swigName, int swigValue) {
102      this.swigName = swigName;
103      this.swigValue = swigValue;
104      swigNext = swigValue+1;
105    }
106
107    private ResetScheme(String swigName, ResetScheme swigEnum) {
108      this.swigName = swigName;
109      this.swigValue = swigEnum.swigValue;
110      swigNext = this.swigValue+1;
111    }
112
113    private static ResetScheme[] swigValues = { NoResetScheme, ResetToBestPoint, ResetToOrigin };
114    private static int swigNext = 0;
115    private final int swigValue;
116    private final String swigName;
117  }
118
119}