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

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

There is a newer version: 4.4.0-1
Show newest version
/* ----------------------------------------------------------------------------
 * 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 com.microsoft.ml.lightgbm;

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

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

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

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

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

  public void setIndices(int[] value) {
    lightgbmlibJNI.CSRDirect_indices_set(swigCPtr, this, value);
  }

  public int[] getIndices() {
    return lightgbmlibJNI.CSRDirect_indices_get(swigCPtr, this);
  }

  public void setValues(double[] value) {
    lightgbmlibJNI.CSRDirect_values_set(swigCPtr, this, value);
  }

  public double[] getValues() {
    return lightgbmlibJNI.CSRDirect_values_get(swigCPtr, this);
  }

  public void setIndices0(SWIGTYPE_p_int value) {
    lightgbmlibJNI.CSRDirect_indices0_set(swigCPtr, this, SWIGTYPE_p_int.getCPtr(value));
  }

  public SWIGTYPE_p_int getIndices0() {
    long cPtr = lightgbmlibJNI.CSRDirect_indices0_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
  }

  public void setValues0(SWIGTYPE_p_double value) {
    lightgbmlibJNI.CSRDirect_values0_set(swigCPtr, this, SWIGTYPE_p_double.getCPtr(value));
  }

  public SWIGTYPE_p_double getValues0() {
    long cPtr = lightgbmlibJNI.CSRDirect_values0_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_double(cPtr, false);
  }

  public void setSize(int value) {
    lightgbmlibJNI.CSRDirect_size_set(swigCPtr, this, value);
  }

  public int getSize() {
    return lightgbmlibJNI.CSRDirect_size_get(swigCPtr, this);
  }

  public CSRDirect() {
    this(lightgbmlibJNI.new_CSRDirect(), true);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy