org.encog.mathutil
Class Convert
- java.lang.Object
-
- org.encog.mathutil.Convert
-
public final class Convert extends java.lang.ObjectThis class is used to convert strings into numeric values. If the string holds a non-numeric value, a zero is returned.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doublestring2double(java.lang.String str)Convert a string to a double.static intstring2int(java.lang.String str)Convert a string to an int.
-
-
-
Method Detail
-
string2double
public static double string2double(java.lang.String str)
Convert a string to a double. Just make the number a zero if the string is invalid.- Parameters:
str- The string.- Returns:
- The string converted to numeric.
-
string2int
public static int string2int(java.lang.String str)
Convert a string to an int. Just make the number a zero if the string is invalid.- Parameters:
str- The string.- Returns:
- The string converted to numeric.
-
-
DMelt 3.0 © DataMelt by jWork.ORG