1 | /*
|
---|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
|
---|
3 | * contributor license agreements. See the NOTICE file distributed with
|
---|
4 | * this work for additional information regarding copyright ownership.
|
---|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
|
---|
6 | * (the "License"); you may not use this file except in compliance with
|
---|
7 | * the License. You may obtain a copy of the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
14 | * See the License for the specific language governing permissions and
|
---|
15 | * limitations under the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | package agents.anac.y2019.harddealer.math3.optimization;
|
---|
19 |
|
---|
20 | import agents.anac.y2019.harddealer.math3.analysis.MultivariateFunction;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * This interface is mainly intended to enforce the internal coherence of
|
---|
24 | * Commons-FastMath. Users of the API are advised to base their code on
|
---|
25 | * the following interfaces:
|
---|
26 | * <ul>
|
---|
27 | * <li>{@link agents.anac.y2019.harddealer.math3.optimization.MultivariateOptimizer}</li>
|
---|
28 | * <li>{@link agents.anac.y2019.harddealer.math3.optimization.MultivariateDifferentiableOptimizer}</li>
|
---|
29 | * </ul>
|
---|
30 | *
|
---|
31 | * @param <FUNC> Type of the objective function to be optimized.
|
---|
32 | *
|
---|
33 | * @deprecated As of 3.1 (to be removed in 4.0).
|
---|
34 | * @since 3.0
|
---|
35 | */
|
---|
36 | @Deprecated
|
---|
37 | public interface BaseMultivariateSimpleBoundsOptimizer<FUNC extends MultivariateFunction>
|
---|
38 | extends BaseMultivariateOptimizer<FUNC> {
|
---|
39 | /**
|
---|
40 | * Optimize an objective function.
|
---|
41 | *
|
---|
42 | * @param f Objective function.
|
---|
43 | * @param goalType Type of optimization goal: either
|
---|
44 | * {@link GoalType#MAXIMIZE} or {@link GoalType#MINIMIZE}.
|
---|
45 | * @param startPoint Start point for optimization.
|
---|
46 | * @param maxEval Maximum number of function evaluations.
|
---|
47 | * @param lowerBound Lower bound for each of the parameters.
|
---|
48 | * @param upperBound Upper bound for each of the parameters.
|
---|
49 | * @return the point/value pair giving the optimal value for objective
|
---|
50 | * function.
|
---|
51 | * @throws agents.anac.y2019.harddealer.math3.exception.DimensionMismatchException
|
---|
52 | * if the array sizes are wrong.
|
---|
53 | * @throws agents.anac.y2019.harddealer.math3.exception.TooManyEvaluationsException
|
---|
54 | * if the maximal number of evaluations is exceeded.
|
---|
55 | * @throws agents.anac.y2019.harddealer.math3.exception.NullArgumentException if
|
---|
56 | * {@code f}, {@code goalType} or {@code startPoint} is {@code null}.
|
---|
57 | * @throws agents.anac.y2019.harddealer.math3.exception.NumberIsTooSmallException if any
|
---|
58 | * of the initial values is less than its lower bound.
|
---|
59 | * @throws agents.anac.y2019.harddealer.math3.exception.NumberIsTooLargeException if any
|
---|
60 | * of the initial values is greater than its upper bound.
|
---|
61 | */
|
---|
62 | PointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
|
---|
63 | double[] startPoint,
|
---|
64 | double[] lowerBound, double[] upperBound);
|
---|
65 | }
|
---|