[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 |
|
---|
| 22 | using System.Collections.Generic;
|
---|
| 23 | using HeuristicLab.Core;
|
---|
| 24 |
|
---|
[11068] | 25 | namespace 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 | }
|
---|