Changeset 16628 for branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Parser
- Timestamp:
- 02/28/19 12:41:36 (6 years ago)
- Location:
- branches/2971_named_intervals
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals
-
Property
svn:ignore
set to
packages
-
Property
svn:ignore
set to
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Parser/IntervalConstraint.cs
r16596 r16628 4 4 using System.Text; 5 5 using System.Threading.Tasks; 6 using HEAL.Attic; 6 7 7 8 namespace HeuristicLab.Problems.DataAnalysis { 9 [StorableType("8109BE58-CCFB-4462-A2F4-EEE5DFADAFF7")] 8 10 public class IntervalConstraint { 9 11 public string Expression { get; set; } -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Parser/IntervalConstraintsParser.cs
r16592 r16628 2 2 using System.Collections.Generic; 3 3 using System.Globalization; 4 using System.IO;5 using System.Linq;6 using System.Text;7 4 using System.Text.RegularExpressions; 8 using System.Threading.Tasks;9 using HeuristicLab.Optimization;10 5 11 6 namespace HeuristicLab.Problems.DataAnalysis { … … 27 22 if (match.Success) { 28 23 intervalConstraint.NumberOfDerivation = match.Groups[2].Success ? ParseDerivationCount(match.Groups[2].Value) : 1; 29 intervalConstraint.Definition = match.Groups[3].Value ;24 intervalConstraint.Definition = match.Groups[3].Value.Trim(' ', '\t', '\n', '\r'); 30 25 intervalConstraint.IsDerivation = true; 31 26 var formulation = Regex.Match(splitted[1], @"([d∂])(.*[^²³])([²³])?"); … … 37 32 } 38 33 } else { 39 intervalConstraint.Definition = Regex.Match(definition, @".*[^.\s]*").Value ;34 intervalConstraint.Definition = Regex.Match(definition, @".*[^.\s]*").Value.Trim(' ','\t','\n','\r'); 40 35 intervalConstraint.IsDerivation = false; 41 36 }
Note: See TracChangeset
for help on using the changeset viewer.