15
|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
2 <!--NewPage-->
|
|
3 <HTML>
|
|
4 <HEAD>
|
|
5 <!-- Generated by javadoc (build 1.6.0_17) on Sat Mar 27 22:46:15 EDT 2010 -->
|
|
6 <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
7 <TITLE>
|
|
8 MultiStartUnivariateRealOptimizer (Commons Math 2.1 API)
|
|
9 </TITLE>
|
|
10
|
|
11 <META NAME="date" CONTENT="2010-03-27">
|
|
12
|
|
13 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
|
|
14
|
|
15 <SCRIPT type="text/javascript">
|
|
16 function windowTitle()
|
|
17 {
|
|
18 if (location.href.indexOf('is-external=true') == -1) {
|
|
19 parent.document.title="MultiStartUnivariateRealOptimizer (Commons Math 2.1 API)";
|
|
20 }
|
|
21 }
|
|
22 </SCRIPT>
|
|
23 <NOSCRIPT>
|
|
24 </NOSCRIPT>
|
|
25
|
|
26 </HEAD>
|
|
27
|
|
28 <BODY BGCOLOR="white" onload="windowTitle();">
|
|
29 <HR>
|
|
30
|
|
31
|
|
32 <!-- ========= START OF TOP NAVBAR ======= -->
|
|
33 <A NAME="navbar_top"><!-- --></A>
|
|
34 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
35 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
36 <TR>
|
|
37 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
38 <A NAME="navbar_top_firstrow"><!-- --></A>
|
|
39 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
40 <TR ALIGN="center" VALIGN="top">
|
|
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
43 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MultiStartUnivariateRealOptimizer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
48 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
49 </TR>
|
|
50 </TABLE>
|
|
51 </TD>
|
|
52 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
53 </EM>
|
|
54 </TD>
|
|
55 </TR>
|
|
56
|
|
57 <TR>
|
|
58 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
59 <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartMultivariateRealOptimizer.html" title="class in org.apache.commons.math.optimization"><B>PREV CLASS</B></A>
|
|
60 <A HREF="../../../../../org/apache/commons/math/optimization/MultivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization"><B>NEXT CLASS</B></A></FONT></TD>
|
|
61 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
62 <A HREF="../../../../../index.html?org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html" target="_top"><B>FRAMES</B></A>
|
|
63 <A HREF="MultiStartUnivariateRealOptimizer.html" target="_top"><B>NO FRAMES</B></A>
|
|
64 <SCRIPT type="text/javascript">
|
|
65 <!--
|
|
66 if(window==top) {
|
|
67 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
68 }
|
|
69 //-->
|
|
70 </SCRIPT>
|
|
71 <NOSCRIPT>
|
|
72 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
73 </NOSCRIPT>
|
|
74
|
|
75
|
|
76 </FONT></TD>
|
|
77 </TR>
|
|
78 <TR>
|
|
79 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
80 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
81 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
82 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
83 </TR>
|
|
84 </TABLE>
|
|
85 <A NAME="skip-navbar_top"></A>
|
|
86 <!-- ========= END OF TOP NAVBAR ========= -->
|
|
87
|
|
88 <HR>
|
|
89 <!-- ======== START OF CLASS DATA ======== -->
|
|
90 <H2>
|
|
91 <FONT SIZE="-1">
|
|
92 org.apache.commons.math.optimization</FONT>
|
|
93 <BR>
|
|
94 Class MultiStartUnivariateRealOptimizer</H2>
|
|
95 <PRE>
|
|
96 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
|
|
97 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math.optimization.MultiStartUnivariateRealOptimizer</B>
|
|
98 </PRE>
|
|
99 <DL>
|
|
100 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A>, <A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A></DD>
|
|
101 </DL>
|
|
102 <HR>
|
|
103 <DL>
|
|
104 <DT><PRE>public class <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.37"><B>MultiStartUnivariateRealOptimizer</B></A><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A></DL>
|
|
105 </PRE>
|
|
106
|
|
107 <P>
|
|
108 Special implementation of the <A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization"><CODE>UnivariateRealOptimizer</CODE></A> interface adding
|
|
109 multi-start features to an existing optimizer.
|
|
110 <p>
|
|
111 This class wraps a classical optimizer to use it several times in
|
|
112 turn with different starting points in order to avoid being trapped
|
|
113 into a local extremum when looking for a global one.
|
|
114 </p>
|
|
115 <P>
|
|
116
|
|
117 <P>
|
|
118 <DL>
|
|
119 <DT><B>Since:</B></DT>
|
|
120 <DD>2.0</DD>
|
|
121 <DT><B>Version:</B></DT>
|
|
122 <DD>$Revision: 811685 $ $Date: 2009-09-05 13:36:48 -0400 (Sat, 05 Sep 2009) $</DD>
|
|
123 </DL>
|
|
124 <HR>
|
|
125
|
|
126 <P>
|
|
127
|
|
128 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
129
|
|
130 <A NAME="constructor_summary"><!-- --></A>
|
|
131 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
132 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
133 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
134 <B>Constructor Summary</B></FONT></TH>
|
|
135 </TR>
|
|
136 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
137 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#MultiStartUnivariateRealOptimizer(org.apache.commons.math.optimization.UnivariateRealOptimizer, int, org.apache.commons.math.random.RandomGenerator)">MultiStartUnivariateRealOptimizer</A></B>(<A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A> optimizer,
|
|
138 int starts,
|
|
139 <A HREF="../../../../../org/apache/commons/math/random/RandomGenerator.html" title="interface in org.apache.commons.math.random">RandomGenerator</A> generator)</CODE>
|
|
140
|
|
141 <BR>
|
|
142 Create a multi-start optimizer from a single-start optimizer</TD>
|
|
143 </TR>
|
|
144 </TABLE>
|
|
145
|
|
146 <!-- ========== METHOD SUMMARY =========== -->
|
|
147
|
|
148 <A NAME="method_summary"><!-- --></A>
|
|
149 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
150 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
151 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
152 <B>Method Summary</B></FONT></TH>
|
|
153 </TR>
|
|
154 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
155 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
156 <CODE> double</CODE></FONT></TD>
|
|
157 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getAbsoluteAccuracy()">getAbsoluteAccuracy</A></B>()</CODE>
|
|
158
|
|
159 <BR>
|
|
160 Get the actual absolute accuracy.</TD>
|
|
161 </TR>
|
|
162 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
163 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
164 <CODE> int</CODE></FONT></TD>
|
|
165 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getEvaluations()">getEvaluations</A></B>()</CODE>
|
|
166
|
|
167 <BR>
|
|
168 Get the number of evaluations of the objective function.</TD>
|
|
169 </TR>
|
|
170 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
171 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
172 <CODE> double</CODE></FONT></TD>
|
|
173 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getFunctionValue()">getFunctionValue</A></B>()</CODE>
|
|
174
|
|
175 <BR>
|
|
176 Get the result of the last run of the optimizer.</TD>
|
|
177 </TR>
|
|
178 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
179 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
180 <CODE> int</CODE></FONT></TD>
|
|
181 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getIterationCount()">getIterationCount</A></B>()</CODE>
|
|
182
|
|
183 <BR>
|
|
184 Get the number of iterations in the last run of the algorithm.</TD>
|
|
185 </TR>
|
|
186 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
187 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
188 <CODE> int</CODE></FONT></TD>
|
|
189 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getMaxEvaluations()">getMaxEvaluations</A></B>()</CODE>
|
|
190
|
|
191 <BR>
|
|
192 Get the maximal number of functions evaluations.</TD>
|
|
193 </TR>
|
|
194 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
195 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
196 <CODE> int</CODE></FONT></TD>
|
|
197 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getMaximalIterationCount()">getMaximalIterationCount</A></B>()</CODE>
|
|
198
|
|
199 <BR>
|
|
200 Get the upper limit for the number of iterations.</TD>
|
|
201 </TR>
|
|
202 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
203 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
204 <CODE> double[]</CODE></FONT></TD>
|
|
205 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getOptima()">getOptima</A></B>()</CODE>
|
|
206
|
|
207 <BR>
|
|
208 Get all the optima found during the last call to <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A>.</TD>
|
|
209 </TR>
|
|
210 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
211 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
212 <CODE> double[]</CODE></FONT></TD>
|
|
213 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getOptimaValues()">getOptimaValues</A></B>()</CODE>
|
|
214
|
|
215 <BR>
|
|
216 Get all the function values at optima found during the last call to <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A>.</TD>
|
|
217 </TR>
|
|
218 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
219 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
220 <CODE> double</CODE></FONT></TD>
|
|
221 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getRelativeAccuracy()">getRelativeAccuracy</A></B>()</CODE>
|
|
222
|
|
223 <BR>
|
|
224 Get the actual relative accuracy.</TD>
|
|
225 </TR>
|
|
226 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
227 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
228 <CODE> double</CODE></FONT></TD>
|
|
229 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getResult()">getResult</A></B>()</CODE>
|
|
230
|
|
231 <BR>
|
|
232 Get the result of the last run of the optimizer.</TD>
|
|
233 </TR>
|
|
234 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
235 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
236 <CODE> double</CODE></FONT></TD>
|
|
237 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)">optimize</A></B>(<A HREF="../../../../../org/apache/commons/math/analysis/UnivariateRealFunction.html" title="interface in org.apache.commons.math.analysis">UnivariateRealFunction</A> f,
|
|
238 <A HREF="../../../../../org/apache/commons/math/optimization/GoalType.html" title="enum in org.apache.commons.math.optimization">GoalType</A> goalType,
|
|
239 double min,
|
|
240 double max)</CODE>
|
|
241
|
|
242 <BR>
|
|
243 Find an optimum in the given interval.</TD>
|
|
244 </TR>
|
|
245 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
246 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
247 <CODE> double</CODE></FONT></TD>
|
|
248 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double, double)">optimize</A></B>(<A HREF="../../../../../org/apache/commons/math/analysis/UnivariateRealFunction.html" title="interface in org.apache.commons.math.analysis">UnivariateRealFunction</A> f,
|
|
249 <A HREF="../../../../../org/apache/commons/math/optimization/GoalType.html" title="enum in org.apache.commons.math.optimization">GoalType</A> goalType,
|
|
250 double min,
|
|
251 double max,
|
|
252 double startValue)</CODE>
|
|
253
|
|
254 <BR>
|
|
255 Find an optimum in the given interval, start at startValue.</TD>
|
|
256 </TR>
|
|
257 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
258 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
259 <CODE> void</CODE></FONT></TD>
|
|
260 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#resetAbsoluteAccuracy()">resetAbsoluteAccuracy</A></B>()</CODE>
|
|
261
|
|
262 <BR>
|
|
263 Reset the absolute accuracy to the default.</TD>
|
|
264 </TR>
|
|
265 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
266 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
267 <CODE> void</CODE></FONT></TD>
|
|
268 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#resetMaximalIterationCount()">resetMaximalIterationCount</A></B>()</CODE>
|
|
269
|
|
270 <BR>
|
|
271 Reset the upper limit for the number of iterations to the default.</TD>
|
|
272 </TR>
|
|
273 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
274 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
275 <CODE> void</CODE></FONT></TD>
|
|
276 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#resetRelativeAccuracy()">resetRelativeAccuracy</A></B>()</CODE>
|
|
277
|
|
278 <BR>
|
|
279 Reset the relative accuracy to the default.</TD>
|
|
280 </TR>
|
|
281 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
282 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
283 <CODE> void</CODE></FONT></TD>
|
|
284 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#setAbsoluteAccuracy(double)">setAbsoluteAccuracy</A></B>(double accuracy)</CODE>
|
|
285
|
|
286 <BR>
|
|
287 Set the absolute accuracy.</TD>
|
|
288 </TR>
|
|
289 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
290 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
291 <CODE> void</CODE></FONT></TD>
|
|
292 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#setMaxEvaluations(int)">setMaxEvaluations</A></B>(int maxEvaluations)</CODE>
|
|
293
|
|
294 <BR>
|
|
295 Set the maximal number of functions evaluations.</TD>
|
|
296 </TR>
|
|
297 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
298 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
299 <CODE> void</CODE></FONT></TD>
|
|
300 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#setMaximalIterationCount(int)">setMaximalIterationCount</A></B>(int count)</CODE>
|
|
301
|
|
302 <BR>
|
|
303 Set the upper limit for the number of iterations.</TD>
|
|
304 </TR>
|
|
305 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
306 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
307 <CODE> void</CODE></FONT></TD>
|
|
308 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#setRelativeAccuracy(double)">setRelativeAccuracy</A></B>(double accuracy)</CODE>
|
|
309
|
|
310 <BR>
|
|
311 Set the relative accuracy.</TD>
|
|
312 </TR>
|
|
313 </TABLE>
|
|
314 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
315 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
316 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
317 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
|
|
318 </TR>
|
|
319 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
320 <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
|
|
321 </TR>
|
|
322 </TABLE>
|
|
323
|
|
324 <P>
|
|
325
|
|
326 <!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
327
|
|
328 <A NAME="constructor_detail"><!-- --></A>
|
|
329 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
330 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
331 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
332 <B>Constructor Detail</B></FONT></TH>
|
|
333 </TR>
|
|
334 </TABLE>
|
|
335
|
|
336 <A NAME="MultiStartUnivariateRealOptimizer(org.apache.commons.math.optimization.UnivariateRealOptimizer, int, org.apache.commons.math.random.RandomGenerator)"><!-- --></A><H3>
|
|
337 MultiStartUnivariateRealOptimizer</H3>
|
|
338 <PRE>
|
|
339 public <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.77"><B>MultiStartUnivariateRealOptimizer</B></A>(<A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A> optimizer,
|
|
340 int starts,
|
|
341 <A HREF="../../../../../org/apache/commons/math/random/RandomGenerator.html" title="interface in org.apache.commons.math.random">RandomGenerator</A> generator)</PRE>
|
|
342 <DL>
|
|
343 <DD>Create a multi-start optimizer from a single-start optimizer
|
|
344 <P>
|
|
345 <DL>
|
|
346 <DT><B>Parameters:</B><DD><CODE>optimizer</CODE> - single-start optimizer to wrap<DD><CODE>starts</CODE> - number of starts to perform (including the
|
|
347 first one), multi-start is disabled if value is less than or
|
|
348 equal to 1<DD><CODE>generator</CODE> - random generator to use for restarts</DL>
|
|
349 </DL>
|
|
350
|
|
351 <!-- ============ METHOD DETAIL ========== -->
|
|
352
|
|
353 <A NAME="method_detail"><!-- --></A>
|
|
354 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
355 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
356 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
357 <B>Method Detail</B></FONT></TH>
|
|
358 </TR>
|
|
359 </TABLE>
|
|
360
|
|
361 <A NAME="getFunctionValue()"><!-- --></A><H3>
|
|
362 getFunctionValue</H3>
|
|
363 <PRE>
|
|
364 public double <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.90"><B>getFunctionValue</B></A>()</PRE>
|
|
365 <DL>
|
|
366 <DD>Get the result of the last run of the optimizer.
|
|
367 <P>
|
|
368 <DD><DL>
|
|
369 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html#getFunctionValue()">getFunctionValue</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A></CODE></DL>
|
|
370 </DD>
|
|
371 <DD><DL>
|
|
372
|
|
373 <DT><B>Returns:</B><DD>the value of the function at the last result.</DL>
|
|
374 </DD>
|
|
375 </DL>
|
|
376 <HR>
|
|
377
|
|
378 <A NAME="getResult()"><!-- --></A><H3>
|
|
379 getResult</H3>
|
|
380 <PRE>
|
|
381 public double <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.95"><B>getResult</B></A>()</PRE>
|
|
382 <DL>
|
|
383 <DD>Get the result of the last run of the optimizer.
|
|
384 <P>
|
|
385 <DD><DL>
|
|
386 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html#getResult()">getResult</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A></CODE></DL>
|
|
387 </DD>
|
|
388 <DD><DL>
|
|
389
|
|
390 <DT><B>Returns:</B><DD>the last result.</DL>
|
|
391 </DD>
|
|
392 </DL>
|
|
393 <HR>
|
|
394
|
|
395 <A NAME="getAbsoluteAccuracy()"><!-- --></A><H3>
|
|
396 getAbsoluteAccuracy</H3>
|
|
397 <PRE>
|
|
398 public double <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.100"><B>getAbsoluteAccuracy</B></A>()</PRE>
|
|
399 <DL>
|
|
400 <DD>Get the actual absolute accuracy.
|
|
401 <P>
|
|
402 <DD><DL>
|
|
403 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#getAbsoluteAccuracy()">getAbsoluteAccuracy</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A></CODE></DL>
|
|
404 </DD>
|
|
405 <DD><DL>
|
|
406
|
|
407 <DT><B>Returns:</B><DD>the accuracy</DL>
|
|
408 </DD>
|
|
409 </DL>
|
|
410 <HR>
|
|
411
|
|
412 <A NAME="getIterationCount()"><!-- --></A><H3>
|
|
413 getIterationCount</H3>
|
|
414 <PRE>
|
|
415 public int <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.105"><B>getIterationCount</B></A>()</PRE>
|
|
416 <DL>
|
|
417 <DD>Get the number of iterations in the last run of the algorithm.
|
|
418 <p>
|
|
419 This is mainly meant for testing purposes. It may occasionally
|
|
420 help track down performance problems: if the iteration count
|
|
421 is notoriously high, check whether the problem is evaluated
|
|
422 properly, and whether another algorithm is more amenable to the
|
|
423 problem.</p>
|
|
424 <P>
|
|
425 <DD><DL>
|
|
426 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#getIterationCount()">getIterationCount</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A></CODE></DL>
|
|
427 </DD>
|
|
428 <DD><DL>
|
|
429
|
|
430 <DT><B>Returns:</B><DD>the last iteration count.</DL>
|
|
431 </DD>
|
|
432 </DL>
|
|
433 <HR>
|
|
434
|
|
435 <A NAME="getMaximalIterationCount()"><!-- --></A><H3>
|
|
436 getMaximalIterationCount</H3>
|
|
437 <PRE>
|
|
438 public int <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.110"><B>getMaximalIterationCount</B></A>()</PRE>
|
|
439 <DL>
|
|
440 <DD>Get the upper limit for the number of iterations.
|
|
441 <P>
|
|
442 <DD><DL>
|
|
443 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#getMaximalIterationCount()">getMaximalIterationCount</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A></CODE></DL>
|
|
444 </DD>
|
|
445 <DD><DL>
|
|
446
|
|
447 <DT><B>Returns:</B><DD>the actual upper limit</DL>
|
|
448 </DD>
|
|
449 </DL>
|
|
450 <HR>
|
|
451
|
|
452 <A NAME="getMaxEvaluations()"><!-- --></A><H3>
|
|
453 getMaxEvaluations</H3>
|
|
454 <PRE>
|
|
455 public int <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.115"><B>getMaxEvaluations</B></A>()</PRE>
|
|
456 <DL>
|
|
457 <DD>Get the maximal number of functions evaluations.
|
|
458 <P>
|
|
459 <DD><DL>
|
|
460 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html#getMaxEvaluations()">getMaxEvaluations</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A></CODE></DL>
|
|
461 </DD>
|
|
462 <DD><DL>
|
|
463
|
|
464 <DT><B>Returns:</B><DD>maximal number of functions evaluations</DL>
|
|
465 </DD>
|
|
466 </DL>
|
|
467 <HR>
|
|
468
|
|
469 <A NAME="getEvaluations()"><!-- --></A><H3>
|
|
470 getEvaluations</H3>
|
|
471 <PRE>
|
|
472 public int <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.120"><B>getEvaluations</B></A>()</PRE>
|
|
473 <DL>
|
|
474 <DD>Get the number of evaluations of the objective function.
|
|
475 <p>
|
|
476 The number of evaluations corresponds to the last call to the
|
|
477 <A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A>
|
|
478 method. It is 0 if the method has not been called yet.
|
|
479 </p>
|
|
480 <P>
|
|
481 <DD><DL>
|
|
482 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html#getEvaluations()">getEvaluations</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A></CODE></DL>
|
|
483 </DD>
|
|
484 <DD><DL>
|
|
485
|
|
486 <DT><B>Returns:</B><DD>number of evaluations of the objective function</DL>
|
|
487 </DD>
|
|
488 </DL>
|
|
489 <HR>
|
|
490
|
|
491 <A NAME="getRelativeAccuracy()"><!-- --></A><H3>
|
|
492 getRelativeAccuracy</H3>
|
|
493 <PRE>
|
|
494 public double <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.125"><B>getRelativeAccuracy</B></A>()</PRE>
|
|
495 <DL>
|
|
496 <DD>Get the actual relative accuracy.
|
|
497 <P>
|
|
498 <DD><DL>
|
|
499 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#getRelativeAccuracy()">getRelativeAccuracy</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A></CODE></DL>
|
|
500 </DD>
|
|
501 <DD><DL>
|
|
502
|
|
503 <DT><B>Returns:</B><DD>the accuracy</DL>
|
|
504 </DD>
|
|
505 </DL>
|
|
506 <HR>
|
|
507
|
|
508 <A NAME="resetAbsoluteAccuracy()"><!-- --></A><H3>
|
|
509 resetAbsoluteAccuracy</H3>
|
|
510 <PRE>
|
|
511 public void <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.130"><B>resetAbsoluteAccuracy</B></A>()</PRE>
|
|
512 <DL>
|
|
513 <DD>Reset the absolute accuracy to the default.
|
|
514 <p>
|
|
515 The default value is provided by the algorithm implementation.</p>
|
|
516 <P>
|
|
517 <DD><DL>
|
|
518 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#resetAbsoluteAccuracy()">resetAbsoluteAccuracy</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A></CODE></DL>
|
|
519 </DD>
|
|
520 <DD><DL>
|
|
521 </DL>
|
|
522 </DD>
|
|
523 </DL>
|
|
524 <HR>
|
|
525
|
|
526 <A NAME="resetMaximalIterationCount()"><!-- --></A><H3>
|
|
527 resetMaximalIterationCount</H3>
|
|
528 <PRE>
|
|
529 public void <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.135"><B>resetMaximalIterationCount</B></A>()</PRE>
|
|
530 <DL>
|
|
531 <DD>Reset the upper limit for the number of iterations to the default.
|
|
532 <p>
|
|
533 The default value is supplied by the algorithm implementation.</p>
|
|
534 <P>
|
|
535 <DD><DL>
|
|
536 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#resetMaximalIterationCount()">resetMaximalIterationCount</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A></CODE></DL>
|
|
537 </DD>
|
|
538 <DD><DL>
|
|
539 <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#setMaximalIterationCount(int)"><CODE>ConvergingAlgorithm.setMaximalIterationCount(int)</CODE></A></DL>
|
|
540 </DD>
|
|
541 </DL>
|
|
542 <HR>
|
|
543
|
|
544 <A NAME="resetRelativeAccuracy()"><!-- --></A><H3>
|
|
545 resetRelativeAccuracy</H3>
|
|
546 <PRE>
|
|
547 public void <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.140"><B>resetRelativeAccuracy</B></A>()</PRE>
|
|
548 <DL>
|
|
549 <DD>Reset the relative accuracy to the default.
|
|
550 The default value is provided by the algorithm implementation.
|
|
551 <P>
|
|
552 <DD><DL>
|
|
553 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#resetRelativeAccuracy()">resetRelativeAccuracy</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A></CODE></DL>
|
|
554 </DD>
|
|
555 <DD><DL>
|
|
556 </DL>
|
|
557 </DD>
|
|
558 </DL>
|
|
559 <HR>
|
|
560
|
|
561 <A NAME="setAbsoluteAccuracy(double)"><!-- --></A><H3>
|
|
562 setAbsoluteAccuracy</H3>
|
|
563 <PRE>
|
|
564 public void <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.145"><B>setAbsoluteAccuracy</B></A>(double accuracy)</PRE>
|
|
565 <DL>
|
|
566 <DD>Set the absolute accuracy.
|
|
567 <p>
|
|
568 The default is usually chosen so that results in the interval
|
|
569 -10..-0.1 and +0.1..+10 can be found with a reasonable accuracy. If the
|
|
570 expected absolute value of your results is of much smaller magnitude, set
|
|
571 this to a smaller value.</p>
|
|
572 <p>
|
|
573 Algorithms are advised to do a plausibility check with the relative
|
|
574 accuracy, but clients should not rely on this.</p>
|
|
575 <P>
|
|
576 <DD><DL>
|
|
577 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#setAbsoluteAccuracy(double)">setAbsoluteAccuracy</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A></CODE></DL>
|
|
578 </DD>
|
|
579 <DD><DL>
|
|
580 <DT><B>Parameters:</B><DD><CODE>accuracy</CODE> - the accuracy.</DL>
|
|
581 </DD>
|
|
582 </DL>
|
|
583 <HR>
|
|
584
|
|
585 <A NAME="setMaximalIterationCount(int)"><!-- --></A><H3>
|
|
586 setMaximalIterationCount</H3>
|
|
587 <PRE>
|
|
588 public void <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.150"><B>setMaximalIterationCount</B></A>(int count)</PRE>
|
|
589 <DL>
|
|
590 <DD>Set the upper limit for the number of iterations.
|
|
591 <p>
|
|
592 Usually a high iteration count indicates convergence problems. However,
|
|
593 the "reasonable value" varies widely for different algorithms. Users are
|
|
594 advised to use the default value supplied by the algorithm.</p>
|
|
595 <p>
|
|
596 A <A HREF="../../../../../org/apache/commons/math/ConvergenceException.html" title="class in org.apache.commons.math"><CODE>ConvergenceException</CODE></A> will be thrown if this number
|
|
597 is exceeded.</p>
|
|
598 <P>
|
|
599 <DD><DL>
|
|
600 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#setMaximalIterationCount(int)">setMaximalIterationCount</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A></CODE></DL>
|
|
601 </DD>
|
|
602 <DD><DL>
|
|
603 <DT><B>Parameters:</B><DD><CODE>count</CODE> - maximum number of iterations</DL>
|
|
604 </DD>
|
|
605 </DL>
|
|
606 <HR>
|
|
607
|
|
608 <A NAME="setMaxEvaluations(int)"><!-- --></A><H3>
|
|
609 setMaxEvaluations</H3>
|
|
610 <PRE>
|
|
611 public void <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.155"><B>setMaxEvaluations</B></A>(int maxEvaluations)</PRE>
|
|
612 <DL>
|
|
613 <DD>Set the maximal number of functions evaluations.
|
|
614 <P>
|
|
615 <DD><DL>
|
|
616 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html#setMaxEvaluations(int)">setMaxEvaluations</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A></CODE></DL>
|
|
617 </DD>
|
|
618 <DD><DL>
|
|
619 <DT><B>Parameters:</B><DD><CODE>maxEvaluations</CODE> - maximal number of function evaluations</DL>
|
|
620 </DD>
|
|
621 </DL>
|
|
622 <HR>
|
|
623
|
|
624 <A NAME="setRelativeAccuracy(double)"><!-- --></A><H3>
|
|
625 setRelativeAccuracy</H3>
|
|
626 <PRE>
|
|
627 public void <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.160"><B>setRelativeAccuracy</B></A>(double accuracy)</PRE>
|
|
628 <DL>
|
|
629 <DD>Set the relative accuracy.
|
|
630 <p>
|
|
631 This is used to stop iterations if the absolute accuracy can't be
|
|
632 achieved due to large values or short mantissa length.</p>
|
|
633 <p>
|
|
634 If this should be the primary criterion for convergence rather then a
|
|
635 safety measure, set the absolute accuracy to a ridiculously small value,
|
|
636 like <A HREF="../../../../../org/apache/commons/math/util/MathUtils.html#SAFE_MIN"><CODE>MathUtils.SAFE_MIN</CODE></A>.</p>
|
|
637 <P>
|
|
638 <DD><DL>
|
|
639 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html#setRelativeAccuracy(double)">setRelativeAccuracy</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/ConvergingAlgorithm.html" title="interface in org.apache.commons.math">ConvergingAlgorithm</A></CODE></DL>
|
|
640 </DD>
|
|
641 <DD><DL>
|
|
642 <DT><B>Parameters:</B><DD><CODE>accuracy</CODE> - the relative accuracy.</DL>
|
|
643 </DD>
|
|
644 </DL>
|
|
645 <HR>
|
|
646
|
|
647 <A NAME="getOptima()"><!-- --></A><H3>
|
|
648 getOptima</H3>
|
|
649 <PRE>
|
|
650 public double[] <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.191"><B>getOptima</B></A>()
|
|
651 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></PRE>
|
|
652 <DL>
|
|
653 <DD>Get all the optima found during the last call to <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A>.
|
|
654 <p>The optimizer stores all the optima found during a set of
|
|
655 restarts. The <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A> method returns the best point only. This
|
|
656 method returns all the points found at the end of each starts,
|
|
657 including the best one already returned by the <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A>
|
|
658 method.
|
|
659 </p>
|
|
660 <p>
|
|
661 The returned array as one element for each start as specified
|
|
662 in the constructor. It is ordered with the results from the
|
|
663 runs that did converge first, sorted from best to worst
|
|
664 objective value (i.e in ascending order if minimizing and in
|
|
665 descending order if maximizing), followed by Double.NaN elements
|
|
666 corresponding to the runs that did not converge. This means all
|
|
667 elements will be NaN if the <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A> method did throw a <A HREF="../../../../../org/apache/commons/math/ConvergenceException.html" title="class in org.apache.commons.math"><CODE>ConvergenceException</CODE></A>). This also means that
|
|
668 if the first element is not NaN, it is the best point found across
|
|
669 all starts.</p>
|
|
670 <P>
|
|
671 <DD><DL>
|
|
672 </DL>
|
|
673 </DD>
|
|
674 <DD><DL>
|
|
675
|
|
676 <DT><B>Returns:</B><DD>array containing the optima
|
|
677 <DT><B>Throws:</B>
|
|
678 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A> has not been called<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getOptimaValues()"><CODE>getOptimaValues()</CODE></A></DL>
|
|
679 </DD>
|
|
680 </DL>
|
|
681 <HR>
|
|
682
|
|
683 <A NAME="getOptimaValues()"><!-- --></A><H3>
|
|
684 getOptimaValues</H3>
|
|
685 <PRE>
|
|
686 public double[] <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.217"><B>getOptimaValues</B></A>()
|
|
687 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></PRE>
|
|
688 <DL>
|
|
689 <DD>Get all the function values at optima found during the last call to <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A>.
|
|
690 <p>
|
|
691 The returned array as one element for each start as specified
|
|
692 in the constructor. It is ordered with the results from the
|
|
693 runs that did converge first, sorted from best to worst
|
|
694 objective value (i.e in ascending order if minimizing and in
|
|
695 descending order if maximizing), followed by Double.NaN elements
|
|
696 corresponding to the runs that did not converge. This means all
|
|
697 elements will be NaN if the <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A> method did throw a <A HREF="../../../../../org/apache/commons/math/ConvergenceException.html" title="class in org.apache.commons.math"><CODE>ConvergenceException</CODE></A>). This also means that
|
|
698 if the first element is not NaN, it is the best point found across
|
|
699 all starts.</p>
|
|
700 <P>
|
|
701 <DD><DL>
|
|
702 </DL>
|
|
703 </DD>
|
|
704 <DD><DL>
|
|
705
|
|
706 <DT><B>Returns:</B><DD>array containing the optima
|
|
707 <DT><B>Throws:</B>
|
|
708 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><CODE>optimize</CODE></A> has not been called<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#getOptima()"><CODE>getOptima()</CODE></A></DL>
|
|
709 </DD>
|
|
710 </DL>
|
|
711 <HR>
|
|
712
|
|
713 <A NAME="optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)"><!-- --></A><H3>
|
|
714 optimize</H3>
|
|
715 <PRE>
|
|
716 public double <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.225"><B>optimize</B></A>(<A HREF="../../../../../org/apache/commons/math/analysis/UnivariateRealFunction.html" title="interface in org.apache.commons.math.analysis">UnivariateRealFunction</A> f,
|
|
717 <A HREF="../../../../../org/apache/commons/math/optimization/GoalType.html" title="enum in org.apache.commons.math.optimization">GoalType</A> goalType,
|
|
718 double min,
|
|
719 double max)
|
|
720 throws <A HREF="../../../../../org/apache/commons/math/ConvergenceException.html" title="class in org.apache.commons.math">ConvergenceException</A>,
|
|
721 <A HREF="../../../../../org/apache/commons/math/FunctionEvaluationException.html" title="class in org.apache.commons.math">FunctionEvaluationException</A></PRE>
|
|
722 <DL>
|
|
723 <DD>Find an optimum in the given interval.
|
|
724 <p>
|
|
725 An optimizer may require that the interval brackets a single optimum.
|
|
726 </p>
|
|
727 <P>
|
|
728 <DD><DL>
|
|
729 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double)">optimize</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A></CODE></DL>
|
|
730 </DD>
|
|
731 <DD><DL>
|
|
732 <DT><B>Parameters:</B><DD><CODE>f</CODE> - the function to optimize.<DD><CODE>goalType</CODE> - type of optimization goal: either <A HREF="../../../../../org/apache/commons/math/optimization/GoalType.html#MAXIMIZE"><CODE>GoalType.MAXIMIZE</CODE></A>
|
|
733 or <A HREF="../../../../../org/apache/commons/math/optimization/GoalType.html#MINIMIZE"><CODE>GoalType.MINIMIZE</CODE></A><DD><CODE>min</CODE> - the lower bound for the interval.<DD><CODE>max</CODE> - the upper bound for the interval.
|
|
734 <DT><B>Returns:</B><DD>a value where the function is optimum
|
|
735 <DT><B>Throws:</B>
|
|
736 <DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergenceException.html" title="class in org.apache.commons.math">ConvergenceException</A></CODE> - if the maximum iteration count is exceeded
|
|
737 or the optimizer detects convergence problems otherwise.
|
|
738 <DD><CODE><A HREF="../../../../../org/apache/commons/math/FunctionEvaluationException.html" title="class in org.apache.commons.math">FunctionEvaluationException</A></CODE> - if an error occurs evaluating the
|
|
739 function</DL>
|
|
740 </DD>
|
|
741 </DL>
|
|
742 <HR>
|
|
743
|
|
744 <A NAME="optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double, double)"><!-- --></A><H3>
|
|
745 optimize</H3>
|
|
746 <PRE>
|
|
747 public double <A HREF="../../../../../src-html/org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html#line.312"><B>optimize</B></A>(<A HREF="../../../../../org/apache/commons/math/analysis/UnivariateRealFunction.html" title="interface in org.apache.commons.math.analysis">UnivariateRealFunction</A> f,
|
|
748 <A HREF="../../../../../org/apache/commons/math/optimization/GoalType.html" title="enum in org.apache.commons.math.optimization">GoalType</A> goalType,
|
|
749 double min,
|
|
750 double max,
|
|
751 double startValue)
|
|
752 throws <A HREF="../../../../../org/apache/commons/math/ConvergenceException.html" title="class in org.apache.commons.math">ConvergenceException</A>,
|
|
753 <A HREF="../../../../../org/apache/commons/math/FunctionEvaluationException.html" title="class in org.apache.commons.math">FunctionEvaluationException</A></PRE>
|
|
754 <DL>
|
|
755 <DD>Find an optimum in the given interval, start at startValue.
|
|
756 <p>
|
|
757 An optimizer may require that the interval brackets a single optimum.
|
|
758 </p>
|
|
759 <P>
|
|
760 <DD><DL>
|
|
761 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html#optimize(org.apache.commons.math.analysis.UnivariateRealFunction, org.apache.commons.math.optimization.GoalType, double, double, double)">optimize</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/math/optimization/UnivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization">UnivariateRealOptimizer</A></CODE></DL>
|
|
762 </DD>
|
|
763 <DD><DL>
|
|
764 <DT><B>Parameters:</B><DD><CODE>f</CODE> - the function to optimize.<DD><CODE>goalType</CODE> - type of optimization goal: either <A HREF="../../../../../org/apache/commons/math/optimization/GoalType.html#MAXIMIZE"><CODE>GoalType.MAXIMIZE</CODE></A>
|
|
765 or <A HREF="../../../../../org/apache/commons/math/optimization/GoalType.html#MINIMIZE"><CODE>GoalType.MINIMIZE</CODE></A><DD><CODE>min</CODE> - the lower bound for the interval.<DD><CODE>max</CODE> - the upper bound for the interval.<DD><CODE>startValue</CODE> - the start value to use
|
|
766 <DT><B>Returns:</B><DD>a value where the function is optimum
|
|
767 <DT><B>Throws:</B>
|
|
768 <DD><CODE><A HREF="../../../../../org/apache/commons/math/ConvergenceException.html" title="class in org.apache.commons.math">ConvergenceException</A></CODE> - if the maximum iteration count is exceeded
|
|
769 or the optimizer detects convergence problems otherwise.
|
|
770 <DD><CODE><A HREF="../../../../../org/apache/commons/math/FunctionEvaluationException.html" title="class in org.apache.commons.math">FunctionEvaluationException</A></CODE> - if an error occurs evaluating the
|
|
771 function</DL>
|
|
772 </DD>
|
|
773 </DL>
|
|
774 <!-- ========= END OF CLASS DATA ========= -->
|
|
775 <HR>
|
|
776
|
|
777
|
|
778 <!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
779 <A NAME="navbar_bottom"><!-- --></A>
|
|
780 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
781 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
782 <TR>
|
|
783 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
784 <A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
785 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
786 <TR ALIGN="center" VALIGN="top">
|
|
787 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
788 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
789 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
790 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MultiStartUnivariateRealOptimizer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
791 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
792 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
793 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
794 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
795 </TR>
|
|
796 </TABLE>
|
|
797 </TD>
|
|
798 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
799 </EM>
|
|
800 </TD>
|
|
801 </TR>
|
|
802
|
|
803 <TR>
|
|
804 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
805 <A HREF="../../../../../org/apache/commons/math/optimization/MultiStartMultivariateRealOptimizer.html" title="class in org.apache.commons.math.optimization"><B>PREV CLASS</B></A>
|
|
806 <A HREF="../../../../../org/apache/commons/math/optimization/MultivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization"><B>NEXT CLASS</B></A></FONT></TD>
|
|
807 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
808 <A HREF="../../../../../index.html?org/apache/commons/math/optimization/MultiStartUnivariateRealOptimizer.html" target="_top"><B>FRAMES</B></A>
|
|
809 <A HREF="MultiStartUnivariateRealOptimizer.html" target="_top"><B>NO FRAMES</B></A>
|
|
810 <SCRIPT type="text/javascript">
|
|
811 <!--
|
|
812 if(window==top) {
|
|
813 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
814 }
|
|
815 //-->
|
|
816 </SCRIPT>
|
|
817 <NOSCRIPT>
|
|
818 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
819 </NOSCRIPT>
|
|
820
|
|
821
|
|
822 </FONT></TD>
|
|
823 </TR>
|
|
824 <TR>
|
|
825 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
826 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
827 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
828 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
829 </TR>
|
|
830 </TABLE>
|
|
831 <A NAME="skip-navbar_bottom"></A>
|
|
832 <!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
833
|
|
834 <HR>
|
|
835 Copyright © 2003-2010 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
|
|
836 </BODY>
|
|
837 </HTML>
|