edu.uci.jforests.dataset
Class NumericArray
- java.lang.Object
-
- edu.uci.jforests.dataset.NumericArray
-
- All Implemented Interfaces:
- ByteSerializable
- Direct Known Subclasses:
- BitNumericArray, ByteNumericArray, IntNumericArray, NullNumericArray, ShortNumericArray
public abstract class NumericArray extends java.lang.Object implements ByteSerializable
-
-
Constructor Summary
Constructors Constructor and Description NumericArray(int length)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract intget(int index)abstract intgetBitsPerItem()intgetLength()abstract intgetSizeInBytes()abstract NumericArraygetSubSampleNumericArray(int[] indices)abstract NumericArrayFactory.NumericArrayTypegetType()voidinitHistogram(DecisionHistogram histogram, int numInstancesInLeaf, double[] targets, double[] weights, int[] indices, int[] instances)voidinitHistogram(RegressionHistogram histogram, int numInstancesInLeaf, double[] targets, double[] weights, int[] indices, int[] instances)abstract intloadFromByteArray(byte[] arr, int offset)abstract voidset(int index, int value)abstract inttoByteArray(byte[] arr, int offset)
-
-
-
Method Detail
-
getLength
public int getLength()
-
getType
public abstract NumericArrayFactory.NumericArrayType getType()
-
getBitsPerItem
public abstract int getBitsPerItem()
-
getSizeInBytes
public abstract int getSizeInBytes()
- Specified by:
getSizeInBytesin interfaceByteSerializable
-
toByteArray
public abstract int toByteArray(byte[] arr, int offset)- Specified by:
toByteArrayin interfaceByteSerializable
-
loadFromByteArray
public abstract int loadFromByteArray(byte[] arr, int offset)- Specified by:
loadFromByteArrayin interfaceByteSerializable
-
get
public abstract int get(int index)
-
set
public abstract void set(int index, int value)
-
initHistogram
public void initHistogram(RegressionHistogram histogram, int numInstancesInLeaf, double[] targets, double[] weights, int[] indices, int[] instances)
-
initHistogram
public void initHistogram(DecisionHistogram histogram, int numInstancesInLeaf, double[] targets, double[] weights, int[] indices, int[] instances)
-
getSubSampleNumericArray
public abstract NumericArray getSubSampleNumericArray(int[] indices)
-
-
DMelt 3.0 © DataMelt by jWork.ORG