/** * Construct from native array * @param values the array of values */ public SparseByteFV(byte[] values) { this.values = new SparseBinSearchByteArray(values); }
/** * Construct empty FV with given number of bins * @param nbins the number of bins in each dimension */ public SparseByteFV(int nbins) { values = new SparseBinSearchByteArray(nbins); }
/** * Construct empty FV with given number of bins * @param nbins the number of bins in each dimension */ public SparseByteFV(int nbins) { values = new SparseBinSearchByteArray(nbins); }
/** * Construct from native array * @param values the array of values */ public SparseByteFV(byte[] values) { this.values = new SparseBinSearchByteArray(values); }
@Override public SparseByteArray copy() { SparseBinSearchByteArray copy = new SparseBinSearchByteArray(length); copy.used = used; copy.keys = Arrays.copyOf(keys, keys.length); copy.values = Arrays.copyOf(values, values.length); return copy; }
@Override public void readBinary(DataInput in) throws IOException { values = new SparseBinSearchByteArray(0); values.readBinary(in); }
@Override public void readASCII(Scanner in) throws IOException { values = new SparseBinSearchByteArray(0); values.readASCII(in); }
@Override public void readBinary(DataInput in) throws IOException { values = new SparseBinSearchByteArray(0); values.readBinary(in); }
@Override public void readASCII(Scanner in) throws IOException { values = new SparseBinSearchByteArray(0); values.readASCII(in); }