commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r857590 [26/48] - in /websites/production/commons/content/proper/commons-math/xref-test: ./ org/apache/commons/math3/ org/apache/commons/math3/analysis/ org/apache/commons/math3/analysis/differentiation/ org/apache/commons/math3/analysis/fu...
Date Sun, 07 Apr 2013 07:52:13 GMT
Modified: websites/production/commons/content/proper/commons-math/xref-test/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/xref-test/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.html (original)
+++ websites/production/commons/content/proper/commons-math/xref-test/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/CMAESOptimizerTest.html Sun Apr  7 07:52:05 2013
@@ -59,7 +59,7 @@
 <a class="jxr_linenumber" name="49" href="#49">49</a>  
 <a class="jxr_linenumber" name="50" href="#50">50</a>      <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> DIM = 13;
 <a class="jxr_linenumber" name="51" href="#51">51</a>      <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> LAMBDA = 4 + (<strong class="jxr_keyword">int</strong>)(3.*Math.log(DIM));
-<a class="jxr_linenumber" name="52" href="#52">52</a>     
+<a class="jxr_linenumber" name="52" href="#52">52</a>  
 <a class="jxr_linenumber" name="53" href="#53">53</a>      @Test(expected = NumberIsTooLargeException.<strong class="jxr_keyword">class</strong>)
 <a class="jxr_linenumber" name="54" href="#54">54</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testInitOutofbounds1() {
 <a class="jxr_linenumber" name="55" href="#55">55</a>          <strong class="jxr_keyword">double</strong>[] startPoint = point(DIM,3);
@@ -520,288 +520,290 @@
 <a class="jxr_linenumber" name="510" href="#510">510</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; dim; i++) {
 <a class="jxr_linenumber" name="511" href="#511">511</a>             Assert.assertEquals(expected.getPoint()[i], result.getPoint()[i], pointTol);
 <a class="jxr_linenumber" name="512" href="#512">512</a>         }
-<a class="jxr_linenumber" name="513" href="#513">513</a>     }
-<a class="jxr_linenumber" name="514" href="#514">514</a> 
-<a class="jxr_linenumber" name="515" href="#515">515</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">double</strong>[] point(<strong class="jxr_keyword">int</strong> n, <strong class="jxr_keyword">double</strong> value) {
-<a class="jxr_linenumber" name="516" href="#516">516</a>         <strong class="jxr_keyword">double</strong>[] ds = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[n];
-<a class="jxr_linenumber" name="517" href="#517">517</a>         Arrays.fill(ds, value);
-<a class="jxr_linenumber" name="518" href="#518">518</a>         <strong class="jxr_keyword">return</strong> ds;
-<a class="jxr_linenumber" name="519" href="#519">519</a>     }
-<a class="jxr_linenumber" name="520" href="#520">520</a> 
-<a class="jxr_linenumber" name="521" href="#521">521</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">double</strong>[][] boundaries(<strong class="jxr_keyword">int</strong> dim,
-<a class="jxr_linenumber" name="522" href="#522">522</a>             <strong class="jxr_keyword">double</strong> lower, <strong class="jxr_keyword">double</strong> upper) {
-<a class="jxr_linenumber" name="523" href="#523">523</a>         <strong class="jxr_keyword">double</strong>[][] boundaries = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[2][dim];
-<a class="jxr_linenumber" name="524" href="#524">524</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; dim; i++)
-<a class="jxr_linenumber" name="525" href="#525">525</a>             boundaries[0][i] = lower;
+<a class="jxr_linenumber" name="513" href="#513">513</a> 
+<a class="jxr_linenumber" name="514" href="#514">514</a>         Assert.assertTrue(optim.getIterations() &gt; 0);
+<a class="jxr_linenumber" name="515" href="#515">515</a>     }
+<a class="jxr_linenumber" name="516" href="#516">516</a> 
+<a class="jxr_linenumber" name="517" href="#517">517</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">double</strong>[] point(<strong class="jxr_keyword">int</strong> n, <strong class="jxr_keyword">double</strong> value) {
+<a class="jxr_linenumber" name="518" href="#518">518</a>         <strong class="jxr_keyword">double</strong>[] ds = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[n];
+<a class="jxr_linenumber" name="519" href="#519">519</a>         Arrays.fill(ds, value);
+<a class="jxr_linenumber" name="520" href="#520">520</a>         <strong class="jxr_keyword">return</strong> ds;
+<a class="jxr_linenumber" name="521" href="#521">521</a>     }
+<a class="jxr_linenumber" name="522" href="#522">522</a> 
+<a class="jxr_linenumber" name="523" href="#523">523</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">double</strong>[][] boundaries(<strong class="jxr_keyword">int</strong> dim,
+<a class="jxr_linenumber" name="524" href="#524">524</a>             <strong class="jxr_keyword">double</strong> lower, <strong class="jxr_keyword">double</strong> upper) {
+<a class="jxr_linenumber" name="525" href="#525">525</a>         <strong class="jxr_keyword">double</strong>[][] boundaries = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[2][dim];
 <a class="jxr_linenumber" name="526" href="#526">526</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; dim; i++)
-<a class="jxr_linenumber" name="527" href="#527">527</a>             boundaries[1][i] = upper;
-<a class="jxr_linenumber" name="528" href="#528">528</a>         <strong class="jxr_keyword">return</strong> boundaries;
-<a class="jxr_linenumber" name="529" href="#529">529</a>     }
-<a class="jxr_linenumber" name="530" href="#530">530</a> 
-<a class="jxr_linenumber" name="531" href="#531">531</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Sphere</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="527" href="#527">527</a>             boundaries[0][i] = lower;
+<a class="jxr_linenumber" name="528" href="#528">528</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; dim; i++)
+<a class="jxr_linenumber" name="529" href="#529">529</a>             boundaries[1][i] = upper;
+<a class="jxr_linenumber" name="530" href="#530">530</a>         <strong class="jxr_keyword">return</strong> boundaries;
+<a class="jxr_linenumber" name="531" href="#531">531</a>     }
 <a class="jxr_linenumber" name="532" href="#532">532</a> 
