code: public static Vector fromCSV(String csv) {
          StringTokenizer tokenizer = new StringTokenizer(csv, ", ");
          int estimatedLength = csv.length() / (5 + 2) + 1; // 5 symbols per element "0.000"
                                                            // 2 symbols for delimiter ", "
          Vector result = DenseVector.zero(estimatedLength);
  
          int i = 0;
          while (tokenizer.hasMoreTokens()) {
              if (result.length() == i) {
                  result = result.copyOfLength((i * 3) / 2 + 1);
              }
  
              double x = Double.parseDouble(tokenizer.nextToken());
              result.set(i++, x);
          }
  
          return result.copyOfLength(i);
      }
docs: Parses {@link Vector} from the given CSV string.
  
  @param csv the CSV string representing a vector
  
  @return a parsed vector