/* ----------------------------------------------------------------------------
 * 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 InvCumulativeMersenneTwisterPathGenerator {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected InvCumulativeMersenneTwisterPathGenerator(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

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

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        QuantLibJNI.delete_InvCumulativeMersenneTwisterPathGenerator(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public InvCumulativeMersenneTwisterPathGenerator(StochasticProcess arg0, double length, long timeSteps, InvCumulativeMersenneTwisterGaussianRsg generator, boolean brownianBridge) {
    this(QuantLibJNI.new_InvCumulativeMersenneTwisterPathGenerator__SWIG_0(StochasticProcess.getCPtr(arg0), arg0, length, timeSteps, InvCumulativeMersenneTwisterGaussianRsg.getCPtr(generator), generator, brownianBridge), true);
  }

  public InvCumulativeMersenneTwisterPathGenerator(StochasticProcess arg0, TimeGrid timeGrid, InvCumulativeMersenneTwisterGaussianRsg generator, boolean brownianBridge) {
    this(QuantLibJNI.new_InvCumulativeMersenneTwisterPathGenerator__SWIG_1(StochasticProcess.getCPtr(arg0), arg0, TimeGrid.getCPtr(timeGrid), timeGrid, InvCumulativeMersenneTwisterGaussianRsg.getCPtr(generator), generator, brownianBridge), true);
  }

  public SamplePath next() {
    return new SamplePath(QuantLibJNI.InvCumulativeMersenneTwisterPathGenerator_next(swigCPtr, this), false);
  }

  public SamplePath antithetic() {
    return new SamplePath(QuantLibJNI.InvCumulativeMersenneTwisterPathGenerator_antithetic(swigCPtr, this), false);
  }

  public long size() {
    return QuantLibJNI.InvCumulativeMersenneTwisterPathGenerator_size(swigCPtr, this);
  }

  public TimeGrid timeGrid() {
    return new TimeGrid(QuantLibJNI.InvCumulativeMersenneTwisterPathGenerator_timeGrid(swigCPtr, this), false);
  }

}
