public static double[] parseVectorString(String vectorString){
  String[] parsedString=vectorString.split(",");
  double[] vector=new double[parsedString.length];
  for (int j=0; j < parsedString.length; j++) {
    double val=Utils.doubleParsable(parsedString[j]);
    vector[j]=Double.isNaN(val) ? 0 : val;
  }
  return vector;
}

public static double [ ] parseVectorString ( String vectorString ) { String [ ] parsedString = vectorString . split ( "," ) ; double [ ] vector = new double [ parsedString . length ] ; for ( int j = 0 ; j < parsedString . length ; j ++ ) { double val = Utils . doubleParsable ( parsedString [ j ] ) ; vector [ j ] = Double . isNaN ( val ) ? 0 : val ; } return vector ; }
converts a string representation of a vector ( e . g . " 1 , 0 , 0 , 1 , 0 " ) into a double array . invalid characters are converted to 0 .
