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 RealConvergenceChecker (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="RealConvergenceChecker (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/RealConvergenceChecker.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/OptimizationException.html" title="class in org.apache.commons.math.optimization"><B>PREV CLASS</B></A>
|
|
60 <A HREF="../../../../../org/apache/commons/math/optimization/RealPointValuePair.html" title="class 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/RealConvergenceChecker.html" target="_top"><B>FRAMES</B></A>
|
|
63 <A HREF="RealConvergenceChecker.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
81 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
82 DETAIL: FIELD | CONSTR | <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 Interface RealConvergenceChecker</H2>
|
|
95 <DL>
|
|
96 <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../org/apache/commons/math/optimization/SimpleRealPointChecker.html" title="class in org.apache.commons.math.optimization">SimpleRealPointChecker</A>, <A HREF="../../../../../org/apache/commons/math/optimization/SimpleScalarValueChecker.html" title="class in org.apache.commons.math.optimization">SimpleScalarValueChecker</A></DD>
|
|
97 </DL>
|
|
98 <HR>
|
|
99 <DL>
|
|
100 <DT><PRE>public interface <A HREF="../../../../../src-html/org/apache/commons/math/optimization/RealConvergenceChecker.html#line.37"><B>RealConvergenceChecker</B></A></DL>
|
|
101 </PRE>
|
|
102
|
|
103 <P>
|
|
104 This interface specifies how to check if an <A HREF="../../../../../org/apache/commons/math/optimization/MultivariateRealOptimizer.html" title="interface in org.apache.commons.math.optimization"><CODE>optimization
|
|
105 algorithm</CODE></A> has converged.
|
|
106
|
|
107 <p>Deciding if convergence has been reached is a problem-dependent issue. The
|
|
108 user should provide a class implementing this interface to allow the optimization
|
|
109 algorithm to stop its search according to the problem at hand.</p>
|
|
110 <p>For convenience, two implementations that fit simple needs are already provided:
|
|
111 <A HREF="../../../../../org/apache/commons/math/optimization/SimpleScalarValueChecker.html" title="class in org.apache.commons.math.optimization"><CODE>SimpleScalarValueChecker</CODE></A> and <A HREF="../../../../../org/apache/commons/math/optimization/SimpleRealPointChecker.html" title="class in org.apache.commons.math.optimization"><CODE>SimpleRealPointChecker</CODE></A>. The first
|
|
112 one considers convergence is reached when the objective function value does not
|
|
113 change much anymore, it does not use the point set at all. The second one
|
|
114 considers convergence is reached when the input point set does not change
|
|
115 much anymore, it does not use objective function value at all.</p>
|
|
116 <P>
|
|
117
|
|
118 <P>
|
|
119 <DL>
|
|
120 <DT><B>Since:</B></DT>
|
|
121 <DD>2.0</DD>
|
|
122 <DT><B>Version:</B></DT>
|
|
123 <DD>$Revision: 799857 $ $Date: 2009-08-01 09:07:12 -0400 (Sat, 01 Aug 2009) $</DD>
|
|
124 </DL>
|
|
125 <HR>
|
|
126
|
|
127 <P>
|
|
128
|
|
129 <!-- ========== METHOD SUMMARY =========== -->
|
|
130
|
|
131 <A NAME="method_summary"><!-- --></A>
|
|
132 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
133 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
134 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
135 <B>Method Summary</B></FONT></TH>
|
|
136 </TR>
|
|
137 <TR BGCOLOR="white" CLASS="TableRowColor">
|
|
138 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
139 <CODE> boolean</CODE></FONT></TD>
|
|
140 <TD><CODE><B><A HREF="../../../../../org/apache/commons/math/optimization/RealConvergenceChecker.html#converged(int, org.apache.commons.math.optimization.RealPointValuePair, org.apache.commons.math.optimization.RealPointValuePair)">converged</A></B>(int iteration,
|
|
141 <A HREF="../../../../../org/apache/commons/math/optimization/RealPointValuePair.html" title="class in org.apache.commons.math.optimization">RealPointValuePair</A> previous,
|
|
142 <A HREF="../../../../../org/apache/commons/math/optimization/RealPointValuePair.html" title="class in org.apache.commons.math.optimization">RealPointValuePair</A> current)</CODE>
|
|
143
|
|
144 <BR>
|
|
145 Check if the optimization algorithm has converged considering the last points.</TD>
|
|
146 </TR>
|
|
147 </TABLE>
|
|
148
|
|
149 <P>
|
|
150
|
|
151 <!-- ============ METHOD DETAIL ========== -->
|
|
152
|
|
153 <A NAME="method_detail"><!-- --></A>
|
|
154 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
155 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
156 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
157 <B>Method Detail</B></FONT></TH>
|
|
158 </TR>
|
|
159 </TABLE>
|
|
160
|
|
161 <A NAME="converged(int, org.apache.commons.math.optimization.RealPointValuePair, org.apache.commons.math.optimization.RealPointValuePair)"><!-- --></A><H3>
|
|
162 converged</H3>
|
|
163 <PRE>
|
|
164 boolean <A HREF="../../../../../src-html/org/apache/commons/math/optimization/RealConvergenceChecker.html#line.53"><B>converged</B></A>(int iteration,
|
|
165 <A HREF="../../../../../org/apache/commons/math/optimization/RealPointValuePair.html" title="class in org.apache.commons.math.optimization">RealPointValuePair</A> previous,
|
|
166 <A HREF="../../../../../org/apache/commons/math/optimization/RealPointValuePair.html" title="class in org.apache.commons.math.optimization">RealPointValuePair</A> current)</PRE>
|
|
167 <DL>
|
|
168 <DD>Check if the optimization algorithm has converged considering the last points.
|
|
169 <p>
|
|
170 This method may be called several time from the same algorithm iteration with
|
|
171 different points. This can be detected by checking the iteration number at each
|
|
172 call if needed. Each time this method is called, the previous and current point
|
|
173 correspond to points with the same role at each iteration, so they can be
|
|
174 compared. As an example, simplex-based algorithms call this method for all
|
|
175 points of the simplex, not only for the best or worst ones.
|
|
176 </p>
|
|
177 <P>
|
|
178 <DD><DL>
|
|
179 <DT><B>Parameters:</B><DD><CODE>iteration</CODE> - index of current iteration<DD><CODE>previous</CODE> - point from previous iteration<DD><CODE>current</CODE> - point from current iteration
|
|
180 <DT><B>Returns:</B><DD>true if the algorithm is considered to have converged</DL>
|
|
181 </DD>
|
|
182 </DL>
|
|
183 <!-- ========= END OF CLASS DATA ========= -->
|
|
184 <HR>
|
|
185
|
|
186
|
|
187 <!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
188 <A NAME="navbar_bottom"><!-- --></A>
|
|
189 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
190 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
191 <TR>
|
|
192 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
193 <A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
194 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
195 <TR ALIGN="center" VALIGN="top">
|
|
196 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
197 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
198 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
199 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/RealConvergenceChecker.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
200 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
201 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
202 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
203 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
204 </TR>
|
|
205 </TABLE>
|
|
206 </TD>
|
|
207 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
208 </EM>
|
|
209 </TD>
|
|
210 </TR>
|
|
211
|
|
212 <TR>
|
|
213 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
214 <A HREF="../../../../../org/apache/commons/math/optimization/OptimizationException.html" title="class in org.apache.commons.math.optimization"><B>PREV CLASS</B></A>
|
|
215 <A HREF="../../../../../org/apache/commons/math/optimization/RealPointValuePair.html" title="class in org.apache.commons.math.optimization"><B>NEXT CLASS</B></A></FONT></TD>
|
|
216 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
217 <A HREF="../../../../../index.html?org/apache/commons/math/optimization/RealConvergenceChecker.html" target="_top"><B>FRAMES</B></A>
|
|
218 <A HREF="RealConvergenceChecker.html" target="_top"><B>NO FRAMES</B></A>
|
|
219 <SCRIPT type="text/javascript">
|
|
220 <!--
|
|
221 if(window==top) {
|
|
222 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
223 }
|
|
224 //-->
|
|
225 </SCRIPT>
|
|
226 <NOSCRIPT>
|
|
227 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
228 </NOSCRIPT>
|
|
229
|
|
230
|
|
231 </FONT></TD>
|
|
232 </TR>
|
|
233 <TR>
|
|
234 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
235 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
236 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
237 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
238 </TR>
|
|
239 </TABLE>
|
|
240 <A NAME="skip-navbar_bottom"></A>
|
|
241 <!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
242
|
|
243 <HR>
|
|
244 Copyright © 2003-2010 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
|
|
245 </BODY>
|
|
246 </HTML>
|