Пример #1
0
        /// <summary>
        /// Creates an instance of this class. This constructor needs either
        /// <paramref name="dataTable"/>, <paramref name="xCol"/> and <paramref name="yCol"/> to be valid, or all to be null.
        /// If all null, consider to use the other provided constructor.
        /// </summary>
        /// <param name="fitFunc">Fitting function.</param>
        /// <param name="parameter">Array of default parameters (length must match the expected number of parameter of fitFunc).</param>
        /// <param name="dataTable">The data table from which the provided <paramref name="xCol"/> and <paramref name="yCol"/> originate.</param>
        /// <param name="groupNumber">The group number of the columns <paramref name="xCol"/> and <paramref name="yCol"/>.</param>
        /// <param name="xCol">Data column of independent values.</param>
        /// <param name="yCol">Data column of dependent values.</param>
        /// <param name="start">First point to be used for fitting.</param>
        /// <param name="count">Number of points to be used for fitting.</param>
        public SimpleNonlinearFit(FitEvaluationFunction fitFunc, double[] parameter, Altaxo.Data.DataTable dataTable, int groupNumber, Altaxo.Data.INumericColumn xCol, Altaxo.Data.INumericColumn yCol, int start, int count)
        {
            _fitDoc = new NonlinearFitDocument();

            if (null == dataTable && null == xCol && null == yCol)
            {
                _fitEle = new FitElement(Altaxo.Data.Selections.RangeOfRowIndices.FromStartAndCount(start, count));
            }
            else
            {
                _fitEle = new FitElement(dataTable, groupNumber, Altaxo.Data.Selections.RangeOfRowIndices.FromStartAndCount(start, count), xCol, yCol);
            }

            _fitEle.FitFunction = new DummyFitFunc(fitFunc, parameter);
            _fitDoc.FitEnsemble.Add(_fitEle);
            _fitDoc.SetDefaultParametersForFitElement(0);
        }
Пример #2
0
 /// <summary>
 /// Sets the values of the parameter back to their default value.
 /// </summary>
 public void ResetToDefaultParameters()
 {
     _fitDoc.SetDefaultParametersForFitElement(0);
 }
Пример #3
0
		/// <summary>
		/// Creates an instance of this class.
		/// </summary>
		/// <param name="fitFunc">Fitting function.</param>
		/// <param name="parameter">Array of default parameters (length must match the expected number of parameter of fitFunc).</param>
		/// <param name="xCol">Data column of independent values.</param>
		/// <param name="yCol">Data column of dependent values.</param>
		/// <param name="start">First point to be used for fitting.</param>
		/// <param name="count">Number of points to be used for fitting.</param>
		public SimpleNonlinearFit(FitEvaluationFunction fitFunc, double[] parameter, Altaxo.Data.INumericColumn xCol, Altaxo.Data.INumericColumn yCol, int start, int count)
		{
			_fitDoc = new NonlinearFitDocument();
			_fitEle = new FitElement(null, 0, Altaxo.Data.Selections.RangeOfRowIndices.FromStartAndCount(start, count), xCol, yCol);
			_fitEle.FitFunction = new DummyFitFunc(fitFunc, parameter);
			_fitDoc.FitEnsemble.Add(_fitEle);
			_fitDoc.SetDefaultParametersForFitElement(0);
		}