Changeset 14834 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ExampleArgumentConverter.cs
- Timestamp:
- 04/10/17 00:27:31 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problem.ProgramSynthesis.BenchmarkSuite/ExampleArgumentConverter.cs
r14777 r14834 2 2 using System; 3 3 using System.Collections.Generic; 4 using System.Globalization; 4 5 using System.IO; 5 6 using System.Linq; … … 9 10 private static readonly char[] ArraySymbolTrim = { '[', ']', '(', ')' }; 10 11 public static double[] ConvertDoubles(string input) { 11 return ConvertMultiple(input, double.Parse);12 return ConvertMultiple(input, str => double.Parse(str, CultureInfo.InvariantCulture)); 12 13 } 13 14 14 15 public static double ConvertDouble(string input) { 15 return double.Parse(input );16 return double.Parse(input, CultureInfo.InvariantCulture); 16 17 } 17 18 … … 38 39 } 39 40 40 private static string[] trueFormats = new[]{ "true", "t", "1" };41 private static string[] falseFormats = new[]{ "false", "f", "0" };41 private static string[] trueFormats = { "true", "t", "1" }; 42 private static string[] falseFormats = { "false", "f", "0" }; 42 43 43 44 public static bool ConvertBoolean(string input) {
Note: See TracChangeset
for help on using the changeset viewer.