File size: 2,469 Bytes
b1b3bae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#region Copyright © 2009, De Santiago-Castillo JA. All rights reserved.

//Copyright © 2009 Jose Antonio De Santiago-Castillo 
//E-mail:JAntonioDeSantiago@gmail.com
//Web: www.DotNumerics.com
//
#endregion

using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;


namespace DotNumerics.Optimization
{
    /// <summary>
    /// Represents a base class for optimization classes. 
    /// </summary>
    public abstract class xMinimizationBase 
    {

        #region Fields

        /// <summary>
        /// All the variables.
        /// </summary>
        protected double[] _Variables;

        /// <summary>
        /// The initial guess .
        /// </summary>
        protected double[] _FreeVariables;

        /// <summary>
        /// Desired accuracy for the solution.
        /// </summary>
        protected double _Tolerance = 1e-6;
        /// <summary>
        /// Maximum number of function evaluations.
        /// </summary>
        protected int _MaxFunEvaluations = 3000;

        /// <summary>
        /// The number of function evaluations used to compute the minimum.
        /// </summary>
        protected int _FunEvaluations = 0;


        /// <summary>
        /// The number of variables.
        /// </summary>
        protected int _NumFreeVariables = 0;


        //protected bool MeAreOptVariables = false;
        //protected bool MeAreBoundVariables = false;

        #endregion

        #region Properties

        /// <summary>
        /// Maximum number of function evaluations.
        /// </summary>
        public int MaxFunEvaluations
        {
            get { return _MaxFunEvaluations; }
            set { _MaxFunEvaluations = value; }
        }

        /// <summary>
        /// The number of function evaluations used to compute the minimum.
        /// </summary>
        public int FunEvaluations
        {
            get { return _FunEvaluations; }
            set { _FunEvaluations = value; }
        }

        /// <summary>
        /// Desired accuracy for the solution.
        /// </summary>
        public double Tolerance
        {
            get { return _Tolerance; }
            set 
            {
                _Tolerance = value;
            }
        }

        #endregion


        #region Methods

        //internal 


        #endregion

    }
}