Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/23/16 16:19:04 (8 years ago)
Author:
mkommend
Message:

#2591: Changed all GP covariance and mean functions to use int[] for column indices instead of IEnumerable<int>. Changed GP utils, GPModel and StudentTProcessModell as well to use fewer iterators and adapted unit tests to new interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/MeanFunctions/MeanModel.cs

    r13136 r13721  
    7373    }
    7474
    75     public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, IEnumerable<int> columnIndices) {
     75    public ParameterizedMeanFunction GetParameterizedMeanFunction(double[] p, int[] columnIndices) {
    7676      if (p.Length > 0) throw new ArgumentException("No parameters allowed for model-based mean function.", "p");
    7777      var solution = RegressionSolution;
    7878      var variableNames = solution.ProblemData.AllowedInputVariables.ToArray();
    79       if (variableNames.Length != columnIndices.Count())
     79      if (variableNames.Length != columnIndices.Length)
    8080        throw new ArgumentException("The number of input variables does not match in MeanModel");
    8181      var variableValues = variableNames.Select(_ => new List<double>() { 0.0 }).ToArray(); // or of zeros
Note: See TracChangeset for help on using the changeset viewer.