-<a class="jxr_linenumber" name="533" href="#533">533</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="534" href="#534">534</a>             <strong class="jxr_keyword">double</strong> f = 0;
-<a class="jxr_linenumber" name="535" href="#535">535</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i)
-<a class="jxr_linenumber" name="536" href="#536">536</a>                 f += x[i] * x[i];
-<a class="jxr_linenumber" name="537" href="#537">537</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="538" href="#538">538</a>         }
-<a class="jxr_linenumber" name="539" href="#539">539</a>     }
-<a class="jxr_linenumber" name="540" href="#540">540</a> 
-<a class="jxr_linenumber" name="541" href="#541">541</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Cigar</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
-<a class="jxr_linenumber" name="542" href="#542">542</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
-<a class="jxr_linenumber" name="543" href="#543">543</a> 
-<a class="jxr_linenumber" name="544" href="#544">544</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Cigar</a>() {
-<a class="jxr_linenumber" name="545" href="#545">545</a>             <strong class="jxr_keyword">this</strong>(1e3);
-<a class="jxr_linenumber" name="546" href="#546">546</a>         }
-<a class="jxr_linenumber" name="547" href="#547">547</a> 
-<a class="jxr_linenumber" name="548" href="#548">548</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Cigar</a>(<strong class="jxr_keyword">double</strong> axisratio) {
-<a class="jxr_linenumber" name="549" href="#549">549</a>             factor = axisratio * axisratio;
-<a class="jxr_linenumber" name="550" href="#550">550</a>         }
-<a class="jxr_linenumber" name="551" href="#551">551</a> 
-<a class="jxr_linenumber" name="552" href="#552">552</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="553" href="#553">553</a>             <strong class="jxr_keyword">double</strong> f = x[0] * x[0];
-<a class="jxr_linenumber" name="554" href="#554">554</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 1; i &lt; x.length; ++i)
-<a class="jxr_linenumber" name="555" href="#555">555</a>                 f += factor * x[i] * x[i];
-<a class="jxr_linenumber" name="556" href="#556">556</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="557" href="#557">557</a>         }
-<a class="jxr_linenumber" name="558" href="#558">558</a>     }
-<a class="jxr_linenumber" name="559" href="#559">559</a> 
-<a class="jxr_linenumber" name="560" href="#560">560</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Tablet</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
-<a class="jxr_linenumber" name="561" href="#561">561</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
-<a class="jxr_linenumber" name="562" href="#562">562</a> 
-<a class="jxr_linenumber" name="563" href="#563">563</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Tablet</a>() {
-<a class="jxr_linenumber" name="564" href="#564">564</a>             <strong class="jxr_keyword">this</strong>(1e3);
-<a class="jxr_linenumber" name="565" href="#565">565</a>         }
-<a class="jxr_linenumber" name="566" href="#566">566</a> 
-<a class="jxr_linenumber" name="567" href="#567">567</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Tablet</a>(<strong class="jxr_keyword">double</strong> axisratio) {
-<a class="jxr_linenumber" name="568" href="#568">568</a>             factor = axisratio * axisratio;
-<a class="jxr_linenumber" name="569" href="#569">569</a>         }
-<a class="jxr_linenumber" name="570" href="#570">570</a> 
-<a class="jxr_linenumber" name="571" href="#571">571</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="572" href="#572">572</a>             <strong class="jxr_keyword">double</strong> f = factor * x[0] * x[0];
-<a class="jxr_linenumber" name="573" href="#573">573</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 1; i &lt; x.length; ++i)
-<a class="jxr_linenumber" name="574" href="#574">574</a>                 f += x[i] * x[i];
-<a class="jxr_linenumber" name="575" href="#575">575</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="576" href="#576">576</a>         }
-<a class="jxr_linenumber" name="577" href="#577">577</a>     }
-<a class="jxr_linenumber" name="578" href="#578">578</a> 
-<a class="jxr_linenumber" name="579" href="#579">579</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">CigTab</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
-<a class="jxr_linenumber" name="580" href="#580">580</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
-<a class="jxr_linenumber" name="581" href="#581">581</a> 
-<a class="jxr_linenumber" name="582" href="#582">582</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">CigTab</a>() {
-<a class="jxr_linenumber" name="583" href="#583">583</a>             <strong class="jxr_keyword">this</strong>(1e4);
-<a class="jxr_linenumber" name="584" href="#584">584</a>         }
-<a class="jxr_linenumber" name="585" href="#585">585</a> 
-<a class="jxr_linenumber" name="586" href="#586">586</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">CigTab</a>(<strong class="jxr_keyword">double</strong> axisratio) {
-<a class="jxr_linenumber" name="587" href="#587">587</a>             factor = axisratio;
-<a class="jxr_linenumber" name="588" href="#588">588</a>         }
-<a class="jxr_linenumber" name="589" href="#589">589</a> 
-<a class="jxr_linenumber" name="590" href="#590">590</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="591" href="#591">591</a>             <strong class="jxr_keyword">int</strong> end = x.length - 1;
-<a class="jxr_linenumber" name="592" href="#592">592</a>             <strong class="jxr_keyword">double</strong> f = x[0] * x[0] / factor + factor * x[end] * x[end];
-<a class="jxr_linenumber" name="593" href="#593">593</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 1; i &lt; end; ++i)
-<a class="jxr_linenumber" name="594" href="#594">594</a>                 f += x[i] * x[i];
-<a class="jxr_linenumber" name="595" href="#595">595</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="596" href="#596">596</a>         }
-<a class="jxr_linenumber" name="597" href="#597">597</a>     }
-<a class="jxr_linenumber" name="598" href="#598">598</a> 
-<a class="jxr_linenumber" name="599" href="#599">599</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">TwoAxes</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="533" href="#533">533</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Sphere</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="534" href="#534">534</a> 
+<a class="jxr_linenumber" name="535" href="#535">535</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="536" href="#536">536</a>             <strong class="jxr_keyword">double</strong> f = 0;
+<a class="jxr_linenumber" name="537" href="#537">537</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i)
+<a class="jxr_linenumber" name="538" href="#538">538</a>                 f += x[i] * x[i];
+<a class="jxr_linenumber" name="539" href="#539">539</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="540" href="#540">540</a>         }
+<a class="jxr_linenumber" name="541" href="#541">541</a>     }
+<a class="jxr_linenumber" name="542" href="#542">542</a> 
+<a class="jxr_linenumber" name="543" href="#543">543</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Cigar</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="544" href="#544">544</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
+<a class="jxr_linenumber" name="545" href="#545">545</a> 
+<a class="jxr_linenumber" name="546" href="#546">546</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Cigar</a>() {
+<a class="jxr_linenumber" name="547" href="#547">547</a>             <strong class="jxr_keyword">this</strong>(1e3);
+<a class="jxr_linenumber" name="548" href="#548">548</a>         }
+<a class="jxr_linenumber" name="549" href="#549">549</a> 
+<a class="jxr_linenumber" name="550" href="#550">550</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Cigar</a>(<strong class="jxr_keyword">double</strong> axisratio) {
+<a class="jxr_linenumber" name="551" href="#551">551</a>             factor = axisratio * axisratio;
+<a class="jxr_linenumber" name="552" href="#552">552</a>         }
+<a class="jxr_linenumber" name="553" href="#553">553</a> 
+<a class="jxr_linenumber" name="554" href="#554">554</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="555" href="#555">555</a>             <strong class="jxr_keyword">double</strong> f = x[0] * x[0];
+<a class="jxr_linenumber" name="556" href="#556">556</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 1; i &lt; x.length; ++i)
+<a class="jxr_linenumber" name="557" href="#557">557</a>                 f += factor * x[i] * x[i];
+<a class="jxr_linenumber" name="558" href="#558">558</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="559" href="#559">559</a>         }
+<a class="jxr_linenumber" name="560" href="#560">560</a>     }
+<a class="jxr_linenumber" name="561" href="#561">561</a> 
+<a class="jxr_linenumber" name="562" href="#562">562</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Tablet</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="563" href="#563">563</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
+<a class="jxr_linenumber" name="564" href="#564">564</a> 
+<a class="jxr_linenumber" name="565" href="#565">565</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Tablet</a>() {
+<a class="jxr_linenumber" name="566" href="#566">566</a>             <strong class="jxr_keyword">this</strong>(1e3);
+<a class="jxr_linenumber" name="567" href="#567">567</a>         }
+<a class="jxr_linenumber" name="568" href="#568">568</a> 
+<a class="jxr_linenumber" name="569" href="#569">569</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Tablet</a>(<strong class="jxr_keyword">double</strong> axisratio) {
+<a class="jxr_linenumber" name="570" href="#570">570</a>             factor = axisratio * axisratio;
+<a class="jxr_linenumber" name="571" href="#571">571</a>         }
+<a class="jxr_linenumber" name="572" href="#572">572</a> 
+<a class="jxr_linenumber" name="573" href="#573">573</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="574" href="#574">574</a>             <strong class="jxr_keyword">double</strong> f = factor * x[0] * x[0];
+<a class="jxr_linenumber" name="575" href="#575">575</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 1; i &lt; x.length; ++i)
+<a class="jxr_linenumber" name="576" href="#576">576</a>                 f += x[i] * x[i];
+<a class="jxr_linenumber" name="577" href="#577">577</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="578" href="#578">578</a>         }
+<a class="jxr_linenumber" name="579" href="#579">579</a>     }
+<a class="jxr_linenumber" name="580" href="#580">580</a> 
+<a class="jxr_linenumber" name="581" href="#581">581</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">CigTab</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="582" href="#582">582</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
+<a class="jxr_linenumber" name="583" href="#583">583</a> 
+<a class="jxr_linenumber" name="584" href="#584">584</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">CigTab</a>() {
+<a class="jxr_linenumber" name="585" href="#585">585</a>             <strong class="jxr_keyword">this</strong>(1e4);
+<a class="jxr_linenumber" name="586" href="#586">586</a>         }
+<a class="jxr_linenumber" name="587" href="#587">587</a> 
+<a class="jxr_linenumber" name="588" href="#588">588</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">CigTab</a>(<strong class="jxr_keyword">double</strong> axisratio) {
+<a class="jxr_linenumber" name="589" href="#589">589</a>             factor = axisratio;
+<a class="jxr_linenumber" name="590" href="#590">590</a>         }
+<a class="jxr_linenumber" name="591" href="#591">591</a> 
+<a class="jxr_linenumber" name="592" href="#592">592</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="593" href="#593">593</a>             <strong class="jxr_keyword">int</strong> end = x.length - 1;
+<a class="jxr_linenumber" name="594" href="#594">594</a>             <strong class="jxr_keyword">double</strong> f = x[0] * x[0] / factor + factor * x[end] * x[end];
+<a class="jxr_linenumber" name="595" href="#595">595</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 1; i &lt; end; ++i)
+<a class="jxr_linenumber" name="596" href="#596">596</a>                 f += x[i] * x[i];
+<a class="jxr_linenumber" name="597" href="#597">597</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="598" href="#598">598</a>         }
+<a class="jxr_linenumber" name="599" href="#599">599</a>     }
 <a class="jxr_linenumber" name="600" href="#600">600</a> 
