All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.ortools.constraintsolver.PathOperator Maven / Gradle / Ivy

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

package com.google.ortools.constraintsolver;

public class PathOperator extends IntVarLocalSearchOperator {
  private transient long swigCPtr;

  protected PathOperator(long cPtr, boolean cMemoryOwn) {
    super(operations_research_constraint_solverJNI.PathOperator_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        operations_research_constraint_solverJNI.delete_PathOperator(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  protected void swigDirectorDisconnect() {
    swigCMemOwn = false;
    delete();
  }

  public void swigReleaseOwnership() {
    swigCMemOwn = false;
    operations_research_constraint_solverJNI.PathOperator_change_ownership(this, swigCPtr, false);
  }

  public void swigTakeOwnership() {
    swigCMemOwn = true;
    operations_research_constraint_solverJNI.PathOperator_change_ownership(this, swigCPtr, true);
  }

  public PathOperator(IntVar[] next_vars, IntVar[] path_vars, int number_of_base_nodes, SWIGTYPE_p_std__functionT_int_flong_longF_t start_empty_path_class) {
    this(operations_research_constraint_solverJNI.new_PathOperator(next_vars, path_vars, number_of_base_nodes, SWIGTYPE_p_std__functionT_int_flong_longF_t.getCPtr(start_empty_path_class)), true);
    operations_research_constraint_solverJNI.PathOperator_director_connect(this, swigCPtr, swigCMemOwn, true);
  }

  public boolean neighbor() {
    return operations_research_constraint_solverJNI.PathOperator_neighbor(swigCPtr, this);
  }

  public boolean SkipUnchanged(int index) {
    return (getClass() == PathOperator.class) ? operations_research_constraint_solverJNI.PathOperator_SkipUnchanged(swigCPtr, this, index) : operations_research_constraint_solverJNI.PathOperator_SkipUnchangedSwigExplicitPathOperator(swigCPtr, this, index);
  }

  public long Next(long node_index) {
    return operations_research_constraint_solverJNI.PathOperator_Next(swigCPtr, this, node_index);
  }

  public long Path(long node_index) {
    return operations_research_constraint_solverJNI.PathOperator_Path(swigCPtr, this, node_index);
  }

  public int number_of_nexts() {
    return operations_research_constraint_solverJNI.PathOperator_number_of_nexts(swigCPtr, this);
  }

  protected boolean oneNeighbor() {
    return (getClass() == PathOperator.class) ? operations_research_constraint_solverJNI.PathOperator_oneNeighbor(swigCPtr, this) : operations_research_constraint_solverJNI.PathOperator_oneNeighborSwigExplicitPathOperator(swigCPtr, this);
  }

  protected boolean RestartAtPathStartOnSynchronize() {
    return (getClass() == PathOperator.class) ? operations_research_constraint_solverJNI.PathOperator_RestartAtPathStartOnSynchronize(swigCPtr, this) : operations_research_constraint_solverJNI.PathOperator_RestartAtPathStartOnSynchronizeSwigExplicitPathOperator(swigCPtr, this);
  }

  protected boolean OnSamePathAsPreviousBase(long base_index) {
    return (getClass() == PathOperator.class) ? operations_research_constraint_solverJNI.PathOperator_OnSamePathAsPreviousBase(swigCPtr, this, base_index) : operations_research_constraint_solverJNI.PathOperator_OnSamePathAsPreviousBaseSwigExplicitPathOperator(swigCPtr, this, base_index);
  }

  protected long GetBaseNodeRestartPosition(int base_index) {
    return (getClass() == PathOperator.class) ? operations_research_constraint_solverJNI.PathOperator_GetBaseNodeRestartPosition(swigCPtr, this, base_index) : operations_research_constraint_solverJNI.PathOperator_GetBaseNodeRestartPositionSwigExplicitPathOperator(swigCPtr, this, base_index);
  }

  protected void SetNextBaseToIncrement(long base_index) {
    if (getClass() == PathOperator.class) operations_research_constraint_solverJNI.PathOperator_SetNextBaseToIncrement(swigCPtr, this, base_index); else operations_research_constraint_solverJNI.PathOperator_SetNextBaseToIncrementSwigExplicitPathOperator(swigCPtr, this, base_index);
  }

  protected boolean InitPosition() {
    return (getClass() == PathOperator.class) ? operations_research_constraint_solverJNI.PathOperator_InitPosition(swigCPtr, this) : operations_research_constraint_solverJNI.PathOperator_InitPositionSwigExplicitPathOperator(swigCPtr, this);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy