//------------------------------------------------------------------------------
// <auto-generated />
//
// 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.
//------------------------------------------------------------------------------

namespace QuantLib {

public class StochasticProcess1D : StochasticProcess {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  private bool swigCMemOwnDerived;

  internal StochasticProcess1D(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NQuantLibcPINVOKE.StochasticProcess1D_SWIGSmartPtrUpcast(cPtr), true) {
    swigCMemOwnDerived = cMemoryOwn;
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(StochasticProcess1D obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  protected override void Dispose(bool disposing) {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwnDerived) {
          swigCMemOwnDerived = false;
          NQuantLibcPINVOKE.delete_StochasticProcess1D(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
      base.Dispose(disposing);
    }
  }

  public double x0() {
    double ret = NQuantLibcPINVOKE.StochasticProcess1D_x0(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double drift(double t, double x) {
    double ret = NQuantLibcPINVOKE.StochasticProcess1D_drift(swigCPtr, t, x);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double diffusion(double t, double x) {
    double ret = NQuantLibcPINVOKE.StochasticProcess1D_diffusion(swigCPtr, t, x);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double expectation(double t0, double x0, double dt) {
    double ret = NQuantLibcPINVOKE.StochasticProcess1D_expectation(swigCPtr, t0, x0, dt);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double stdDeviation(double t0, double x0, double dt) {
    double ret = NQuantLibcPINVOKE.StochasticProcess1D_stdDeviation(swigCPtr, t0, x0, dt);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double variance(double t0, double x0, double dt) {
    double ret = NQuantLibcPINVOKE.StochasticProcess1D_variance(swigCPtr, t0, x0, dt);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double evolve(double t0, double x0, double dt, double dw) {
    double ret = NQuantLibcPINVOKE.StochasticProcess1D_evolve(swigCPtr, t0, x0, dt, dw);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double apply(double x0, double dx) {
    double ret = NQuantLibcPINVOKE.StochasticProcess1D_apply(swigCPtr, x0, dx);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
