Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/ITransformation.cs

Last change on this file was 15879, checked in by pfleck, 6 years ago

#2906 minor refactoring

File size: 2.4 KB
RevLine 
[10689]1#region License Information
2/* HeuristicLab
[15583]3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
[10689]4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System.Collections.Generic;
23using HeuristicLab.Core;
24
[11068]25namespace HeuristicLab.Problems.DataAnalysis {
[15846]26  public interface ITransformation : IParameterizedNamedItem {
[10695]27  }
28
29  public interface ITransformation<T> : ITransformation {
[15879]30    /// <summary>
31    /// Checks if the data is valid for the transformation.
32    /// Calling <code>Apply</code> or <code>Configure</code> on invalid data will throw an exception.
33    /// </summary>
34    /// <param name="data"></param>
35    /// <param name="errorMessage"></param>
36    /// <returns></returns>
[15846]37    bool Check(IEnumerable<T> data, out string errorMessage);
38
[15879]39    /// <summary>
40    /// Configure the internal parameter of the transformation for the given data.
41    /// </summary>
42    /// <param name="data"></param>
[15846]43    void Configure(IEnumerable<T> data);
44
[15879]45    /// <summary>
46    /// Transforms the given data based on the transformation's external and internal parameters.
47    /// </summary>
48    /// <param name="data"></param>
49    /// <returns></returns>
[10694]50    IEnumerable<T> Apply(IEnumerable<T> data);
[15879]51    /// <summary>
52    /// Inverse-transforms the given data based on the transformation's external and internal parameters.
53    /// </summary>
54    /// <param name="data"></param>
55    /// <returns></returns>
56    /// <remarks>If the data cannot be inverse transformed, i.e. if the original data was not in the domain of the transformation,
57    /// the returned values can contain invalid values or <code>InverseApply</code> might throw an exception.</remarks>
[15846]58    IEnumerable<T> InverseApply(IEnumerable<T> data);
[10689]59  }
60}
Note: See TracBrowser for help on using the repository browser.