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

com.microsoft.ml.lightgbm.doubleChunkedArray Maven / Gradle / Ivy

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

package com.microsoft.ml.lightgbm;

public class doubleChunkedArray {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

  protected static long swigRelease(doubleChunkedArray obj) {
    long ptr = 0;
    if (obj != null) {
      if (!obj.swigCMemOwn)
        throw new RuntimeException("Cannot release ownership as memory is not owned");
      ptr = obj.swigCPtr;
      obj.swigCMemOwn = false;
      obj.delete();
    }
    return ptr;
  }

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

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

  public doubleChunkedArray(long chunk_size) {
    this(lightgbmlibJNI.new_doubleChunkedArray(chunk_size), true);
  }

  public void add(double value) {
    lightgbmlibJNI.doubleChunkedArray_add(swigCPtr, this, value);
  }

  public long get_add_count() {
    return lightgbmlibJNI.doubleChunkedArray_get_add_count(swigCPtr, this);
  }

  public long get_chunks_count() {
    return lightgbmlibJNI.doubleChunkedArray_get_chunks_count(swigCPtr, this);
  }

  public long get_last_chunk_add_count() {
    return lightgbmlibJNI.doubleChunkedArray_get_last_chunk_add_count(swigCPtr, this);
  }

  public long get_chunk_size() {
    return lightgbmlibJNI.doubleChunkedArray_get_chunk_size(swigCPtr, this);
  }

  public SWIGTYPE_p_p_double data() {
    long cPtr = lightgbmlibJNI.doubleChunkedArray_data(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_p_double(cPtr, false);
  }

  public SWIGTYPE_p_p_void data_as_void() {
    long cPtr = lightgbmlibJNI.doubleChunkedArray_data_as_void(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_p_void(cPtr, false);
  }

  public void coalesce_to(SWIGTYPE_p_double other, boolean all_valid_addresses) {
    lightgbmlibJNI.doubleChunkedArray_coalesce_to__SWIG_0(swigCPtr, this, SWIGTYPE_p_double.getCPtr(other), all_valid_addresses);
  }

  public void coalesce_to(SWIGTYPE_p_double other) {
    lightgbmlibJNI.doubleChunkedArray_coalesce_to__SWIG_1(swigCPtr, this, SWIGTYPE_p_double.getCPtr(other));
  }

  public double getitem(long chunk_index, long index_within_chunk, double on_fail_value) {
    return lightgbmlibJNI.doubleChunkedArray_getitem(swigCPtr, this, chunk_index, index_within_chunk, on_fail_value);
  }

  public int setitem(long chunk_index, long index_within_chunk, double value) {
    return lightgbmlibJNI.doubleChunkedArray_setitem(swigCPtr, this, chunk_index, index_within_chunk, value);
  }

  public void clear() {
    lightgbmlibJNI.doubleChunkedArray_clear(swigCPtr, this);
  }

  public void release() {
    lightgbmlibJNI.doubleChunkedArray_release(swigCPtr, this);
  }

  public boolean within_bounds(long chunk_index, long index_within_chunk) {
    return lightgbmlibJNI.doubleChunkedArray_within_bounds(swigCPtr, this, chunk_index, index_within_chunk);
  }

  public void new_chunk() {
    lightgbmlibJNI.doubleChunkedArray_new_chunk(swigCPtr, this);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy