IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Contains methods for the analysis of multi-dimensional functions. More...
Static Public Member Functions | |
static MultiExtremum | FindGlobalMinimum (Func< IList< double >, double > function, IList< Interval > volume) |
static MultiExtremum | FindGlobalMinimum (Func< IList< double >, double > function, IList< Interval > volume, EvaluationSettings settings) |
static MultiExtremum | FindGlobalMaximum (Func< IList< double >, double > function, IList< Interval > volume) |
static MultiExtremum | FindGlobalMaximum (Func< IList< double >, double > function, IList< Interval > volume, EvaluationSettings settings) |
static MultiExtremum | FindMinimum (Func< IList< double >, double > function, IList< double > start) |
Finds a local minimum of a multi-dimensional function in the vincinity of the given starting location. More... | |
static MultiExtremum | FindMinimum (Func< IList< double >, double > function, IList< double > start, EvaluationSettings settings) |
Finds a local minimum of a multi-dimensional function in the vincinity of the given starting location, subject to the given evaluation constraints. More... | |
static MultiExtremum | FindMaximum (Func< IList< double >, double > function, IList< double > start, EvaluationSettings settings) |
Finds a local maximum of a multi-dimensional function in the vincinity of the given starting location, subject to the given evaluation constraints. More... | |
static IntegrationResult | Integrate (Func< IList< double >, double > function, IList< Interval > volume) |
Estimates a multi-dimensional integral. More... | |
static IntegrationResult | Integrate (Func< IList< double >, double > function, IList< Interval > volume, EvaluationSettings settings) |
Estimates a multi-dimensional integral using the given evaluation settings. More... | |
Static Private Member Functions | |
static DifferentialEvolutionSettings | GetDefaultSettings (EvaluationSettings settings, int d) |
static MultiExtremum | FindGlobalExtremum (MultiFunctor f, IList< Interval > volume, DifferentialEvolutionSettings settings) |
static EvaluationSettings | GetDefaultOptimizationSettings (int d) |
static MultiExtremum | FindMinimum_ModelTrust (MultiFunctor f, IList< double > x, double s, EvaluationSettings settings) |
static UncertainValue | Integrate_Adaptave (MultiFunctor f, CoordinateTransform[] map, IntegrationRegion r, EvaluationSettings settings) |
static UncertainValue | Integrate_MonteCarlo (MultiFunctor f, CoordinateTransform[] map, IList< Interval > box, EvaluationSettings settings) |
static double | Integrate_MonteCarlo_Cycle (MultiFunctor f, CoordinateTransform[] map, VectorGenerator g, LePageGrid grid, int n) |
Private Attributes | |
const double | mutationFactor = 0.625 |
Contains methods for the analysis of multi-dimensional functions.
|
inlinestatic |
Referenced by Test.MultiExtremumTest.Ackley(), Test.MultiExtremumTest.Bukin(), Test.MultiExtremumTest.Easom(), Test.MultiExtremumTest.GoldsteinPrice(), Test.MultiExtremumTest.Griewank(), Test.MultiExtremumTest.PackSpheresInCube(), Test.MultiExtremumTest.Schwefel(), FutureTest.FutureTest.STA(), and Test.MultiExtremumTest.ThompsonProblem().
|
inlinestaticprivate |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestaticprivate |
|
inlinestatic |
Finds a local minimum of a multi-dimensional function in the vincinity of the given starting location.
function | The multi-dimensional function to minimize. |
start | The starting location for the search. |
Referenced by Test.MultiExtremumTest.Beale(), Test.MultiExtremumTest.GoldsteinPrice(), Meta.Numerics.Statistics.BivariateSample.LinearLogisticRegression(), Test.MultiExtremumTest.LocalThomson(), Test.MultiExtremumTest.Perm(), Test.MultiExtremumTest.PerturbedQuadratic(), Test.MultiExtremumTest.Quadratic(), Test.MultiExtremumTest.Rosenbrock(), Test.MultiExtremumTest.SmoothedEasom(), Test.MultiExtremumTest.StylblinskiTang(), Test.MultiExtremumTest.SumOfPowers(), Test.MultiExtremumTest.ThreeHumpCamel(), and Test.MultiExtremumTest.Vardim().
|
inlinestaticprivate |
|
inlinestatic |
Finds a local minimum of a multi-dimensional function in the vincinity of the given starting location, subject to the given evaluation constraints.
function | The multi-dimensional function to minimize. |
start | The starting location for the search. |
settings | The evaluation settings that govern the search for the minimum. |
|
inlinestatic |
Finds a local maximum of a multi-dimensional function in the vincinity of the given starting location, subject to the given evaluation constraints.
function | The multi-dimensional function to maximize. |
start | The starting location for the search. |
settings | The evaluation settings that govern the search for the maximum. |
|
inlinestaticprivate |
|
inlinestatic |
Estimates a multi-dimensional integral.
function | The function to integrate. |
volume | The volume over which to integrate. |
By default, our multidimensional integration system targets a relative accuracy of about 10-7 (close to full single precision) for d=2, falling gradually to about 10-2 (1%) for d=12. To achieve that accuracy, it allows up to about 105 evaluations of the integrand for d=2, rising up to about 108 evaluations for d=12.
You can change the accuracy demands and evaluation budget by passing an EvaluationSettings object to the integration method. By decreasing the accuracy you require or increasing the evaluation budget, you may be able to successfully complete integrals that would fail for the default settings.
Referenced by Test.MultiIntegrateTest.BallVolumeIntegrals(), Test.MultiIntegrateTest.BoxIntegralB(), Test.MultiIntegrateTest.BoxIntegralD(), Test.MultiIntegrateTest.DoubleIntegrals(), Test.MultiIntegrateTest.GaussianIntegrals(), Test.MultiIntegrateTest.IsingIntegrals(), Test.MultiIntegrateTest.RambleIntegral(), Test.MultiIntegrateTest.SeperableIntegrals(), Test.MultiIntegrateTest.SteinmetzVolume(), Test.MultiIntegrateTest.WatsonIntegrals(), and Test.MultiIntegrateTest.ZetaIntegrals().
|
inlinestatic |
Estimates a multi-dimensional integral using the given evaluation settings.
function | The function to be integrated. |
volume | The volume over which to integrate. |
settings | The integration settings. |
Note that the integration function must not attempt to modify the argument passed to it.
Note that the integration volume must be a hyper-rectangle. You can integrate over regions with more complex boundaries by specifying the integration volume as a bounding hyper-rectangle that encloses your desired integration region, and returing the value 0 for the integrand outside of the desired integration region. For example, to find the volume of a unit d-sphere, you can integrate a function that is 1 inside the unit d-sphere and 0 outside it over the volume [-1,1]d. You can integrate over infinite volumes by specifing volume endpoints of Double.PositiveInfinity and/or Double.NegativeInfinity. Volumes with dimension greater than 12 are not currently supported.
Integrals with hard boundaries (like our hyper-sphere volume problem) typically require more evaluations than integrals of smooth functions to achieve the same accuracy. Integrals with canceling positive and negative contributions also typically require more evaluations than integtrals of purely positive functions.
Numerical multi-dimensional integration is computationally expensive. To make problems more tractable, keep in mind some rules of thumb:
ArgumentException | function , volume , or settings are null, or the dimension of volume is larger than 12. |
NonconvergenceException | The prescribed accuracy could not be achieved with the given evaluation budget. |
References Meta.Numerics.Analysis.EvaluationSettings.AbsolutePrecision, Meta.Numerics.Interval.FromEndpoints(), Meta.Numerics.Interval.LeftEndpoint, Meta.Numerics.Analysis.EvaluationSettings.RelativePrecision, Meta.Numerics.Interval.RightEndpoint, Meta.Numerics.UncertainValue.Uncertainty, and Meta.Numerics.UncertainValue.Value.
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
private |