Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/12/12 10:31:56 (12 years ago)
Author:
mkommend
Message:

#1081: Improved performance of time series prognosis.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis/3.4/DatasetExtensions.cs

    r7154 r7989  
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    24 using System.Linq;
    25 using System.Text;
    26 using HeuristicLab.PluginInfrastructure;
    2723
    2824namespace HeuristicLab.Problems.DataAnalysis {
    2925  public static class DatasetExtensions {
    30     public static IEnumerable<double> GetVectorEnumerable(this Dataset ds, IEnumerable<string> targetVariables, IEnumerable<int> rows) {
    31       var vars = targetVariables.ToArray();
    32       var values = (from var in vars
    33                     select ds.GetReadOnlyDoubleValues(var))
    34         .ToArray();
    35 
    36       foreach (var r in rows) {
    37         for (int i = 0; i < values.Length; i++)
    38           yield return values[i][r];
    39       }
    40     }
    41 
    4226    public static IEnumerable<T> TakeEvery<T>(this IEnumerable<T> xs, int nth) {
    4327      int i = 0;
Note: See TracChangeset for help on using the changeset viewer.