-<a class="jxr_linenumber" name="601" href="#601">601</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
+<a class="jxr_linenumber" name="601" href="#601">601</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">TwoAxes</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
 <a class="jxr_linenumber" name="602" href="#602">602</a> 
-<a class="jxr_linenumber" name="603" href="#603">603</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">TwoAxes</a>() {
-<a class="jxr_linenumber" name="604" href="#604">604</a>             <strong class="jxr_keyword">this</strong>(1e6);
-<a class="jxr_linenumber" name="605" href="#605">605</a>         }
-<a class="jxr_linenumber" name="606" href="#606">606</a> 
-<a class="jxr_linenumber" name="607" href="#607">607</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">TwoAxes</a>(<strong class="jxr_keyword">double</strong> axisratio) {
-<a class="jxr_linenumber" name="608" href="#608">608</a>             factor = axisratio * axisratio;
-<a class="jxr_linenumber" name="609" href="#609">609</a>         }
-<a class="jxr_linenumber" name="610" href="#610">610</a> 
-<a class="jxr_linenumber" name="611" href="#611">611</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="612" href="#612">612</a>             <strong class="jxr_keyword">double</strong> f = 0;
-<a class="jxr_linenumber" name="613" href="#613">613</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i)
-<a class="jxr_linenumber" name="614" href="#614">614</a>                 f += (i &lt; x.length / 2 ? factor : 1) * x[i] * x[i];
-<a class="jxr_linenumber" name="615" href="#615">615</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="616" href="#616">616</a>         }
-<a class="jxr_linenumber" name="617" href="#617">617</a>     }
-<a class="jxr_linenumber" name="618" href="#618">618</a> 
-<a class="jxr_linenumber" name="619" href="#619">619</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">ElliRotated</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
-<a class="jxr_linenumber" name="620" href="#620">620</a>         <strong class="jxr_keyword">private</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Basis</a> B = <strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Basis</a>();
-<a class="jxr_linenumber" name="621" href="#621">621</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
-<a class="jxr_linenumber" name="622" href="#622">622</a> 
-<a class="jxr_linenumber" name="623" href="#623">623</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">ElliRotated</a>() {
-<a class="jxr_linenumber" name="624" href="#624">624</a>             <strong class="jxr_keyword">this</strong>(1e3);
-<a class="jxr_linenumber" name="625" href="#625">625</a>         }
-<a class="jxr_linenumber" name="626" href="#626">626</a> 
-<a class="jxr_linenumber" name="627" href="#627">627</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">ElliRotated</a>(<strong class="jxr_keyword">double</strong> axisratio) {
-<a class="jxr_linenumber" name="628" href="#628">628</a>             factor = axisratio * axisratio;
-<a class="jxr_linenumber" name="629" href="#629">629</a>         }
-<a class="jxr_linenumber" name="630" href="#630">630</a> 
-<a class="jxr_linenumber" name="631" href="#631">631</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="632" href="#632">632</a>             <strong class="jxr_keyword">double</strong> f = 0;
-<a class="jxr_linenumber" name="633" href="#633">633</a>             x = B.Rotate(x);
-<a class="jxr_linenumber" name="634" href="#634">634</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i)
-<a class="jxr_linenumber" name="635" href="#635">635</a>                 f += Math.pow(factor, i / (x.length - 1.)) * x[i] * x[i];
-<a class="jxr_linenumber" name="636" href="#636">636</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="637" href="#637">637</a>         }
-<a class="jxr_linenumber" name="638" href="#638">638</a>     }
-<a class="jxr_linenumber" name="639" href="#639">639</a> 
-<a class="jxr_linenumber" name="640" href="#640">640</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Elli</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="603" href="#603">603</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
+<a class="jxr_linenumber" name="604" href="#604">604</a> 
+<a class="jxr_linenumber" name="605" href="#605">605</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">TwoAxes</a>() {
+<a class="jxr_linenumber" name="606" href="#606">606</a>             <strong class="jxr_keyword">this</strong>(1e6);
+<a class="jxr_linenumber" name="607" href="#607">607</a>         }
+<a class="jxr_linenumber" name="608" href="#608">608</a> 
+<a class="jxr_linenumber" name="609" href="#609">609</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">TwoAxes</a>(<strong class="jxr_keyword">double</strong> axisratio) {
+<a class="jxr_linenumber" name="610" href="#610">610</a>             factor = axisratio * axisratio;
+<a class="jxr_linenumber" name="611" href="#611">611</a>         }
+<a class="jxr_linenumber" name="612" href="#612">612</a> 
+<a class="jxr_linenumber" name="613" href="#613">613</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="614" href="#614">614</a>             <strong class="jxr_keyword">double</strong> f = 0;
+<a class="jxr_linenumber" name="615" href="#615">615</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i)
+<a class="jxr_linenumber" name="616" href="#616">616</a>                 f += (i &lt; x.length / 2 ? factor : 1) * x[i] * x[i];
+<a class="jxr_linenumber" name="617" href="#617">617</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="618" href="#618">618</a>         }
+<a class="jxr_linenumber" name="619" href="#619">619</a>     }
+<a class="jxr_linenumber" name="620" href="#620">620</a> 
+<a class="jxr_linenumber" name="621" href="#621">621</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">ElliRotated</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="622" href="#622">622</a>         <strong class="jxr_keyword">private</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Basis</a> B = <strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Basis</a>();
+<a class="jxr_linenumber" name="623" href="#623">623</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
+<a class="jxr_linenumber" name="624" href="#624">624</a> 
+<a class="jxr_linenumber" name="625" href="#625">625</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">ElliRotated</a>() {
+<a class="jxr_linenumber" name="626" href="#626">626</a>             <strong class="jxr_keyword">this</strong>(1e3);
+<a class="jxr_linenumber" name="627" href="#627">627</a>         }
+<a class="jxr_linenumber" name="628" href="#628">628</a> 
+<a class="jxr_linenumber" name="629" href="#629">629</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">ElliRotated</a>(<strong class="jxr_keyword">double</strong> axisratio) {
+<a class="jxr_linenumber" name="630" href="#630">630</a>             factor = axisratio * axisratio;
+<a class="jxr_linenumber" name="631" href="#631">631</a>         }
+<a class="jxr_linenumber" name="632" href="#632">632</a> 
+<a class="jxr_linenumber" name="633" href="#633">633</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="634" href="#634">634</a>             <strong class="jxr_keyword">double</strong> f = 0;
+<a class="jxr_linenumber" name="635" href="#635">635</a>             x = B.Rotate(x);
+<a class="jxr_linenumber" name="636" href="#636">636</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i)
+<a class="jxr_linenumber" name="637" href="#637">637</a>                 f += Math.pow(factor, i / (x.length - 1.)) * x[i] * x[i];
+<a class="jxr_linenumber" name="638" href="#638">638</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="639" href="#639">639</a>         }
+<a class="jxr_linenumber" name="640" href="#640">640</a>     }
 <a class="jxr_linenumber" name="641" href="#641">641</a> 
