|
| 1 | +// <copyright file="ILeastSquaresMinimizer.cs" company="Math.NET"> |
| 2 | +// Math.NET Numerics, part of the Math.NET Project |
| 3 | +// https://numerics.mathdotnet.com |
| 4 | +// https://github.com/mathnet/mathnet-numerics |
| 5 | +// |
| 6 | +// Copyright (c) 2009-$CURRENT_YEAR$ Math.NET |
| 7 | +// |
| 8 | +// Permission is hereby granted, free of charge, to any person |
| 9 | +// obtaining a copy of this software and associated documentation |
| 10 | +// files (the "Software"), to deal in the Software without |
| 11 | +// restriction, including without limitation the rights to use, |
| 12 | +// copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 13 | +// copies of the Software, and to permit persons to whom the |
| 14 | +// Software is furnished to do so, subject to the following |
| 15 | +// conditions: |
| 16 | +// |
| 17 | +// The above copyright notice and this permission notice shall be |
| 18 | +// included in all copies or substantial portions of the Software. |
| 19 | +// |
| 20 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 21 | +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
| 22 | +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 23 | +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
| 24 | +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
| 25 | +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 26 | +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 27 | +// OTHER DEALINGS IN THE SOFTWARE. |
| 28 | +// </copyright> |
| 29 | + |
| 30 | +using MathNet.Numerics.LinearAlgebra; |
| 31 | +using System.Collections.Generic; |
| 32 | + |
| 33 | +namespace MathNet.Numerics.Optimization |
| 34 | +{ |
| 35 | + /// <summary> |
| 36 | + /// Interface for solving nonlinear least squares problems. |
| 37 | + /// This interface unifies the Levenberg-Marquardt and Trust Region minimization algorithms. |
| 38 | + /// </summary> |
| 39 | + public interface ILeastSquaresMinimizer |
| 40 | + { |
| 41 | + /// <summary> |
| 42 | + /// Finds the minimum of a nonlinear least squares problem using the specified objective model and initial guess vector. |
| 43 | + /// </summary> |
| 44 | + /// <param name="objective">The objective function model to be minimized.</param> |
| 45 | + /// <param name="initialGuess">The initial guess vector.</param> |
| 46 | + /// <param name="lowerBound">Optional lower bound for the parameters.</param> |
| 47 | + /// <param name="upperBound">Optional upper bound for the parameters.</param> |
| 48 | + /// <param name="scales">Optional scales for the parameters.</param> |
| 49 | + /// <param name="isFixed">Optional list indicating which parameters are fixed.</param> |
| 50 | + /// <returns>A <see cref="NonlinearMinimizationResult"/> containing the results of the minimization.</returns> |
| 51 | + NonlinearMinimizationResult FindMinimum(IObjectiveModel objective, Vector<double> initialGuess, |
| 52 | + Vector<double> lowerBound = null, Vector<double> upperBound = null, Vector<double> scales = null, List<bool> isFixed = null); |
| 53 | + |
| 54 | + /// <summary> |
| 55 | + /// Finds the minimum of a nonlinear least squares problem using the specified objective model and initial guess array. |
| 56 | + /// </summary> |
| 57 | + /// <param name="objective">The objective function model to be minimized.</param> |
| 58 | + /// <param name="initialGuess">The initial guess array.</param> |
| 59 | + /// <param name="lowerBound">Optional lower bound array for the parameters.</param> |
| 60 | + /// <param name="upperBound">Optional upper bound array for the parameters.</param> |
| 61 | + /// <param name="scales">Optional scales array for the parameters.</param> |
| 62 | + /// <param name="isFixed">Optional array indicating which parameters are fixed.</param> |
| 63 | + /// <returns>A <see cref="NonlinearMinimizationResult"/> containing the results of the minimization.</returns> |
| 64 | + NonlinearMinimizationResult FindMinimum(IObjectiveModel objective, double[] initialGuess, |
| 65 | + double[] lowerBound = null, double[] upperBound = null, double[] scales = null, bool[] isFixed = null); |
| 66 | + } |
| 67 | +} |
0 commit comments