Class SparseVector

java.lang.Object
org.apache.wayang.ml4all.utils.SparseVector
All Implemented Interfaces:
Serializable

public class SparseVector extends Object implements Serializable
See Also:
  • Constructor Details

    • SparseVector

      public SparseVector()
    • SparseVector

      public SparseVector(int[] indices, double[] values)
    • SparseVector

      public SparseVector(double label, int[] indices, double[] values)
  • Method Details

    • getIndices

      public int[] getIndices()
    • getValues

      public double[] getValues()
    • getLabel

      public double getLabel()
    • getDenseValue

      public double getDenseValue(int index)
    • setLabel

      public void setLabel(double label)
    • setIndices

      public void setIndices(int[] indices)
    • setValues

      public void setValues(double[] values)
    • size

      public int size()
    • add

      public SparseVector add(SparseVector vector)
    • add2

      public SparseVector add2(SparseVector vector)
    • isEmpty

      public boolean isEmpty()
    • concat

      public double[] concat(double[] a, double[] b)
    • concat

      public int[] concat(int[] a, int[] b)
    • toString

      public String toString()
      Overrides:
      toString in class Object