Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/06/17 14:31:05 (7 years ago)
Author:
gkronber
Message:

#2779: merged r14889,r14890,r14943,r15024,r15088,r15094 from trunk to stable

Location:
stable/HeuristicLab.Problems.DataAnalysis/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs

    r15159 r15161  
    181181    }
    182182
     183    public IEnumerable<string> DateTimeVariables {
     184      get { return variableValues.Where(p => p.Value is IList<DateTime>).Select(p => p.Key); }
     185    }
     186
    183187    public IEnumerable<double> GetDoubleValues(string variableName) {
    184188      return GetValues<double>(variableName);
     
    215219      return new ReadOnlyCollection<string>(values);
    216220    }
     221
     222    public DateTime GetDateTimeValue(string variableName, int row) {
     223      var values = GetValues<DateTime>(variableName);
     224      return values[row];
     225    }
     226    public IEnumerable<DateTime> GetDateTimeValues(string variableName, IEnumerable<int> rows) {
     227      return GetValues<DateTime>(variableName, rows);
     228    }
     229    public ReadOnlyCollection<DateTime> GetReadOnlyDateTimeValues(string variableName) {
     230      var values = GetValues<DateTime>(variableName);
     231      return new ReadOnlyCollection<DateTime>(values);
     232    }
     233
    217234
    218235    private IEnumerable<T> GetValues<T>(string variableName, IEnumerable<int> rows) {
  • stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataset.cs

    r15131 r15161  
    3131    IEnumerable<string> DoubleVariables { get; }
    3232    IEnumerable<string> StringVariables { get; }
     33    IEnumerable<string> DateTimeVariables { get; }
    3334
    3435    bool VariableHasType<T>(string variableName);
     
    4445    ReadOnlyCollection<string> GetReadOnlyStringValues(string VariableName);
    4546
     47    System.DateTime GetDateTimeValue(string variableName, int row);
    4648    IEnumerable<DateTime> GetDateTimeValues(string variableName);
     49    IEnumerable<DateTime> GetDateTimeValues(string variableName, IEnumerable<int> rows);
     50    ReadOnlyCollection<DateTime> GetReadOnlyDateTimeValues(string variableName);
    4751  }
    4852}
Note: See TracChangeset for help on using the changeset viewer.