/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.quantlib;

public class FittedBondDiscountCurve extends YieldTermStructure {
  private transient long swigCPtr;
  private transient boolean swigCMemOwnDerived;

  protected FittedBondDiscountCurve(long cPtr, boolean cMemoryOwn) {
    super(QuantLibJNI.FittedBondDiscountCurve_SWIGSmartPtrUpcast(cPtr), true);
    swigCMemOwnDerived = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(FittedBondDiscountCurve obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwnDerived = own;
    super.swigSetCMemOwn(own);
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwnDerived) {
        swigCMemOwnDerived = false;
        QuantLibJNI.delete_FittedBondDiscountCurve(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public FittedBondDiscountCurve(long settlementDays, Calendar calendar, BondHelperVector helpers, DayCounter dayCounter, FittingMethod fittingMethod, double accuracy, long maxEvaluations, Array guess, double simplexLambda) {
    this(QuantLibJNI.new_FittedBondDiscountCurve__SWIG_0(settlementDays, Calendar.getCPtr(calendar), calendar, BondHelperVector.getCPtr(helpers), helpers, DayCounter.getCPtr(dayCounter), dayCounter, FittingMethod.getCPtr(fittingMethod), fittingMethod, accuracy, maxEvaluations, Array.getCPtr(guess), guess, simplexLambda), true);
  }

  public FittedBondDiscountCurve(long settlementDays, Calendar calendar, BondHelperVector helpers, DayCounter dayCounter, FittingMethod fittingMethod, double accuracy, long maxEvaluations, Array guess) {
    this(QuantLibJNI.new_FittedBondDiscountCurve__SWIG_1(settlementDays, Calendar.getCPtr(calendar), calendar, BondHelperVector.getCPtr(helpers), helpers, DayCounter.getCPtr(dayCounter), dayCounter, FittingMethod.getCPtr(fittingMethod), fittingMethod, accuracy, maxEvaluations, Array.getCPtr(guess), guess), true);
  }

  public FittedBondDiscountCurve(long settlementDays, Calendar calendar, BondHelperVector helpers, DayCounter dayCounter, FittingMethod fittingMethod, double accuracy, long maxEvaluations) {
    this(QuantLibJNI.new_FittedBondDiscountCurve__SWIG_2(settlementDays, Calendar.getCPtr(calendar), calendar, BondHelperVector.getCPtr(helpers), helpers, DayCounter.getCPtr(dayCounter), dayCounter, FittingMethod.getCPtr(fittingMethod), fittingMethod, accuracy, maxEvaluations), true);
  }

  public FittedBondDiscountCurve(long settlementDays, Calendar calendar, BondHelperVector helpers, DayCounter dayCounter, FittingMethod fittingMethod, double accuracy) {
    this(QuantLibJNI.new_FittedBondDiscountCurve__SWIG_3(settlementDays, Calendar.getCPtr(calendar), calendar, BondHelperVector.getCPtr(helpers), helpers, DayCounter.getCPtr(dayCounter), dayCounter, FittingMethod.getCPtr(fittingMethod), fittingMethod, accuracy), true);
  }

  public FittedBondDiscountCurve(long settlementDays, Calendar calendar, BondHelperVector helpers, DayCounter dayCounter, FittingMethod fittingMethod) {
    this(QuantLibJNI.new_FittedBondDiscountCurve__SWIG_4(settlementDays, Calendar.getCPtr(calendar), calendar, BondHelperVector.getCPtr(helpers), helpers, DayCounter.getCPtr(dayCounter), dayCounter, FittingMethod.getCPtr(fittingMethod), fittingMethod), true);
  }

  public FittedBondDiscountCurve(Date referenceDate, BondHelperVector helpers, DayCounter dayCounter, FittingMethod fittingMethod, double accuracy, long maxEvaluations, Array guess, double simplexLambda) {
    this(QuantLibJNI.new_FittedBondDiscountCurve__SWIG_5(Date.getCPtr(referenceDate), referenceDate, BondHelperVector.getCPtr(helpers), helpers, DayCounter.getCPtr(dayCounter), dayCounter, FittingMethod.getCPtr(fittingMethod), fittingMethod, accuracy, maxEvaluations, Array.getCPtr(guess), guess, simplexLambda), true);
  }

  public FittedBondDiscountCurve(Date referenceDate, BondHelperVector helpers, DayCounter dayCounter, FittingMethod fittingMethod, double accuracy, long maxEvaluations, Array guess) {
    this(QuantLibJNI.new_FittedBondDiscountCurve__SWIG_6(Date.getCPtr(referenceDate), referenceDate, BondHelperVector.getCPtr(helpers), helpers, DayCounter.getCPtr(dayCounter), dayCounter, FittingMethod.getCPtr(fittingMethod), fittingMethod, accuracy, maxEvaluations, Array.getCPtr(guess), guess), true);
  }

  public FittedBondDiscountCurve(Date referenceDate, BondHelperVector helpers, DayCounter dayCounter, FittingMethod fittingMethod, double accuracy, long maxEvaluations) {
    this(QuantLibJNI.new_FittedBondDiscountCurve__SWIG_7(Date.getCPtr(referenceDate), referenceDate, BondHelperVector.getCPtr(helpers), helpers, DayCounter.getCPtr(dayCounter), dayCounter, FittingMethod.getCPtr(fittingMethod), fittingMethod, accuracy, maxEvaluations), true);
  }

  public FittedBondDiscountCurve(Date referenceDate, BondHelperVector helpers, DayCounter dayCounter, FittingMethod fittingMethod, double accuracy) {
    this(QuantLibJNI.new_FittedBondDiscountCurve__SWIG_8(Date.getCPtr(referenceDate), referenceDate, BondHelperVector.getCPtr(helpers), helpers, DayCounter.getCPtr(dayCounter), dayCounter, FittingMethod.getCPtr(fittingMethod), fittingMethod, accuracy), true);
  }

  public FittedBondDiscountCurve(Date referenceDate, BondHelperVector helpers, DayCounter dayCounter, FittingMethod fittingMethod) {
    this(QuantLibJNI.new_FittedBondDiscountCurve__SWIG_9(Date.getCPtr(referenceDate), referenceDate, BondHelperVector.getCPtr(helpers), helpers, DayCounter.getCPtr(dayCounter), dayCounter, FittingMethod.getCPtr(fittingMethod), fittingMethod), true);
  }

  public FittingMethod fitResults() {
    return new FittingMethod(QuantLibJNI.FittedBondDiscountCurve_fitResults(swigCPtr, this), false);
  }

}