-<a class="jxr_linenumber" name="642" href="#642">642</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
+<a class="jxr_linenumber" name="642" href="#642">642</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Elli</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
 <a class="jxr_linenumber" name="643" href="#643">643</a> 
-<a class="jxr_linenumber" name="644" href="#644">644</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Elli</a>() {
-<a class="jxr_linenumber" name="645" href="#645">645</a>             <strong class="jxr_keyword">this</strong>(1e3);
-<a class="jxr_linenumber" name="646" href="#646">646</a>         }
-<a class="jxr_linenumber" name="647" href="#647">647</a> 
-<a class="jxr_linenumber" name="648" href="#648">648</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Elli</a>(<strong class="jxr_keyword">double</strong> axisratio) {
-<a class="jxr_linenumber" name="649" href="#649">649</a>             factor = axisratio * axisratio;
-<a class="jxr_linenumber" name="650" href="#650">650</a>         }
-<a class="jxr_linenumber" name="651" href="#651">651</a> 
-<a class="jxr_linenumber" name="652" href="#652">652</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="653" href="#653">653</a>             <strong class="jxr_keyword">double</strong> f = 0;
-<a class="jxr_linenumber" name="654" href="#654">654</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i)
-<a class="jxr_linenumber" name="655" href="#655">655</a>                 f += Math.pow(factor, i / (x.length - 1.)) * x[i] * x[i];
-<a class="jxr_linenumber" name="656" href="#656">656</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="657" href="#657">657</a>         }
-<a class="jxr_linenumber" name="658" href="#658">658</a>     }
-<a class="jxr_linenumber" name="659" href="#659">659</a> 
-<a class="jxr_linenumber" name="660" href="#660">660</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">MinusElli</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="644" href="#644">644</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> factor;
+<a class="jxr_linenumber" name="645" href="#645">645</a> 
+<a class="jxr_linenumber" name="646" href="#646">646</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Elli</a>() {
+<a class="jxr_linenumber" name="647" href="#647">647</a>             <strong class="jxr_keyword">this</strong>(1e3);
+<a class="jxr_linenumber" name="648" href="#648">648</a>         }
+<a class="jxr_linenumber" name="649" href="#649">649</a> 
+<a class="jxr_linenumber" name="650" href="#650">650</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Elli</a>(<strong class="jxr_keyword">double</strong> axisratio) {
+<a class="jxr_linenumber" name="651" href="#651">651</a>             factor = axisratio * axisratio;
+<a class="jxr_linenumber" name="652" href="#652">652</a>         }
+<a class="jxr_linenumber" name="653" href="#653">653</a> 
+<a class="jxr_linenumber" name="654" href="#654">654</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="655" href="#655">655</a>             <strong class="jxr_keyword">double</strong> f = 0;
+<a class="jxr_linenumber" name="656" href="#656">656</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i)
+<a class="jxr_linenumber" name="657" href="#657">657</a>                 f += Math.pow(factor, i / (x.length - 1.)) * x[i] * x[i];
+<a class="jxr_linenumber" name="658" href="#658">658</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="659" href="#659">659</a>         }
+<a class="jxr_linenumber" name="660" href="#660">660</a>     }
 <a class="jxr_linenumber" name="661" href="#661">661</a> 
