Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4031


Ignore:
Timestamp:
07/14/10 10:27:26 (14 years ago)
Author:
mkommend
Message:
  • changed access modifier of serializable ctor to private in the Dataset because it is a sealed class
  • added variable values access methods

(ticket #1082)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Dataset.cs

    r3994 r4031  
    4141
    4242    [StorableConstructor]
    43     protected Dataset(bool deserializing)
     43    private Dataset(bool deserializing)
    4444      : base(deserializing) {
    4545    }
     
    110110        yield return data[i + start, variableIndex];
    111111    }
     112    public IEnumerable<double> GetEnumeratedVariableValues(int variableIndex, IEnumerable<int> rows) {
     113      foreach (int row in rows)
     114        yield return data[row, variableIndex];
     115    }
     116
    112117    public IEnumerable<double> GetEnumeratedVariableValues(string variableName) {
    113118      return GetEnumeratedVariableValues(GetVariableIndex(variableName), 0, Rows);
     
    115120    public IEnumerable<double> GetEnumeratedVariableValues(string variableName, int start, int end) {
    116121      return GetEnumeratedVariableValues(GetVariableIndex(variableName), start, end);
     122    }
     123    public IEnumerable<double> GetEnumeratedVariableValues(string variableName, IEnumerable<int> rows) {
     124      return GetEnumeratedVariableValues(GetVariableIndex(variableName), rows);
    117125    }
    118126
Note: See TracChangeset for help on using the changeset viewer.