public FeatureVector readFeatureVector(int currentUnitIndex,DataInput input) throws IOException {
  byte[] bytes=new byte[numByteFeatures];
  input.readFully(bytes);
  short[] shorts=new short[numShortFeatures];
  for (int i=0; i < shorts.length; i++) {
    shorts[i]=input.readShort();
  }
  float[] floats=new float[numContinuousFeatures];
  for (int i=0; i < floats.length; i++) {
    floats[i]=input.readFloat();
  }
  return new FeatureVector(bytes,shorts,floats,currentUnitIndex);
}

public FeatureVector readFeatureVector ( int currentUnitIndex , DataInput input ) throws IOException { byte [ ] bytes = new byte [ numByteFeatures ] ; input . readFully ( bytes ) ; short [ ] shorts = new short [ numShortFeatures ] ; for ( int i = 0 ; i < shorts . length ; i ++ ) { shorts [ i ] = input . readShort ( ) ; } float [ ] floats = new float [ numContinuousFeatures ] ; for ( int i = 0 ; i < floats . length ; i ++ ) { floats [ i ] = input . readFloat ( ) ; } return new FeatureVector ( bytes , shorts , floats , currentUnitIndex ) ; }
create a feature vector consistent with this feature definition by reading the data from the given input .