-<a class="jxr_linenumber" name="662" href="#662">662</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="663" href="#663">663</a>             <strong class="jxr_keyword">return</strong> 1.0-(<strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Elli</a>().value(x));
-<a class="jxr_linenumber" name="664" href="#664">664</a>         }
-<a class="jxr_linenumber" name="665" href="#665">665</a>     }
-<a class="jxr_linenumber" name="666" href="#666">666</a> 
-<a class="jxr_linenumber" name="667" href="#667">667</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">DiffPow</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="662" href="#662">662</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">MinusElli</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="663" href="#663">663</a> 
+<a class="jxr_linenumber" name="664" href="#664">664</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="665" href="#665">665</a>             <strong class="jxr_keyword">return</strong> 1.0-(<strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Elli</a>().value(x));
+<a class="jxr_linenumber" name="666" href="#666">666</a>         }
+<a class="jxr_linenumber" name="667" href="#667">667</a>     }
 <a class="jxr_linenumber" name="668" href="#668">668</a> 
-<a class="jxr_linenumber" name="669" href="#669">669</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="670" href="#670">670</a>             <strong class="jxr_keyword">double</strong> f = 0;
-<a class="jxr_linenumber" name="671" href="#671">671</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i)
-<a class="jxr_linenumber" name="672" href="#672">672</a>                 f += Math.pow(Math.abs(x[i]), 2. + 10 * (<strong class="jxr_keyword">double</strong>) i
-<a class="jxr_linenumber" name="673" href="#673">673</a>                         / (x.length - 1.));
-<a class="jxr_linenumber" name="674" href="#674">674</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="675" href="#675">675</a>         }
-<a class="jxr_linenumber" name="676" href="#676">676</a>     }
-<a class="jxr_linenumber" name="677" href="#677">677</a> 
-<a class="jxr_linenumber" name="678" href="#678">678</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">SsDiffPow</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="669" href="#669">669</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">DiffPow</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="670" href="#670">670</a> 
+<a class="jxr_linenumber" name="671" href="#671">671</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="672" href="#672">672</a>             <strong class="jxr_keyword">double</strong> f = 0;
+<a class="jxr_linenumber" name="673" href="#673">673</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i)
+<a class="jxr_linenumber" name="674" href="#674">674</a>                 f += Math.pow(Math.abs(x[i]), 2. + 10 * (<strong class="jxr_keyword">double</strong>) i
+<a class="jxr_linenumber" name="675" href="#675">675</a>                         / (x.length - 1.));
+<a class="jxr_linenumber" name="676" href="#676">676</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="677" href="#677">677</a>         }
+<a class="jxr_linenumber" name="678" href="#678">678</a>     }
 <a class="jxr_linenumber" name="679" href="#679">679</a> 
-<a class="jxr_linenumber" name="680" href="#680">680</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="681" href="#681">681</a>             <strong class="jxr_keyword">double</strong> f = Math.pow(<strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">DiffPow</a>().value(x), 0.25);
-<a class="jxr_linenumber" name="682" href="#682">682</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="683" href="#683">683</a>         }
-<a class="jxr_linenumber" name="684" href="#684">684</a>     }
-<a class="jxr_linenumber" name="685" href="#685">685</a> 
-<a class="jxr_linenumber" name="686" href="#686">686</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Rosen</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="680" href="#680">680</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">SsDiffPow</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="681" href="#681">681</a> 
+<a class="jxr_linenumber" name="682" href="#682">682</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="683" href="#683">683</a>             <strong class="jxr_keyword">double</strong> f = Math.pow(<strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">DiffPow</a>().value(x), 0.25);
+<a class="jxr_linenumber" name="684" href="#684">684</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="685" href="#685">685</a>         }
+<a class="jxr_linenumber" name="686" href="#686">686</a>     }
 <a class="jxr_linenumber" name="687" href="#687">687</a> 
