/** * Create from a string of the form "idx=val,...,idx=val" * * @param string The string * @param n The length of the array * @param defaultValue The default value * @return The array object * @throws SparseArrayFormatException If the string is not formatted as a * sparse array */ public static SparseRealArray fromString(String string, int n, double defaultValue) throws VectorFormatException { return fromString(string, n, defaultValue, ","); }
/** * Create from a string of the form "idx=val,...,idx=val" * * @param string The string * @param n The length of the array * @return The array object * @throws SparseArrayFormatException If the string is not formatted as a * sparse array */ public static SparseRealArray fromString(String string, int n) throws VectorFormatException { return fromString(string, n, 0.0, ","); }
@Override public Vector<Double> fromString(String s, int n) throws VectorFormatException { return SparseRealArray.fromString(s, n); }