/** * Parses {@link DenseVector} from the given CSV string. * * @param csv the CSV string representing a vector * @return a parsed vector */ public static DenseVector fromCSV(String csv) { return Vector.fromCSV(csv).to(Vectors.DENSE); }
/** * Creates new {@link DenseVector} from index-value map * * @param map index-value map * @param length vector length * @return created vector */ public static DenseVector fromMap(Map<Integer, ? extends Number> map, int length) { return Vector.fromMap(map, length).to(Vectors.DENSE); }
@Override public <T> T apply(VectorVectorOperation<T> operation, Vector that) { return that.apply(operation.partiallyApply(this)); }
/** * Parses {@link DenseVector} from the given Matrix Market string. * * @param mm the string in Matrix Market format * @return a parsed vector */ public static DenseVector fromMatrixMarket(String mm) { return Vector.fromMatrixMarket(mm).to(Vectors.DENSE); }