-<a class="jxr_linenumber" name="688" href="#688">688</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="689" href="#689">689</a>             <strong class="jxr_keyword">double</strong> f = 0;
-<a class="jxr_linenumber" name="690" href="#690">690</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length - 1; ++i)
-<a class="jxr_linenumber" name="691" href="#691">691</a>                 f += 1e2 * (x[i] * x[i] - x[i + 1]) * (x[i] * x[i] - x[i + 1])
-<a class="jxr_linenumber" name="692" href="#692">692</a>                 + (x[i] - 1.) * (x[i] - 1.);
-<a class="jxr_linenumber" name="693" href="#693">693</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="694" href="#694">694</a>         }
-<a class="jxr_linenumber" name="695" href="#695">695</a>     }
-<a class="jxr_linenumber" name="696" href="#696">696</a> 
-<a class="jxr_linenumber" name="697" href="#697">697</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Ackley</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
-<a class="jxr_linenumber" name="698" href="#698">698</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> axisratio;
-<a class="jxr_linenumber" name="699" href="#699">699</a> 
-<a class="jxr_linenumber" name="700" href="#700">700</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Ackley</a>(<strong class="jxr_keyword">double</strong> axra) {
-<a class="jxr_linenumber" name="701" href="#701">701</a>             axisratio = axra;
-<a class="jxr_linenumber" name="702" href="#702">702</a>         }
-<a class="jxr_linenumber" name="703" href="#703">703</a> 
-<a class="jxr_linenumber" name="704" href="#704">704</a>         <strong class="jxr_keyword">public</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Ackley</a>() {
-<a class="jxr_linenumber" name="705" href="#705">705</a>             <strong class="jxr_keyword">this</strong>(1);
-<a class="jxr_linenumber" name="706" href="#706">706</a>         }
-<a class="jxr_linenumber" name="707" href="#707">707</a> 
-<a class="jxr_linenumber" name="708" href="#708">708</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="709" href="#709">709</a>             <strong class="jxr_keyword">double</strong> f = 0;
-<a class="jxr_linenumber" name="710" href="#710">710</a>             <strong class="jxr_keyword">double</strong> res2 = 0;
-<a class="jxr_linenumber" name="711" href="#711">711</a>             <strong class="jxr_keyword">double</strong> fac = 0;
-<a class="jxr_linenumber" name="712" href="#712">712</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i) {
-<a class="jxr_linenumber" name="713" href="#713">713</a>                 fac = Math.pow(axisratio, (i - 1.) / (x.length - 1.));
-<a class="jxr_linenumber" name="714" href="#714">714</a>                 f += fac * fac * x[i] * x[i];
-<a class="jxr_linenumber" name="715" href="#715">715</a>                 res2 += Math.cos(2. * Math.PI * fac * x[i]);
-<a class="jxr_linenumber" name="716" href="#716">716</a>             }
-<a class="jxr_linenumber" name="717" href="#717">717</a>             f = (20. - 20. * Math.exp(-0.2 * Math.sqrt(f / x.length))
-<a class="jxr_linenumber" name="718" href="#718">718</a>                     + Math.exp(1.) - Math.exp(res2 / x.length));
-<a class="jxr_linenumber" name="719" href="#719">719</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="720" href="#720">720</a>         }
-<a class="jxr_linenumber" name="721" href="#721">721</a>     }
-<a class="jxr_linenumber" name="722" href="#722">722</a> 
-<a class="jxr_linenumber" name="723" href="#723">723</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Rastrigin</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="688" href="#688">688</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Rosen</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="689" href="#689">689</a> 
+<a class="jxr_linenumber" name="690" href="#690">690</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="691" href="#691">691</a>             <strong class="jxr_keyword">double</strong> f = 0;
+<a class="jxr_linenumber" name="692" href="#692">692</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length - 1; ++i)
+<a class="jxr_linenumber" name="693" href="#693">693</a>                 f += 1e2 * (x[i] * x[i] - x[i + 1]) * (x[i] * x[i] - x[i + 1])
+<a class="jxr_linenumber" name="694" href="#694">694</a>                 + (x[i] - 1.) * (x[i] - 1.);
+<a class="jxr_linenumber" name="695" href="#695">695</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="696" href="#696">696</a>         }
+<a class="jxr_linenumber" name="697" href="#697">697</a>     }
+<a class="jxr_linenumber" name="698" href="#698">698</a> 
+<a class="jxr_linenumber" name="699" href="#699">699</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Ackley</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="700" href="#700">700</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> axisratio;
+<a class="jxr_linenumber" name="701" href="#701">701</a> 
+<a class="jxr_linenumber" name="702" href="#702">702</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Ackley</a>(<strong class="jxr_keyword">double</strong> axra) {
+<a class="jxr_linenumber" name="703" href="#703">703</a>             axisratio = axra;
+<a class="jxr_linenumber" name="704" href="#704">704</a>         }
+<a class="jxr_linenumber" name="705" href="#705">705</a> 
+<a class="jxr_linenumber" name="706" href="#706">706</a>         <strong class="jxr_keyword">public</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Ackley</a>() {
+<a class="jxr_linenumber" name="707" href="#707">707</a>             <strong class="jxr_keyword">this</strong>(1);
+<a class="jxr_linenumber" name="708" href="#708">708</a>         }
+<a class="jxr_linenumber" name="709" href="#709">709</a> 
+<a class="jxr_linenumber" name="710" href="#710">710</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="711" href="#711">711</a>             <strong class="jxr_keyword">double</strong> f = 0;
+<a class="jxr_linenumber" name="712" href="#712">712</a>             <strong class="jxr_keyword">double</strong> res2 = 0;
+<a class="jxr_linenumber" name="713" href="#713">713</a>             <strong class="jxr_keyword">double</strong> fac = 0;
+<a class="jxr_linenumber" name="714" href="#714">714</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i) {
+<a class="jxr_linenumber" name="715" href="#715">715</a>                 fac = Math.pow(axisratio, (i - 1.) / (x.length - 1.));
+<a class="jxr_linenumber" name="716" href="#716">716</a>                 f += fac * fac * x[i] * x[i];
+<a class="jxr_linenumber" name="717" href="#717">717</a>                 res2 += Math.cos(2. * Math.PI * fac * x[i]);
+<a class="jxr_linenumber" name="718" href="#718">718</a>             }
+<a class="jxr_linenumber" name="719" href="#719">719</a>             f = (20. - 20. * Math.exp(-0.2 * Math.sqrt(f / x.length))
+<a class="jxr_linenumber" name="720" href="#720">720</a>                     + Math.exp(1.) - Math.exp(res2 / x.length));
+<a class="jxr_linenumber" name="721" href="#721">721</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="722" href="#722">722</a>         }
+<a class="jxr_linenumber" name="723" href="#723">723</a>     }
 <a class="jxr_linenumber" name="724" href="#724">724</a> 
-<a class="jxr_linenumber" name="725" href="#725">725</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> axisratio;
-<a class="jxr_linenumber" name="726" href="#726">726</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> amplitude;
-<a class="jxr_linenumber" name="727" href="#727">727</a> 
-<a class="jxr_linenumber" name="728" href="#728">728</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Rastrigin</a>() {
-<a class="jxr_linenumber" name="729" href="#729">729</a>             <strong class="jxr_keyword">this</strong>(1, 10);
-<a class="jxr_linenumber" name="730" href="#730">730</a>         }
-<a class="jxr_linenumber" name="731" href="#731">731</a> 
-<a class="jxr_linenumber" name="732" href="#732">732</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Rastrigin</a>(<strong class="jxr_keyword">double</strong> axisratio, <strong class="jxr_keyword">double</strong> amplitude) {
-<a class="jxr_linenumber" name="733" href="#733">733</a>             <strong class="jxr_keyword">this</strong>.axisratio = axisratio;
-<a class="jxr_linenumber" name="734" href="#734">734</a>             <strong class="jxr_keyword">this</strong>.amplitude = amplitude;
-<a class="jxr_linenumber" name="735" href="#735">735</a>         }
-<a class="jxr_linenumber" name="736" href="#736">736</a> 
-<a class="jxr_linenumber" name="737" href="#737">737</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="738" href="#738">738</a>             <strong class="jxr_keyword">double</strong> f = 0;
-<a class="jxr_linenumber" name="739" href="#739">739</a>             <strong class="jxr_keyword">double</strong> fac;
-<a class="jxr_linenumber" name="740" href="#740">740</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i) {
-<a class="jxr_linenumber" name="741" href="#741">741</a>                 fac = Math.pow(axisratio, (i - 1.) / (x.length - 1.));
-<a class="jxr_linenumber" name="742" href="#742">742</a>                 <strong class="jxr_keyword">if</strong> (i == 0 &amp;&amp; x[i] &lt; 0)
-<a class="jxr_linenumber" name="743" href="#743">743</a>                     fac *= 1.;
-<a class="jxr_linenumber" name="744" href="#744">744</a>                 f += fac * fac * x[i] * x[i] + amplitude
-<a class="jxr_linenumber" name="745" href="#745">745</a>                 * (1. - Math.cos(2. * Math.PI * fac * x[i]));
-<a class="jxr_linenumber" name="746" href="#746">746</a>             }
-<a class="jxr_linenumber" name="747" href="#747">747</a>             <strong class="jxr_keyword">return</strong> f;
-<a class="jxr_linenumber" name="748" href="#748">748</a>         }
-<a class="jxr_linenumber" name="749" href="#749">749</a>     }
-<a class="jxr_linenumber" name="750" href="#750">750</a> 
-<a class="jxr_linenumber" name="751" href="#751">751</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Basis</a> {
-<a class="jxr_linenumber" name="752" href="#752">752</a>         <strong class="jxr_keyword">double</strong>[][] basis;
-<a class="jxr_linenumber" name="753" href="#753">753</a>         Random rand = <strong class="jxr_keyword">new</strong> Random(2); <em class="jxr_comment">// use not always the same basis</em>
-<a class="jxr_linenumber" name="754" href="#754">754</a> 
-<a class="jxr_linenumber" name="755" href="#755">755</a>         <strong class="jxr_keyword">double</strong>[] Rotate(<strong class="jxr_keyword">double</strong>[] x) {
-<a class="jxr_linenumber" name="756" href="#756">756</a>             GenBasis(x.length);
-<a class="jxr_linenumber" name="757" href="#757">757</a>             <strong class="jxr_keyword">double</strong>[] y = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[x.length];
-<a class="jxr_linenumber" name="758" href="#758">758</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i) {
-<a class="jxr_linenumber" name="759" href="#759">759</a>                 y[i] = 0;
-<a class="jxr_linenumber" name="760" href="#760">760</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j &lt; x.length; ++j)
-<a class="jxr_linenumber" name="761" href="#761">761</a>                     y[i] += basis[i][j] * x[j];
-<a class="jxr_linenumber" name="762" href="#762">762</a>             }
-<a class="jxr_linenumber" name="763" href="#763">763</a>             <strong class="jxr_keyword">return</strong> y;
-<a class="jxr_linenumber" name="764" href="#764">764</a>         }
-<a class="jxr_linenumber" name="765" href="#765">765</a> 
-<a class="jxr_linenumber" name="766" href="#766">766</a>         <strong class="jxr_keyword">void</strong> GenBasis(<strong class="jxr_keyword">int</strong> DIM) {
-<a class="jxr_linenumber" name="767" href="#767">767</a>             <strong class="jxr_keyword">if</strong> (basis != <strong class="jxr_keyword">null</strong> ? basis.length == DIM : false)
-<a class="jxr_linenumber" name="768" href="#768">768</a>                 <strong class="jxr_keyword">return</strong>;
-<a class="jxr_linenumber" name="769" href="#769">769</a> 
-<a class="jxr_linenumber" name="770" href="#770">770</a>             <strong class="jxr_keyword">double</strong> sp;
-<a class="jxr_linenumber" name="771" href="#771">771</a>             <strong class="jxr_keyword">int</strong> i, j, k;
-<a class="jxr_linenumber" name="772" href="#772">772</a> 
-<a class="jxr_linenumber" name="773" href="#773">773</a>             <em class="jxr_comment">/*<em class="jxr_comment"> generate orthogonal basis */</em></em>
-<a class="jxr_linenumber" name="774" href="#774">774</a>             basis = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[DIM][DIM];
-<a class="jxr_linenumber" name="775" href="#775">775</a>             <strong class="jxr_keyword">for</strong> (i = 0; i &lt; DIM; ++i) {
-<a class="jxr_linenumber" name="776" href="#776">776</a>                 <em class="jxr_comment">/*<em class="jxr_comment"> sample components gaussian */</em></em>
-<a class="jxr_linenumber" name="777" href="#777">777</a>                 <strong class="jxr_keyword">for</strong> (j = 0; j &lt; DIM; ++j)
-<a class="jxr_linenumber" name="778" href="#778">778</a>                     basis[i][j] = rand.nextGaussian();
-<a class="jxr_linenumber" name="779" href="#779">779</a>                 <em class="jxr_comment">/*<em class="jxr_comment"> substract projection of previous vectors */</em></em>
-<a class="jxr_linenumber" name="780" href="#780">780</a>                 <strong class="jxr_keyword">for</strong> (j = i - 1; j &gt;= 0; --j) {
-<a class="jxr_linenumber" name="781" href="#781">781</a>                     <strong class="jxr_keyword">for</strong> (sp = 0., k = 0; k &lt; DIM; ++k)
-<a class="jxr_linenumber" name="782" href="#782">782</a>                         sp += basis[i][k] * basis[j][k]; <em class="jxr_comment">/*<em class="jxr_comment"> scalar product */</em></em>
-<a class="jxr_linenumber" name="783" href="#783">783</a>                     <strong class="jxr_keyword">for</strong> (k = 0; k &lt; DIM; ++k)
-<a class="jxr_linenumber" name="784" href="#784">784</a>                         basis[i][k] -= sp * basis[j][k]; <em class="jxr_comment">/*<em class="jxr_comment"> substract */</em></em>
-<a class="jxr_linenumber" name="785" href="#785">785</a>                 }
-<a class="jxr_linenumber" name="786" href="#786">786</a>                 <em class="jxr_comment">/*<em class="jxr_comment"> normalize */</em></em>
-<a class="jxr_linenumber" name="787" href="#787">787</a>                 <strong class="jxr_keyword">for</strong> (sp = 0., k = 0; k &lt; DIM; ++k)
-<a class="jxr_linenumber" name="788" href="#788">788</a>                     sp += basis[i][k] * basis[i][k]; <em class="jxr_comment">/*<em class="jxr_comment"> squared norm */</em></em>
-<a class="jxr_linenumber" name="789" href="#789">789</a>                 <strong class="jxr_keyword">for</strong> (k = 0; k &lt; DIM; ++k)
-<a class="jxr_linenumber" name="790" href="#790">790</a>                     basis[i][k] /= Math.sqrt(sp);
-<a class="jxr_linenumber" name="791" href="#791">791</a>             }
-<a class="jxr_linenumber" name="792" href="#792">792</a>         }
-<a class="jxr_linenumber" name="793" href="#793">793</a>     }
-<a class="jxr_linenumber" name="794" href="#794">794</a> }
+<a class="jxr_linenumber" name="725" href="#725">725</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Rastrigin</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
+<a class="jxr_linenumber" name="726" href="#726">726</a> 
+<a class="jxr_linenumber" name="727" href="#727">727</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> axisratio;
+<a class="jxr_linenumber" name="728" href="#728">728</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">double</strong> amplitude;
+<a class="jxr_linenumber" name="729" href="#729">729</a> 
+<a class="jxr_linenumber" name="730" href="#730">730</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Rastrigin</a>() {
+<a class="jxr_linenumber" name="731" href="#731">731</a>             <strong class="jxr_keyword">this</strong>(1, 10);
+<a class="jxr_linenumber" name="732" href="#732">732</a>         }
+<a class="jxr_linenumber" name="733" href="#733">733</a> 
+<a class="jxr_linenumber" name="734" href="#734">734</a>         <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Rastrigin</a>(<strong class="jxr_keyword">double</strong> axisratio, <strong class="jxr_keyword">double</strong> amplitude) {
+<a class="jxr_linenumber" name="735" href="#735">735</a>             <strong class="jxr_keyword">this</strong>.axisratio = axisratio;
+<a class="jxr_linenumber" name="736" href="#736">736</a>             <strong class="jxr_keyword">this</strong>.amplitude = amplitude;
+<a class="jxr_linenumber" name="737" href="#737">737</a>         }
+<a class="jxr_linenumber" name="738" href="#738">738</a> 
+<a class="jxr_linenumber" name="739" href="#739">739</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="740" href="#740">740</a>             <strong class="jxr_keyword">double</strong> f = 0;
+<a class="jxr_linenumber" name="741" href="#741">741</a>             <strong class="jxr_keyword">double</strong> fac;
+<a class="jxr_linenumber" name="742" href="#742">742</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i) {
+<a class="jxr_linenumber" name="743" href="#743">743</a>                 fac = Math.pow(axisratio, (i - 1.) / (x.length - 1.));
+<a class="jxr_linenumber" name="744" href="#744">744</a>                 <strong class="jxr_keyword">if</strong> (i == 0 &amp;&amp; x[i] &lt; 0)
+<a class="jxr_linenumber" name="745" href="#745">745</a>                     fac *= 1.;
+<a class="jxr_linenumber" name="746" href="#746">746</a>                 f += fac * fac * x[i] * x[i] + amplitude
+<a class="jxr_linenumber" name="747" href="#747">747</a>                 * (1. - Math.cos(2. * Math.PI * fac * x[i]));
+<a class="jxr_linenumber" name="748" href="#748">748</a>             }
+<a class="jxr_linenumber" name="749" href="#749">749</a>             <strong class="jxr_keyword">return</strong> f;
+<a class="jxr_linenumber" name="750" href="#750">750</a>         }
+<a class="jxr_linenumber" name="751" href="#751">751</a>     }
+<a class="jxr_linenumber" name="752" href="#752">752</a> 
+<a class="jxr_linenumber" name="753" href="#753">753</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizerTest.html">Basis</a> {
+<a class="jxr_linenumber" name="754" href="#754">754</a>         <strong class="jxr_keyword">double</strong>[][] basis;
+<a class="jxr_linenumber" name="755" href="#755">755</a>         Random rand = <strong class="jxr_keyword">new</strong> Random(2); <em class="jxr_comment">// use not always the same basis</em>
+<a class="jxr_linenumber" name="756" href="#756">756</a> 
+<a class="jxr_linenumber" name="757" href="#757">757</a>         <strong class="jxr_keyword">double</strong>[] Rotate(<strong class="jxr_keyword">double</strong>[] x) {
+<a class="jxr_linenumber" name="758" href="#758">758</a>             GenBasis(x.length);
+<a class="jxr_linenumber" name="759" href="#759">759</a>             <strong class="jxr_keyword">double</strong>[] y = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[x.length];
+<a class="jxr_linenumber" name="760" href="#760">760</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; x.length; ++i) {
+<a class="jxr_linenumber" name="761" href="#761">761</a>                 y[i] = 0;
+<a class="jxr_linenumber" name="762" href="#762">762</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j &lt; x.length; ++j)
+<a class="jxr_linenumber" name="763" href="#763">763</a>                     y[i] += basis[i][j] * x[j];
+<a class="jxr_linenumber" name="764" href="#764">764</a>             }
+<a class="jxr_linenumber" name="765" href="#765">765</a>             <strong class="jxr_keyword">return</strong> y;
+<a class="jxr_linenumber" name="766" href="#766">766</a>         }
+<a class="jxr_linenumber" name="767" href="#767">767</a> 
+<a class="jxr_linenumber" name="768" href="#768">768</a>         <strong class="jxr_keyword">void</strong> GenBasis(<strong class="jxr_keyword">int</strong> DIM) {
+<a class="jxr_linenumber" name="769" href="#769">769</a>             <strong class="jxr_keyword">if</strong> (basis != <strong class="jxr_keyword">null</strong> ? basis.length == DIM : false)
+<a class="jxr_linenumber" name="770" href="#770">770</a>                 <strong class="jxr_keyword">return</strong>;
+<a class="jxr_linenumber" name="771" href="#771">771</a> 
+<a class="jxr_linenumber" name="772" href="#772">772</a>             <strong class="jxr_keyword">double</strong> sp;
+<a class="jxr_linenumber" name="773" href="#773">773</a>             <strong class="jxr_keyword">int</strong> i, j, k;
+<a class="jxr_linenumber" name="774" href="#774">774</a> 
+<a class="jxr_linenumber" name="775" href="#775">775</a>             <em class="jxr_comment">/*<em class="jxr_comment"> generate orthogonal basis */</em></em>
+<a class="jxr_linenumber" name="776" href="#776">776</a>             basis = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[DIM][DIM];
+<a class="jxr_linenumber" name="777" href="#777">777</a>             <strong class="jxr_keyword">for</strong> (i = 0; i &lt; DIM; ++i) {
+<a class="jxr_linenumber" name="778" href="#778">778</a>                 <em class="jxr_comment">/*<em class="jxr_comment"> sample components gaussian */</em></em>
+<a class="jxr_linenumber" name="779" href="#779">779</a>                 <strong class="jxr_keyword">for</strong> (j = 0; j &lt; DIM; ++j)
+<a class="jxr_linenumber" name="780" href="#780">780</a>                     basis[i][j] = rand.nextGaussian();
+<a class="jxr_linenumber" name="781" href="#781">781</a>                 <em class="jxr_comment">/*<em class="jxr_comment"> substract projection of previous vectors */</em></em>
+<a class="jxr_linenumber" name="782" href="#782">782</a>                 <strong class="jxr_keyword">for</strong> (j = i - 1; j &gt;= 0; --j) {
+<a class="jxr_linenumber" name="783" href="#783">783</a>                     <strong class="jxr_keyword">for</strong> (sp = 0., k = 0; k &lt; DIM; ++k)
+<a class="jxr_linenumber" name="784" href="#784">784</a>                         sp += basis[i][k] * basis[j][k]; <em class="jxr_comment">/*<em class="jxr_comment"> scalar product */</em></em>
+<a class="jxr_linenumber" name="785" href="#785">785</a>                     <strong class="jxr_keyword">for</strong> (k = 0; k &lt; DIM; ++k)
+<a class="jxr_linenumber" name="786" href="#786">786</a>                         basis[i][k] -= sp * basis[j][k]; <em class="jxr_comment">/*<em class="jxr_comment"> substract */</em></em>
+<a class="jxr_linenumber" name="787" href="#787">787</a>                 }
+<a class="jxr_linenumber" name="788" href="#788">788</a>                 <em class="jxr_comment">/*<em class="jxr_comment"> normalize */</em></em>
+<a class="jxr_linenumber" name="789" href="#789">789</a>                 <strong class="jxr_keyword">for</strong> (sp = 0., k = 0; k &lt; DIM; ++k)
+<a class="jxr_linenumber" name="790" href="#790">790</a>                     sp += basis[i][k] * basis[i][k]; <em class="jxr_comment">/*<em class="jxr_comment"> squared norm */</em></em>
+<a class="jxr_linenumber" name="791" href="#791">791</a>                 <strong class="jxr_keyword">for</strong> (k = 0; k &lt; DIM; ++k)
+<a class="jxr_linenumber" name="792" href="#792">792</a>                     basis[i][k] /= Math.sqrt(sp);
+<a class="jxr_linenumber" name="793" href="#793">793</a>             }
+<a class="jxr_linenumber" name="794" href="#794">794</a>         }
+<a class="jxr_linenumber" name="795" href="#795">795</a>     }
+<a class="jxr_linenumber" name="796" href="#796">796</a> }
 </pre>
 <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
 </html>



Mime
View raw message