commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [33/51] [partial] commons-complex git commit: Removed "site-content" directory.
Date Fri, 06 Jan 2017 17:10:13 GMT
http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/02/026178c649ae6d4853923a0939d684a9b88caac5.svn-base
----------------------------------------------------------------------
diff --git a/site-content/.svn/pristine/02/026178c649ae6d4853923a0939d684a9b88caac5.svn-base b/site-content/.svn/pristine/02/026178c649ae6d4853923a0939d684a9b88caac5.svn-base
deleted file mode 100644
index 8319cd4..0000000
--- a/site-content/.svn/pristine/02/026178c649ae6d4853923a0939d684a9b88caac5.svn-base
+++ /dev/null
@@ -1,293 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-<title>NelderMeadSimplex xref</title>
-<link type="text/css" rel="stylesheet" href="../../../../../../../../stylesheet.css" />
-</head>
-<body>
-<div id="overview"><a href="../../../../../../../../../apidocs/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/NelderMeadSimplex.html">View Javadoc</a></div><pre>
-<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
-<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
-<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * contributor license agreements.  See the NOTICE file distributed with</em>
-<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em>
-<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em>
-<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em>
-<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * the License.  You may obtain a copy of the License at</em>
-<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> *</em>
-<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em>
-<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *</em>
-<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em>
-<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
-<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
-<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * See the License for the specific language governing permissions and</em>
-<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * limitations under the License.</em>
-<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> */</em>
-<a class="jxr_linenumber" name="L17" href="#L17">17</a>  <strong class="jxr_keyword">package</strong> org.apache.commons.math3.optim.nonlinear.scalar.noderiv;
-<a class="jxr_linenumber" name="L18" href="#L18">18</a>  
-<a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">import</strong> java.util.Comparator;
-<a class="jxr_linenumber" name="L20" href="#L20">20</a>  
-<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.optim.PointValuePair;
-<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.analysis.MultivariateFunction;
-<a class="jxr_linenumber" name="L23" href="#L23">23</a>  
-<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <em class="jxr_javadoccomment"> * This class implements the Nelder-Mead simplex algorithm.</em>
-<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <em class="jxr_javadoccomment"> *</em>
-<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <em class="jxr_javadoccomment"> * @since 3.0</em>
-<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <em class="jxr_javadoccomment"> */</em>
-<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/NelderMeadSimplex.html">NelderMeadSimplex</a> <strong class="jxr_keyword">extends</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/AbstractSimplex.html">AbstractSimplex</a> {
-<a class="jxr_linenumber" name="L30" href="#L30">30</a>      <em class="jxr_javadoccomment">/** Default value for {@link #rho}: {@value}. */</em>
-<a class="jxr_linenumber" name="L31" href="#L31">31</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> DEFAULT_RHO = 1;
-<a class="jxr_linenumber" name="L32" href="#L32">32</a>      <em class="jxr_javadoccomment">/** Default value for {@link #khi}: {@value}. */</em>
-<a class="jxr_linenumber" name="L33" href="#L33">33</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> DEFAULT_KHI = 2;
-<a class="jxr_linenumber" name="L34" href="#L34">34</a>      <em class="jxr_javadoccomment">/** Default value for {@link #gamma}: {@value}. */</em>
-<a class="jxr_linenumber" name="L35" href="#L35">35</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> DEFAULT_GAMMA = 0.5;
-<a class="jxr_linenumber" name="L36" href="#L36">36</a>      <em class="jxr_javadoccomment">/** Default value for {@link #sigma}: {@value}. */</em>
-<a class="jxr_linenumber" name="L37" href="#L37">37</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> DEFAULT_SIGMA = 0.5;
-<a class="jxr_linenumber" name="L38" href="#L38">38</a>      <em class="jxr_javadoccomment">/** Reflection coefficient. */</em>
-<a class="jxr_linenumber" name="L39" href="#L39">39</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> rho;
-<a class="jxr_linenumber" name="L40" href="#L40">40</a>      <em class="jxr_javadoccomment">/** Expansion coefficient. */</em>
-<a class="jxr_linenumber" name="L41" href="#L41">41</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> khi;
-<a class="jxr_linenumber" name="L42" href="#L42">42</a>      <em class="jxr_javadoccomment">/** Contraction coefficient. */</em>
-<a class="jxr_linenumber" name="L43" href="#L43">43</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> gamma;
-<a class="jxr_linenumber" name="L44" href="#L44">44</a>      <em class="jxr_javadoccomment">/** Shrinkage coefficient. */</em>
-<a class="jxr_linenumber" name="L45" href="#L45">45</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> sigma;
-<a class="jxr_linenumber" name="L46" href="#L46">46</a>  
-<a class="jxr_linenumber" name="L47" href="#L47">47</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L48" href="#L48">48</a>  <em class="jxr_javadoccomment">     * Build a Nelder-Mead simplex with default coefficients.</em>
-<a class="jxr_linenumber" name="L49" href="#L49">49</a>  <em class="jxr_javadoccomment">     * The default coefficients are 1.0 for rho, 2.0 for khi and 0.5</em>
-<a class="jxr_linenumber" name="L50" href="#L50">50</a>  <em class="jxr_javadoccomment">     * for both gamma and sigma.</em>
-<a class="jxr_linenumber" name="L51" href="#L51">51</a>  <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L52" href="#L52">52</a>  <em class="jxr_javadoccomment">     * @param n Dimension of the simplex.</em>
-<a class="jxr_linenumber" name="L53" href="#L53">53</a>  <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L54" href="#L54">54</a>      <strong class="jxr_keyword">public</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/NelderMeadSimplex.html">NelderMeadSimplex</a>(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> n) {
-<a class="jxr_linenumber" name="L55" href="#L55">55</a>          <strong class="jxr_keyword">this</strong>(n, 1d);
-<a class="jxr_linenumber" name="L56" href="#L56">56</a>      }
-<a class="jxr_linenumber" name="L57" href="#L57">57</a>  
-<a class="jxr_linenumber" name="L58" href="#L58">58</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L59" href="#L59">59</a>  <em class="jxr_javadoccomment">     * Build a Nelder-Mead simplex with default coefficients.</em>
-<a class="jxr_linenumber" name="L60" href="#L60">60</a>  <em class="jxr_javadoccomment">     * The default coefficients are 1.0 for rho, 2.0 for khi and 0.5</em>
-<a class="jxr_linenumber" name="L61" href="#L61">61</a>  <em class="jxr_javadoccomment">     * for both gamma and sigma.</em>
-<a class="jxr_linenumber" name="L62" href="#L62">62</a>  <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L63" href="#L63">63</a>  <em class="jxr_javadoccomment">     * @param n Dimension of the simplex.</em>
-<a class="jxr_linenumber" name="L64" href="#L64">64</a>  <em class="jxr_javadoccomment">     * @param sideLength Length of the sides of the default (hypercube)</em>
-<a class="jxr_linenumber" name="L65" href="#L65">65</a>  <em class="jxr_javadoccomment">     * simplex. See {@link AbstractSimplex#AbstractSimplex(int,double)}.</em>
-<a class="jxr_linenumber" name="L66" href="#L66">66</a>  <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L67" href="#L67">67</a>      <strong class="jxr_keyword">public</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/NelderMeadSimplex.html">NelderMeadSimplex</a>(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> n, <strong class="jxr_keyword">double</strong> sideLength) {
-<a class="jxr_linenumber" name="L68" href="#L68">68</a>          <strong class="jxr_keyword">this</strong>(n, sideLength,
-<a class="jxr_linenumber" name="L69" href="#L69">69</a>               DEFAULT_RHO, DEFAULT_KHI, DEFAULT_GAMMA, DEFAULT_SIGMA);
-<a class="jxr_linenumber" name="L70" href="#L70">70</a>      }
-<a class="jxr_linenumber" name="L71" href="#L71">71</a>  
-<a class="jxr_linenumber" name="L72" href="#L72">72</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L73" href="#L73">73</a>  <em class="jxr_javadoccomment">     * Build a Nelder-Mead simplex with specified coefficients.</em>
-<a class="jxr_linenumber" name="L74" href="#L74">74</a>  <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L75" href="#L75">75</a>  <em class="jxr_javadoccomment">     * @param n Dimension of the simplex. See</em>
-<a class="jxr_linenumber" name="L76" href="#L76">76</a>  <em class="jxr_javadoccomment">     * {@link AbstractSimplex#AbstractSimplex(int,double)}.</em>
-<a class="jxr_linenumber" name="L77" href="#L77">77</a>  <em class="jxr_javadoccomment">     * @param sideLength Length of the sides of the default (hypercube)</em>
-<a class="jxr_linenumber" name="L78" href="#L78">78</a>  <em class="jxr_javadoccomment">     * simplex. See {@link AbstractSimplex#AbstractSimplex(int,double)}.</em>
-<a class="jxr_linenumber" name="L79" href="#L79">79</a>  <em class="jxr_javadoccomment">     * @param rho Reflection coefficient.</em>
-<a class="jxr_linenumber" name="L80" href="#L80">80</a>  <em class="jxr_javadoccomment">     * @param khi Expansion coefficient.</em>
-<a class="jxr_linenumber" name="L81" href="#L81">81</a>  <em class="jxr_javadoccomment">     * @param gamma Contraction coefficient.</em>
-<a class="jxr_linenumber" name="L82" href="#L82">82</a>  <em class="jxr_javadoccomment">     * @param sigma Shrinkage coefficient.</em>
-<a class="jxr_linenumber" name="L83" href="#L83">83</a>  <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L84" href="#L84">84</a>      <strong class="jxr_keyword">public</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/NelderMeadSimplex.html">NelderMeadSimplex</a>(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> n, <strong class="jxr_keyword">double</strong> sideLength,
-<a class="jxr_linenumber" name="L85" href="#L85">85</a>                               <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> rho, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> khi,
-<a class="jxr_linenumber" name="L86" href="#L86">86</a>                               <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> gamma, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> sigma) {
-<a class="jxr_linenumber" name="L87" href="#L87">87</a>          <strong class="jxr_keyword">super</strong>(n, sideLength);
-<a class="jxr_linenumber" name="L88" href="#L88">88</a>  
-<a class="jxr_linenumber" name="L89" href="#L89">89</a>          <strong class="jxr_keyword">this</strong>.rho = rho;
-<a class="jxr_linenumber" name="L90" href="#L90">90</a>          <strong class="jxr_keyword">this</strong>.khi = khi;
-<a class="jxr_linenumber" name="L91" href="#L91">91</a>          <strong class="jxr_keyword">this</strong>.gamma = gamma;
-<a class="jxr_linenumber" name="L92" href="#L92">92</a>          <strong class="jxr_keyword">this</strong>.sigma = sigma;
-<a class="jxr_linenumber" name="L93" href="#L93">93</a>      }
-<a class="jxr_linenumber" name="L94" href="#L94">94</a>  
-<a class="jxr_linenumber" name="L95" href="#L95">95</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L96" href="#L96">96</a>  <em class="jxr_javadoccomment">     * Build a Nelder-Mead simplex with specified coefficients.</em>
-<a class="jxr_linenumber" name="L97" href="#L97">97</a>  <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L98" href="#L98">98</a>  <em class="jxr_javadoccomment">     * @param n Dimension of the simplex. See</em>
-<a class="jxr_linenumber" name="L99" href="#L99">99</a>  <em class="jxr_javadoccomment">     * {@link AbstractSimplex#AbstractSimplex(int)}.</em>
-<a class="jxr_linenumber" name="L100" href="#L100">100</a> <em class="jxr_javadoccomment">     * @param rho Reflection coefficient.</em>
-<a class="jxr_linenumber" name="L101" href="#L101">101</a> <em class="jxr_javadoccomment">     * @param khi Expansion coefficient.</em>
-<a class="jxr_linenumber" name="L102" href="#L102">102</a> <em class="jxr_javadoccomment">     * @param gamma Contraction coefficient.</em>
-<a class="jxr_linenumber" name="L103" href="#L103">103</a> <em class="jxr_javadoccomment">     * @param sigma Shrinkage coefficient.</em>
-<a class="jxr_linenumber" name="L104" href="#L104">104</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L105" href="#L105">105</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/NelderMeadSimplex.html">NelderMeadSimplex</a>(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> n,
-<a class="jxr_linenumber" name="L106" href="#L106">106</a>                              <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> rho, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> khi,
-<a class="jxr_linenumber" name="L107" href="#L107">107</a>                              <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> gamma, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> sigma) {
-<a class="jxr_linenumber" name="L108" href="#L108">108</a>         <strong class="jxr_keyword">this</strong>(n, 1d, rho, khi, gamma, sigma);
-<a class="jxr_linenumber" name="L109" href="#L109">109</a>     }
-<a class="jxr_linenumber" name="L110" href="#L110">110</a> 
-<a class="jxr_linenumber" name="L111" href="#L111">111</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L112" href="#L112">112</a> <em class="jxr_javadoccomment">     * Build a Nelder-Mead simplex with default coefficients.</em>
-<a class="jxr_linenumber" name="L113" href="#L113">113</a> <em class="jxr_javadoccomment">     * The default coefficients are 1.0 for rho, 2.0 for khi and 0.5</em>
-<a class="jxr_linenumber" name="L114" href="#L114">114</a> <em class="jxr_javadoccomment">     * for both gamma and sigma.</em>
-<a class="jxr_linenumber" name="L115" href="#L115">115</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L116" href="#L116">116</a> <em class="jxr_javadoccomment">     * @param steps Steps along the canonical axes representing box edges.</em>
-<a class="jxr_linenumber" name="L117" href="#L117">117</a> <em class="jxr_javadoccomment">     * They may be negative but not zero. See</em>
-<a class="jxr_linenumber" name="L118" href="#L118">118</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L119" href="#L119">119</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/NelderMeadSimplex.html">NelderMeadSimplex</a>(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] steps) {
-<a class="jxr_linenumber" name="L120" href="#L120">120</a>         <strong class="jxr_keyword">this</strong>(steps, DEFAULT_RHO, DEFAULT_KHI, DEFAULT_GAMMA, DEFAULT_SIGMA);
-<a class="jxr_linenumber" name="L121" href="#L121">121</a>     }
-<a class="jxr_linenumber" name="L122" href="#L122">122</a> 
-<a class="jxr_linenumber" name="L123" href="#L123">123</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L124" href="#L124">124</a> <em class="jxr_javadoccomment">     * Build a Nelder-Mead simplex with specified coefficients.</em>
-<a class="jxr_linenumber" name="L125" href="#L125">125</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L126" href="#L126">126</a> <em class="jxr_javadoccomment">     * @param steps Steps along the canonical axes representing box edges.</em>
-<a class="jxr_linenumber" name="L127" href="#L127">127</a> <em class="jxr_javadoccomment">     * They may be negative but not zero. See</em>
-<a class="jxr_linenumber" name="L128" href="#L128">128</a> <em class="jxr_javadoccomment">     * {@link AbstractSimplex#AbstractSimplex(double[])}.</em>
-<a class="jxr_linenumber" name="L129" href="#L129">129</a> <em class="jxr_javadoccomment">     * @param rho Reflection coefficient.</em>
-<a class="jxr_linenumber" name="L130" href="#L130">130</a> <em class="jxr_javadoccomment">     * @param khi Expansion coefficient.</em>
-<a class="jxr_linenumber" name="L131" href="#L131">131</a> <em class="jxr_javadoccomment">     * @param gamma Contraction coefficient.</em>
-<a class="jxr_linenumber" name="L132" href="#L132">132</a> <em class="jxr_javadoccomment">     * @param sigma Shrinkage coefficient.</em>
-<a class="jxr_linenumber" name="L133" href="#L133">133</a> <em class="jxr_javadoccomment">     * @throws IllegalArgumentException if one of the steps is zero.</em>
-<a class="jxr_linenumber" name="L134" href="#L134">134</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L135" href="#L135">135</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/NelderMeadSimplex.html">NelderMeadSimplex</a>(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] steps,
-<a class="jxr_linenumber" name="L136" href="#L136">136</a>                              <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> rho, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> khi,
-<a class="jxr_linenumber" name="L137" href="#L137">137</a>                              <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> gamma, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> sigma) {
-<a class="jxr_linenumber" name="L138" href="#L138">138</a>         <strong class="jxr_keyword">super</strong>(steps);
-<a class="jxr_linenumber" name="L139" href="#L139">139</a> 
-<a class="jxr_linenumber" name="L140" href="#L140">140</a>         <strong class="jxr_keyword">this</strong>.rho = rho;
-<a class="jxr_linenumber" name="L141" href="#L141">141</a>         <strong class="jxr_keyword">this</strong>.khi = khi;
-<a class="jxr_linenumber" name="L142" href="#L142">142</a>         <strong class="jxr_keyword">this</strong>.gamma = gamma;
-<a class="jxr_linenumber" name="L143" href="#L143">143</a>         <strong class="jxr_keyword">this</strong>.sigma = sigma;
-<a class="jxr_linenumber" name="L144" href="#L144">144</a>     }
-<a class="jxr_linenumber" name="L145" href="#L145">145</a> 
-<a class="jxr_linenumber" name="L146" href="#L146">146</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L147" href="#L147">147</a> <em class="jxr_javadoccomment">     * Build a Nelder-Mead simplex with default coefficients.</em>
-<a class="jxr_linenumber" name="L148" href="#L148">148</a> <em class="jxr_javadoccomment">     * The default coefficients are 1.0 for rho, 2.0 for khi and 0.5</em>
-<a class="jxr_linenumber" name="L149" href="#L149">149</a> <em class="jxr_javadoccomment">     * for both gamma and sigma.</em>
-<a class="jxr_linenumber" name="L150" href="#L150">150</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L151" href="#L151">151</a> <em class="jxr_javadoccomment">     * @param referenceSimplex Reference simplex. See</em>
-<a class="jxr_linenumber" name="L152" href="#L152">152</a> <em class="jxr_javadoccomment">     * {@link AbstractSimplex#AbstractSimplex(double[][])}.</em>
-<a class="jxr_linenumber" name="L153" href="#L153">153</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L154" href="#L154">154</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/NelderMeadSimplex.html">NelderMeadSimplex</a>(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[][] referenceSimplex) {
-<a class="jxr_linenumber" name="L155" href="#L155">155</a>         <strong class="jxr_keyword">this</strong>(referenceSimplex, DEFAULT_RHO, DEFAULT_KHI, DEFAULT_GAMMA, DEFAULT_SIGMA);
-<a class="jxr_linenumber" name="L156" href="#L156">156</a>     }
-<a class="jxr_linenumber" name="L157" href="#L157">157</a> 
-<a class="jxr_linenumber" name="L158" href="#L158">158</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L159" href="#L159">159</a> <em class="jxr_javadoccomment">     * Build a Nelder-Mead simplex with specified coefficients.</em>
-<a class="jxr_linenumber" name="L160" href="#L160">160</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L161" href="#L161">161</a> <em class="jxr_javadoccomment">     * @param referenceSimplex Reference simplex. See</em>
-<a class="jxr_linenumber" name="L162" href="#L162">162</a> <em class="jxr_javadoccomment">     * {@link AbstractSimplex#AbstractSimplex(double[][])}.</em>
-<a class="jxr_linenumber" name="L163" href="#L163">163</a> <em class="jxr_javadoccomment">     * @param rho Reflection coefficient.</em>
-<a class="jxr_linenumber" name="L164" href="#L164">164</a> <em class="jxr_javadoccomment">     * @param khi Expansion coefficient.</em>
-<a class="jxr_linenumber" name="L165" href="#L165">165</a> <em class="jxr_javadoccomment">     * @param gamma Contraction coefficient.</em>
-<a class="jxr_linenumber" name="L166" href="#L166">166</a> <em class="jxr_javadoccomment">     * @param sigma Shrinkage coefficient.</em>
-<a class="jxr_linenumber" name="L167" href="#L167">167</a> <em class="jxr_javadoccomment">     * @throws org.apache.commons.math3.exception.NotStrictlyPositiveException</em>
-<a class="jxr_linenumber" name="L168" href="#L168">168</a> <em class="jxr_javadoccomment">     * if the reference simplex does not contain at least one point.</em>
-<a class="jxr_linenumber" name="L169" href="#L169">169</a> <em class="jxr_javadoccomment">     * @throws org.apache.commons.math3.exception.DimensionMismatchException</em>
-<a class="jxr_linenumber" name="L170" href="#L170">170</a> <em class="jxr_javadoccomment">     * if there is a dimension mismatch in the reference simplex.</em>
-<a class="jxr_linenumber" name="L171" href="#L171">171</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L172" href="#L172">172</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/nonlinear/scalar/noderiv/NelderMeadSimplex.html">NelderMeadSimplex</a>(<strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[][] referenceSimplex,
-<a class="jxr_linenumber" name="L173" href="#L173">173</a>                              <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> rho, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> khi,
-<a class="jxr_linenumber" name="L174" href="#L174">174</a>                              <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> gamma, <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> sigma) {
-<a class="jxr_linenumber" name="L175" href="#L175">175</a>         <strong class="jxr_keyword">super</strong>(referenceSimplex);
-<a class="jxr_linenumber" name="L176" href="#L176">176</a> 
-<a class="jxr_linenumber" name="L177" href="#L177">177</a>         <strong class="jxr_keyword">this</strong>.rho = rho;
-<a class="jxr_linenumber" name="L178" href="#L178">178</a>         <strong class="jxr_keyword">this</strong>.khi = khi;
-<a class="jxr_linenumber" name="L179" href="#L179">179</a>         <strong class="jxr_keyword">this</strong>.gamma = gamma;
-<a class="jxr_linenumber" name="L180" href="#L180">180</a>         <strong class="jxr_keyword">this</strong>.sigma = sigma;
-<a class="jxr_linenumber" name="L181" href="#L181">181</a>     }
-<a class="jxr_linenumber" name="L182" href="#L182">182</a> 
-<a class="jxr_linenumber" name="L183" href="#L183">183</a>     <em class="jxr_javadoccomment">/** {@inheritDoc} */</em>
-<a class="jxr_linenumber" name="L184" href="#L184">184</a>     @Override
-<a class="jxr_linenumber" name="L185" href="#L185">185</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> iterate(<strong class="jxr_keyword">final</strong> <a href="../../../../../../../../org/apache/commons/math3/analysis/MultivariateFunction.html">MultivariateFunction</a> evaluationFunction,
-<a class="jxr_linenumber" name="L186" href="#L186">186</a>                         <strong class="jxr_keyword">final</strong> Comparator&lt;PointValuePair&gt; comparator) {
-<a class="jxr_linenumber" name="L187" href="#L187">187</a>         <em class="jxr_comment">// The simplex has n + 1 points if dimension is n.</em>
-<a class="jxr_linenumber" name="L188" href="#L188">188</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> n = getDimension();
-<a class="jxr_linenumber" name="L189" href="#L189">189</a> 
-<a class="jxr_linenumber" name="L190" href="#L190">190</a>         <em class="jxr_comment">// Interesting values.</em>
-<a class="jxr_linenumber" name="L191" href="#L191">191</a>         <strong class="jxr_keyword">final</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a> best = getPoint(0);
-<a class="jxr_linenumber" name="L192" href="#L192">192</a>         <strong class="jxr_keyword">final</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a> secondBest = getPoint(n - 1);
-<a class="jxr_linenumber" name="L193" href="#L193">193</a>         <strong class="jxr_keyword">final</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a> worst = getPoint(n);
-<a class="jxr_linenumber" name="L194" href="#L194">194</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] xWorst = worst.getPointRef();
-<a class="jxr_linenumber" name="L195" href="#L195">195</a> 
-<a class="jxr_linenumber" name="L196" href="#L196">196</a>         <em class="jxr_comment">// Compute the centroid of the best vertices (dismissing the worst</em>
-<a class="jxr_linenumber" name="L197" href="#L197">197</a>         <em class="jxr_comment">// point at index n).</em>
-<a class="jxr_linenumber" name="L198" href="#L198">198</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] centroid = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[n];
-<a class="jxr_linenumber" name="L199" href="#L199">199</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; n; i++) {
-<a class="jxr_linenumber" name="L200" href="#L200">200</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] x = getPoint(i).getPointRef();
-<a class="jxr_linenumber" name="L201" href="#L201">201</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j &lt; n; j++) {
-<a class="jxr_linenumber" name="L202" href="#L202">202</a>                 centroid[j] += x[j];
-<a class="jxr_linenumber" name="L203" href="#L203">203</a>             }
-<a class="jxr_linenumber" name="L204" href="#L204">204</a>         }
-<a class="jxr_linenumber" name="L205" href="#L205">205</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> scaling = 1.0 / n;
-<a class="jxr_linenumber" name="L206" href="#L206">206</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j &lt; n; j++) {
-<a class="jxr_linenumber" name="L207" href="#L207">207</a>             centroid[j] *= scaling;
-<a class="jxr_linenumber" name="L208" href="#L208">208</a>         }
-<a class="jxr_linenumber" name="L209" href="#L209">209</a> 
-<a class="jxr_linenumber" name="L210" href="#L210">210</a>         <em class="jxr_comment">// compute the reflection point</em>
-<a class="jxr_linenumber" name="L211" href="#L211">211</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] xR = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[n];
-<a class="jxr_linenumber" name="L212" href="#L212">212</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j &lt; n; j++) {
-<a class="jxr_linenumber" name="L213" href="#L213">213</a>             xR[j] = centroid[j] + rho * (centroid[j] - xWorst[j]);
-<a class="jxr_linenumber" name="L214" href="#L214">214</a>         }
-<a class="jxr_linenumber" name="L215" href="#L215">215</a>         <strong class="jxr_keyword">final</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a> reflected
-<a class="jxr_linenumber" name="L216" href="#L216">216</a>             = <strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a>(xR, evaluationFunction.value(xR), false);
-<a class="jxr_linenumber" name="L217" href="#L217">217</a> 
-<a class="jxr_linenumber" name="L218" href="#L218">218</a>         <strong class="jxr_keyword">if</strong> (comparator.compare(best, reflected) &lt;= 0 &amp;&amp;
-<a class="jxr_linenumber" name="L219" href="#L219">219</a>             comparator.compare(reflected, secondBest) &lt; 0) {
-<a class="jxr_linenumber" name="L220" href="#L220">220</a>             <em class="jxr_comment">// Accept the reflected point.</em>
-<a class="jxr_linenumber" name="L221" href="#L221">221</a>             replaceWorstPoint(reflected, comparator);
-<a class="jxr_linenumber" name="L222" href="#L222">222</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (comparator.compare(reflected, best) &lt; 0) {
-<a class="jxr_linenumber" name="L223" href="#L223">223</a>             <em class="jxr_comment">// Compute the expansion point.</em>
-<a class="jxr_linenumber" name="L224" href="#L224">224</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] xE = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[n];
-<a class="jxr_linenumber" name="L225" href="#L225">225</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j &lt; n; j++) {
-<a class="jxr_linenumber" name="L226" href="#L226">226</a>                 xE[j] = centroid[j] + khi * (xR[j] - centroid[j]);
-<a class="jxr_linenumber" name="L227" href="#L227">227</a>             }
-<a class="jxr_linenumber" name="L228" href="#L228">228</a>             <strong class="jxr_keyword">final</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a> expanded
-<a class="jxr_linenumber" name="L229" href="#L229">229</a>                 = <strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a>(xE, evaluationFunction.value(xE), false);
-<a class="jxr_linenumber" name="L230" href="#L230">230</a> 
-<a class="jxr_linenumber" name="L231" href="#L231">231</a>             <strong class="jxr_keyword">if</strong> (comparator.compare(expanded, reflected) &lt; 0) {
-<a class="jxr_linenumber" name="L232" href="#L232">232</a>                 <em class="jxr_comment">// Accept the expansion point.</em>
-<a class="jxr_linenumber" name="L233" href="#L233">233</a>                 replaceWorstPoint(expanded, comparator);
-<a class="jxr_linenumber" name="L234" href="#L234">234</a>             } <strong class="jxr_keyword">else</strong> {
-<a class="jxr_linenumber" name="L235" href="#L235">235</a>                 <em class="jxr_comment">// Accept the reflected point.</em>
-<a class="jxr_linenumber" name="L236" href="#L236">236</a>                 replaceWorstPoint(reflected, comparator);
-<a class="jxr_linenumber" name="L237" href="#L237">237</a>             }
-<a class="jxr_linenumber" name="L238" href="#L238">238</a>         } <strong class="jxr_keyword">else</strong> {
-<a class="jxr_linenumber" name="L239" href="#L239">239</a>             <strong class="jxr_keyword">if</strong> (comparator.compare(reflected, worst) &lt; 0) {
-<a class="jxr_linenumber" name="L240" href="#L240">240</a>                 <em class="jxr_comment">// Perform an outside contraction.</em>
-<a class="jxr_linenumber" name="L241" href="#L241">241</a>                 <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] xC = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[n];
-<a class="jxr_linenumber" name="L242" href="#L242">242</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j &lt; n; j++) {
-<a class="jxr_linenumber" name="L243" href="#L243">243</a>                     xC[j] = centroid[j] + gamma * (xR[j] - centroid[j]);
-<a class="jxr_linenumber" name="L244" href="#L244">244</a>                 }
-<a class="jxr_linenumber" name="L245" href="#L245">245</a>                 <strong class="jxr_keyword">final</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a> outContracted
-<a class="jxr_linenumber" name="L246" href="#L246">246</a>                     = <strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a>(xC, evaluationFunction.value(xC), false);
-<a class="jxr_linenumber" name="L247" href="#L247">247</a>                 <strong class="jxr_keyword">if</strong> (comparator.compare(outContracted, reflected) &lt;= 0) {
-<a class="jxr_linenumber" name="L248" href="#L248">248</a>                     <em class="jxr_comment">// Accept the contraction point.</em>
-<a class="jxr_linenumber" name="L249" href="#L249">249</a>                     replaceWorstPoint(outContracted, comparator);
-<a class="jxr_linenumber" name="L250" href="#L250">250</a>                     <strong class="jxr_keyword">return</strong>;
-<a class="jxr_linenumber" name="L251" href="#L251">251</a>                 }
-<a class="jxr_linenumber" name="L252" href="#L252">252</a>             } <strong class="jxr_keyword">else</strong> {
-<a class="jxr_linenumber" name="L253" href="#L253">253</a>                 <em class="jxr_comment">// Perform an inside contraction.</em>
-<a class="jxr_linenumber" name="L254" href="#L254">254</a>                 <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] xC = <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[n];
-<a class="jxr_linenumber" name="L255" href="#L255">255</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j &lt; n; j++) {
-<a class="jxr_linenumber" name="L256" href="#L256">256</a>                     xC[j] = centroid[j] - gamma * (centroid[j] - xWorst[j]);
-<a class="jxr_linenumber" name="L257" href="#L257">257</a>                 }
-<a class="jxr_linenumber" name="L258" href="#L258">258</a>                 <strong class="jxr_keyword">final</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a> inContracted
-<a class="jxr_linenumber" name="L259" href="#L259">259</a>                     = <strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a>(xC, evaluationFunction.value(xC), false);
-<a class="jxr_linenumber" name="L260" href="#L260">260</a> 
-<a class="jxr_linenumber" name="L261" href="#L261">261</a>                 <strong class="jxr_keyword">if</strong> (comparator.compare(inContracted, worst) &lt; 0) {
-<a class="jxr_linenumber" name="L262" href="#L262">262</a>                     <em class="jxr_comment">// Accept the contraction point.</em>
-<a class="jxr_linenumber" name="L263" href="#L263">263</a>                     replaceWorstPoint(inContracted, comparator);
-<a class="jxr_linenumber" name="L264" href="#L264">264</a>                     <strong class="jxr_keyword">return</strong>;
-<a class="jxr_linenumber" name="L265" href="#L265">265</a>                 }
-<a class="jxr_linenumber" name="L266" href="#L266">266</a>             }
-<a class="jxr_linenumber" name="L267" href="#L267">267</a> 
-<a class="jxr_linenumber" name="L268" href="#L268">268</a>             <em class="jxr_comment">// Perform a shrink.</em>
-<a class="jxr_linenumber" name="L269" href="#L269">269</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] xSmallest = getPoint(0).getPointRef();
-<a class="jxr_linenumber" name="L270" href="#L270">270</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 1; i &lt;= n; i++) {
-<a class="jxr_linenumber" name="L271" href="#L271">271</a>                 <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong>[] x = getPoint(i).getPoint();
-<a class="jxr_linenumber" name="L272" href="#L272">272</a>                 <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j &lt; n; j++) {
-<a class="jxr_linenumber" name="L273" href="#L273">273</a>                     x[j] = xSmallest[j] + sigma * (x[j] - xSmallest[j]);
-<a class="jxr_linenumber" name="L274" href="#L274">274</a>                 }
-<a class="jxr_linenumber" name="L275" href="#L275">275</a>                 setPoint(i, <strong class="jxr_keyword">new</strong> <a href="../../../../../../../../org/apache/commons/math3/optim/PointValuePair.html">PointValuePair</a>(x, Double.NaN, false));
-<a class="jxr_linenumber" name="L276" href="#L276">276</a>             }
-<a class="jxr_linenumber" name="L277" href="#L277">277</a>             evaluate(evaluationFunction, comparator);
-<a class="jxr_linenumber" name="L278" href="#L278">278</a>         }
-<a class="jxr_linenumber" name="L279" href="#L279">279</a>     }
-<a class="jxr_linenumber" name="L280" href="#L280">280</a> }
-</pre>
-<hr/>
-<div id="footer">Copyright &#169; 2003&#x2013;2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/02/0263fb0d61e2be261b279731f72958825c748d1d.svn-base
----------------------------------------------------------------------
diff --git a/site-content/.svn/pristine/02/0263fb0d61e2be261b279731f72958825c748d1d.svn-base b/site-content/.svn/pristine/02/0263fb0d61e2be261b279731f72958825c748d1d.svn-base
deleted file mode 100644
index 3a4e356..0000000
Binary files a/site-content/.svn/pristine/02/0263fb0d61e2be261b279731f72958825c748d1d.svn-base and /dev/null differ

http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/02/026c4868f5e04189f318672cc67485ce9af9333d.svn-base
----------------------------------------------------------------------
diff --git a/site-content/.svn/pristine/02/026c4868f5e04189f318672cc67485ce9af9333d.svn-base b/site-content/.svn/pristine/02/026c4868f5e04189f318672cc67485ce9af9333d.svn-base
deleted file mode 100644
index 55694b9..0000000
--- a/site-content/.svn/pristine/02/026c4868f5e04189f318672cc67485ce9af9333d.svn-base
+++ /dev/null
@@ -1,279 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-<title>SimplexOptimizerNelderMeadTest xref</title>
-<link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
-</head>
-<body>
-<div id="overview"><a href="../../../../../../../testapidocs/org/apache/commons/math3/optimization/direct/SimplexOptimizerNelderMeadTest.html">View Javadoc</a></div><pre>
-<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
-<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
-<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * contributor license agreements.  See the NOTICE file distributed with</em>
-<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em>
-<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em>
-<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em>
-<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * the License.  You may obtain a copy of the License at</em>
-<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> *</em>
-<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em>
-<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *</em>
-<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em>
-<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
-<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
-<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * See the License for the specific language governing permissions and</em>
-<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * limitations under the License.</em>
-<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> */</em>
-<a class="jxr_linenumber" name="L17" href="#L17">17</a>  
-<a class="jxr_linenumber" name="L18" href="#L18">18</a>  <strong class="jxr_keyword">package</strong> org.apache.commons.math3.optimization.direct;
-<a class="jxr_linenumber" name="L19" href="#L19">19</a>  
-<a class="jxr_linenumber" name="L20" href="#L20">20</a>  
-<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.exception.TooManyEvaluationsException;
-<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.analysis.MultivariateFunction;
-<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.analysis.MultivariateVectorFunction;
-<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.linear.Array2DRowRealMatrix;
-<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.linear.RealMatrix;
-<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.optimization.GoalType;
-<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.optimization.LeastSquaresConverter;
-<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.optimization.PointValuePair;
-<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.util.FastMath;
-<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <strong class="jxr_keyword">import</strong> org.junit.Assert;
-<a class="jxr_linenumber" name="L31" href="#L31">31</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
-<a class="jxr_linenumber" name="L32" href="#L32">32</a>  
-<a class="jxr_linenumber" name="L33" href="#L33">33</a>  @Deprecated
-<a class="jxr_linenumber" name="L34" href="#L34">34</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerNelderMeadTest.html">SimplexOptimizerNelderMeadTest</a> {
-<a class="jxr_linenumber" name="L35" href="#L35">35</a>      @Test
-<a class="jxr_linenumber" name="L36" href="#L36">36</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testMinimize1() {
-<a class="jxr_linenumber" name="L37" href="#L37">37</a>          SimplexOptimizer optimizer = <strong class="jxr_keyword">new</strong> SimplexOptimizer(1e-10, 1e-30);
-<a class="jxr_linenumber" name="L38" href="#L38">38</a>          optimizer.setSimplex(<strong class="jxr_keyword">new</strong> NelderMeadSimplex(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 0.2, 0.2 }));
-<a class="jxr_linenumber" name="L39" href="#L39">39</a>          <strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerMultiDirectionalTest.html">FourExtrema</a> fourExtrema = <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerMultiDirectionalTest.html">FourExtrema</a>();
-<a class="jxr_linenumber" name="L40" href="#L40">40</a>  
-<a class="jxr_linenumber" name="L41" href="#L41">41</a>          <strong class="jxr_keyword">final</strong> PointValuePair optimum
-<a class="jxr_linenumber" name="L42" href="#L42">42</a>              = optimizer.optimize(100, fourExtrema, GoalType.MINIMIZE, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { -3, 0 });
-<a class="jxr_linenumber" name="L43" href="#L43">43</a>          Assert.assertEquals(fourExtrema.xM, optimum.getPoint()[0], 2e-7);
-<a class="jxr_linenumber" name="L44" href="#L44">44</a>          Assert.assertEquals(fourExtrema.yP, optimum.getPoint()[1], 2e-5);
-<a class="jxr_linenumber" name="L45" href="#L45">45</a>          Assert.assertEquals(fourExtrema.valueXmYp, optimum.getValue(), 6e-12);
-<a class="jxr_linenumber" name="L46" href="#L46">46</a>          Assert.assertTrue(optimizer.getEvaluations() &gt; 60);
-<a class="jxr_linenumber" name="L47" href="#L47">47</a>          Assert.assertTrue(optimizer.getEvaluations() &lt; 90);
-<a class="jxr_linenumber" name="L48" href="#L48">48</a>      }
-<a class="jxr_linenumber" name="L49" href="#L49">49</a>  
-<a class="jxr_linenumber" name="L50" href="#L50">50</a>      @Test
-<a class="jxr_linenumber" name="L51" href="#L51">51</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testMinimize2() {
-<a class="jxr_linenumber" name="L52" href="#L52">52</a>          SimplexOptimizer optimizer = <strong class="jxr_keyword">new</strong> SimplexOptimizer(1e-10, 1e-30);
-<a class="jxr_linenumber" name="L53" href="#L53">53</a>          optimizer.setSimplex(<strong class="jxr_keyword">new</strong> NelderMeadSimplex(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 0.2, 0.2 }));
-<a class="jxr_linenumber" name="L54" href="#L54">54</a>          <strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerMultiDirectionalTest.html">FourExtrema</a> fourExtrema = <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerMultiDirectionalTest.html">FourExtrema</a>();
-<a class="jxr_linenumber" name="L55" href="#L55">55</a>  
-<a class="jxr_linenumber" name="L56" href="#L56">56</a>          <strong class="jxr_keyword">final</strong> PointValuePair optimum
-<a class="jxr_linenumber" name="L57" href="#L57">57</a>              = optimizer.optimize(100, fourExtrema, GoalType.MINIMIZE, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 1, 0 });
-<a class="jxr_linenumber" name="L58" href="#L58">58</a>          Assert.assertEquals(fourExtrema.xP, optimum.getPoint()[0], 5e-6);
-<a class="jxr_linenumber" name="L59" href="#L59">59</a>          Assert.assertEquals(fourExtrema.yM, optimum.getPoint()[1], 6e-6);
-<a class="jxr_linenumber" name="L60" href="#L60">60</a>          Assert.assertEquals(fourExtrema.valueXpYm, optimum.getValue(), 1e-11);
-<a class="jxr_linenumber" name="L61" href="#L61">61</a>          Assert.assertTrue(optimizer.getEvaluations() &gt; 60);
-<a class="jxr_linenumber" name="L62" href="#L62">62</a>          Assert.assertTrue(optimizer.getEvaluations() &lt; 90);
-<a class="jxr_linenumber" name="L63" href="#L63">63</a>      }
-<a class="jxr_linenumber" name="L64" href="#L64">64</a>  
-<a class="jxr_linenumber" name="L65" href="#L65">65</a>      @Test
-<a class="jxr_linenumber" name="L66" href="#L66">66</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testMaximize1() {
-<a class="jxr_linenumber" name="L67" href="#L67">67</a>          SimplexOptimizer optimizer = <strong class="jxr_keyword">new</strong> SimplexOptimizer(1e-10, 1e-30);
-<a class="jxr_linenumber" name="L68" href="#L68">68</a>          optimizer.setSimplex(<strong class="jxr_keyword">new</strong> NelderMeadSimplex(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 0.2, 0.2 }));
-<a class="jxr_linenumber" name="L69" href="#L69">69</a>          <strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerMultiDirectionalTest.html">FourExtrema</a> fourExtrema = <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerMultiDirectionalTest.html">FourExtrema</a>();
-<a class="jxr_linenumber" name="L70" href="#L70">70</a>  
-<a class="jxr_linenumber" name="L71" href="#L71">71</a>          <strong class="jxr_keyword">final</strong> PointValuePair optimum
-<a class="jxr_linenumber" name="L72" href="#L72">72</a>              = optimizer.optimize(100, fourExtrema, GoalType.MAXIMIZE, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { -3, 0 });
-<a class="jxr_linenumber" name="L73" href="#L73">73</a>          Assert.assertEquals(fourExtrema.xM, optimum.getPoint()[0], 1e-5);
-<a class="jxr_linenumber" name="L74" href="#L74">74</a>          Assert.assertEquals(fourExtrema.yM, optimum.getPoint()[1], 3e-6);
-<a class="jxr_linenumber" name="L75" href="#L75">75</a>          Assert.assertEquals(fourExtrema.valueXmYm, optimum.getValue(), 3e-12);
-<a class="jxr_linenumber" name="L76" href="#L76">76</a>          Assert.assertTrue(optimizer.getEvaluations() &gt; 60);
-<a class="jxr_linenumber" name="L77" href="#L77">77</a>          Assert.assertTrue(optimizer.getEvaluations() &lt; 90);
-<a class="jxr_linenumber" name="L78" href="#L78">78</a>      }
-<a class="jxr_linenumber" name="L79" href="#L79">79</a>  
-<a class="jxr_linenumber" name="L80" href="#L80">80</a>      @Test
-<a class="jxr_linenumber" name="L81" href="#L81">81</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testMaximize2() {
-<a class="jxr_linenumber" name="L82" href="#L82">82</a>          SimplexOptimizer optimizer = <strong class="jxr_keyword">new</strong> SimplexOptimizer(1e-10, 1e-30);
-<a class="jxr_linenumber" name="L83" href="#L83">83</a>          optimizer.setSimplex(<strong class="jxr_keyword">new</strong> NelderMeadSimplex(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 0.2, 0.2 }));
-<a class="jxr_linenumber" name="L84" href="#L84">84</a>          <strong class="jxr_keyword">final</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerMultiDirectionalTest.html">FourExtrema</a> fourExtrema = <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerMultiDirectionalTest.html">FourExtrema</a>();
-<a class="jxr_linenumber" name="L85" href="#L85">85</a>  
-<a class="jxr_linenumber" name="L86" href="#L86">86</a>          <strong class="jxr_keyword">final</strong> PointValuePair optimum
-<a class="jxr_linenumber" name="L87" href="#L87">87</a>              = optimizer.optimize(100, fourExtrema, GoalType.MAXIMIZE, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 1, 0 });
-<a class="jxr_linenumber" name="L88" href="#L88">88</a>          Assert.assertEquals(fourExtrema.xP, optimum.getPoint()[0], 4e-6);
-<a class="jxr_linenumber" name="L89" href="#L89">89</a>          Assert.assertEquals(fourExtrema.yP, optimum.getPoint()[1], 5e-6);
-<a class="jxr_linenumber" name="L90" href="#L90">90</a>          Assert.assertEquals(fourExtrema.valueXpYp, optimum.getValue(), 7e-12);
-<a class="jxr_linenumber" name="L91" href="#L91">91</a>          Assert.assertTrue(optimizer.getEvaluations() &gt; 60);
-<a class="jxr_linenumber" name="L92" href="#L92">92</a>          Assert.assertTrue(optimizer.getEvaluations() &lt; 90);
-<a class="jxr_linenumber" name="L93" href="#L93">93</a>      }
-<a class="jxr_linenumber" name="L94" href="#L94">94</a>  
-<a class="jxr_linenumber" name="L95" href="#L95">95</a>      @Test
-<a class="jxr_linenumber" name="L96" href="#L96">96</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testRosenbrock() {
-<a class="jxr_linenumber" name="L97" href="#L97">97</a>  
-<a class="jxr_linenumber" name="L98" href="#L98">98</a>          <a href="../../../../../../org/apache/commons/math3/optimization/MultivariateMultiStartOptimizerTest.html">Rosenbrock</a> rosenbrock = <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/math3/optimization/MultivariateMultiStartOptimizerTest.html">Rosenbrock</a>();
-<a class="jxr_linenumber" name="L99" href="#L99">99</a>          SimplexOptimizer optimizer = <strong class="jxr_keyword">new</strong> SimplexOptimizer(-1, 1e-3);
-<a class="jxr_linenumber" name="L100" href="#L100">100</a>         optimizer.setSimplex(<strong class="jxr_keyword">new</strong> NelderMeadSimplex(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[][] {
-<a class="jxr_linenumber" name="L101" href="#L101">101</a>                     { -1.2,  1 }, { 0.9, 1.2 } , {  3.5, -2.3 }
-<a class="jxr_linenumber" name="L102" href="#L102">102</a>                 }));
-<a class="jxr_linenumber" name="L103" href="#L103">103</a>         PointValuePair optimum =
-<a class="jxr_linenumber" name="L104" href="#L104">104</a>             optimizer.optimize(100, rosenbrock, GoalType.MINIMIZE, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { -1.2, 1 });
-<a class="jxr_linenumber" name="L105" href="#L105">105</a> 
-<a class="jxr_linenumber" name="L106" href="#L106">106</a>         Assert.assertEquals(rosenbrock.getCount(), optimizer.getEvaluations());
-<a class="jxr_linenumber" name="L107" href="#L107">107</a>         Assert.assertTrue(optimizer.getEvaluations() &gt; 40);
-<a class="jxr_linenumber" name="L108" href="#L108">108</a>         Assert.assertTrue(optimizer.getEvaluations() &lt; 50);
-<a class="jxr_linenumber" name="L109" href="#L109">109</a>         Assert.assertTrue(optimum.getValue() &lt; 8e-4);
-<a class="jxr_linenumber" name="L110" href="#L110">110</a>     }
-<a class="jxr_linenumber" name="L111" href="#L111">111</a> 
-<a class="jxr_linenumber" name="L112" href="#L112">112</a>     @Test
-<a class="jxr_linenumber" name="L113" href="#L113">113</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPowell() {
-<a class="jxr_linenumber" name="L114" href="#L114">114</a> 
-<a class="jxr_linenumber" name="L115" href="#L115">115</a>         <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerNelderMeadTest.html">Powell</a> powell = <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerNelderMeadTest.html">Powell</a>();
-<a class="jxr_linenumber" name="L116" href="#L116">116</a>         SimplexOptimizer optimizer = <strong class="jxr_keyword">new</strong> SimplexOptimizer(-1, 1e-3);
-<a class="jxr_linenumber" name="L117" href="#L117">117</a>         optimizer.setSimplex(<strong class="jxr_keyword">new</strong> NelderMeadSimplex(4));
-<a class="jxr_linenumber" name="L118" href="#L118">118</a>         PointValuePair optimum =
-<a class="jxr_linenumber" name="L119" href="#L119">119</a>             optimizer.optimize(200, powell, GoalType.MINIMIZE, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 3, -1, 0, 1 });
-<a class="jxr_linenumber" name="L120" href="#L120">120</a>         Assert.assertEquals(powell.getCount(), optimizer.getEvaluations());
-<a class="jxr_linenumber" name="L121" href="#L121">121</a>         Assert.assertTrue(optimizer.getEvaluations() &gt; 110);
-<a class="jxr_linenumber" name="L122" href="#L122">122</a>         Assert.assertTrue(optimizer.getEvaluations() &lt; 130);
-<a class="jxr_linenumber" name="L123" href="#L123">123</a>         Assert.assertTrue(optimum.getValue() &lt; 2e-3);
-<a class="jxr_linenumber" name="L124" href="#L124">124</a>     }
-<a class="jxr_linenumber" name="L125" href="#L125">125</a> 
-<a class="jxr_linenumber" name="L126" href="#L126">126</a>     @Test
-<a class="jxr_linenumber" name="L127" href="#L127">127</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLeastSquares1() {
-<a class="jxr_linenumber" name="L128" href="#L128">128</a> 
-<a class="jxr_linenumber" name="L129" href="#L129">129</a>         <strong class="jxr_keyword">final</strong> RealMatrix factors =
-<a class="jxr_linenumber" name="L130" href="#L130">130</a>             <strong class="jxr_keyword">new</strong> Array2DRowRealMatrix(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[][] {
-<a class="jxr_linenumber" name="L131" href="#L131">131</a>                     { 1, 0 },
-<a class="jxr_linenumber" name="L132" href="#L132">132</a>                     { 0, 1 }
-<a class="jxr_linenumber" name="L133" href="#L133">133</a>                 }, false);
-<a class="jxr_linenumber" name="L134" href="#L134">134</a>         LeastSquaresConverter ls = <strong class="jxr_keyword">new</strong> LeastSquaresConverter(<strong class="jxr_keyword">new</strong> MultivariateVectorFunction() {
-<a class="jxr_linenumber" name="L135" href="#L135">135</a>                 <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong>[] value(<strong class="jxr_keyword">double</strong>[] variables) {
-<a class="jxr_linenumber" name="L136" href="#L136">136</a>                     <strong class="jxr_keyword">return</strong> factors.operate(variables);
-<a class="jxr_linenumber" name="L137" href="#L137">137</a>                 }
-<a class="jxr_linenumber" name="L138" href="#L138">138</a>             }, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 2.0, -3.0 });
-<a class="jxr_linenumber" name="L139" href="#L139">139</a>         SimplexOptimizer optimizer = <strong class="jxr_keyword">new</strong> SimplexOptimizer(-1, 1e-6);
-<a class="jxr_linenumber" name="L140" href="#L140">140</a>         optimizer.setSimplex(<strong class="jxr_keyword">new</strong> NelderMeadSimplex(2));
-<a class="jxr_linenumber" name="L141" href="#L141">141</a>         PointValuePair optimum =
-<a class="jxr_linenumber" name="L142" href="#L142">142</a>             optimizer.optimize(200, ls, GoalType.MINIMIZE, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 10, 10 });
-<a class="jxr_linenumber" name="L143" href="#L143">143</a>         Assert.assertEquals( 2, optimum.getPointRef()[0], 3e-5);
-<a class="jxr_linenumber" name="L144" href="#L144">144</a>         Assert.assertEquals(-3, optimum.getPointRef()[1], 4e-4);
-<a class="jxr_linenumber" name="L145" href="#L145">145</a>         Assert.assertTrue(optimizer.getEvaluations() &gt; 60);
-<a class="jxr_linenumber" name="L146" href="#L146">146</a>         Assert.assertTrue(optimizer.getEvaluations() &lt; 80);
-<a class="jxr_linenumber" name="L147" href="#L147">147</a>         Assert.assertTrue(optimum.getValue() &lt; 1.0e-6);
-<a class="jxr_linenumber" name="L148" href="#L148">148</a>     }
-<a class="jxr_linenumber" name="L149" href="#L149">149</a> 
-<a class="jxr_linenumber" name="L150" href="#L150">150</a>     @Test
-<a class="jxr_linenumber" name="L151" href="#L151">151</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLeastSquares2() {
-<a class="jxr_linenumber" name="L152" href="#L152">152</a> 
-<a class="jxr_linenumber" name="L153" href="#L153">153</a>         <strong class="jxr_keyword">final</strong> RealMatrix factors =
-<a class="jxr_linenumber" name="L154" href="#L154">154</a>             <strong class="jxr_keyword">new</strong> Array2DRowRealMatrix(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[][] {
-<a class="jxr_linenumber" name="L155" href="#L155">155</a>                     { 1, 0 },
-<a class="jxr_linenumber" name="L156" href="#L156">156</a>                     { 0, 1 }
-<a class="jxr_linenumber" name="L157" href="#L157">157</a>                 }, false);
-<a class="jxr_linenumber" name="L158" href="#L158">158</a>         LeastSquaresConverter ls = <strong class="jxr_keyword">new</strong> LeastSquaresConverter(<strong class="jxr_keyword">new</strong> MultivariateVectorFunction() {
-<a class="jxr_linenumber" name="L159" href="#L159">159</a>                 <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong>[] value(<strong class="jxr_keyword">double</strong>[] variables) {
-<a class="jxr_linenumber" name="L160" href="#L160">160</a>                     <strong class="jxr_keyword">return</strong> factors.operate(variables);
-<a class="jxr_linenumber" name="L161" href="#L161">161</a>                 }
-<a class="jxr_linenumber" name="L162" href="#L162">162</a>             }, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 2, -3 }, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 10, 0.1 });
-<a class="jxr_linenumber" name="L163" href="#L163">163</a>         SimplexOptimizer optimizer = <strong class="jxr_keyword">new</strong> SimplexOptimizer(-1, 1e-6);
-<a class="jxr_linenumber" name="L164" href="#L164">164</a>         optimizer.setSimplex(<strong class="jxr_keyword">new</strong> NelderMeadSimplex(2));
-<a class="jxr_linenumber" name="L165" href="#L165">165</a>         PointValuePair optimum =
-<a class="jxr_linenumber" name="L166" href="#L166">166</a>             optimizer.optimize(200, ls, GoalType.MINIMIZE, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 10, 10 });
-<a class="jxr_linenumber" name="L167" href="#L167">167</a>         Assert.assertEquals( 2, optimum.getPointRef()[0], 5e-5);
-<a class="jxr_linenumber" name="L168" href="#L168">168</a>         Assert.assertEquals(-3, optimum.getPointRef()[1], 8e-4);
-<a class="jxr_linenumber" name="L169" href="#L169">169</a>         Assert.assertTrue(optimizer.getEvaluations() &gt; 60);
-<a class="jxr_linenumber" name="L170" href="#L170">170</a>         Assert.assertTrue(optimizer.getEvaluations() &lt; 80);
-<a class="jxr_linenumber" name="L171" href="#L171">171</a>         Assert.assertTrue(optimum.getValue() &lt; 1e-6);
-<a class="jxr_linenumber" name="L172" href="#L172">172</a>     }
-<a class="jxr_linenumber" name="L173" href="#L173">173</a> 
-<a class="jxr_linenumber" name="L174" href="#L174">174</a>     @Test
-<a class="jxr_linenumber" name="L175" href="#L175">175</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLeastSquares3() {
-<a class="jxr_linenumber" name="L176" href="#L176">176</a> 
-<a class="jxr_linenumber" name="L177" href="#L177">177</a>         <strong class="jxr_keyword">final</strong> RealMatrix factors =
-<a class="jxr_linenumber" name="L178" href="#L178">178</a>             <strong class="jxr_keyword">new</strong> Array2DRowRealMatrix(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[][] {
-<a class="jxr_linenumber" name="L179" href="#L179">179</a>                     { 1, 0 },
-<a class="jxr_linenumber" name="L180" href="#L180">180</a>                     { 0, 1 }
-<a class="jxr_linenumber" name="L181" href="#L181">181</a>                 }, false);
-<a class="jxr_linenumber" name="L182" href="#L182">182</a>         LeastSquaresConverter ls = <strong class="jxr_keyword">new</strong> LeastSquaresConverter(<strong class="jxr_keyword">new</strong> MultivariateVectorFunction() {
-<a class="jxr_linenumber" name="L183" href="#L183">183</a>                 <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong>[] value(<strong class="jxr_keyword">double</strong>[] variables) {
-<a class="jxr_linenumber" name="L184" href="#L184">184</a>                     <strong class="jxr_keyword">return</strong> factors.operate(variables);
-<a class="jxr_linenumber" name="L185" href="#L185">185</a>                 }
-<a class="jxr_linenumber" name="L186" href="#L186">186</a>             }, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 2, -3 }, <strong class="jxr_keyword">new</strong> Array2DRowRealMatrix(<strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong> [][] {
-<a class="jxr_linenumber" name="L187" href="#L187">187</a>                     { 1, 1.2 }, { 1.2, 2 }
-<a class="jxr_linenumber" name="L188" href="#L188">188</a>                 }));
-<a class="jxr_linenumber" name="L189" href="#L189">189</a>         SimplexOptimizer optimizer = <strong class="jxr_keyword">new</strong> SimplexOptimizer(-1, 1e-6);
-<a class="jxr_linenumber" name="L190" href="#L190">190</a>         optimizer.setSimplex(<strong class="jxr_keyword">new</strong> NelderMeadSimplex(2));
-<a class="jxr_linenumber" name="L191" href="#L191">191</a>         PointValuePair optimum =
-<a class="jxr_linenumber" name="L192" href="#L192">192</a>             optimizer.optimize(200, ls, GoalType.MINIMIZE, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 10, 10 });
-<a class="jxr_linenumber" name="L193" href="#L193">193</a>         Assert.assertEquals( 2, optimum.getPointRef()[0], 2e-3);
-<a class="jxr_linenumber" name="L194" href="#L194">194</a>         Assert.assertEquals(-3, optimum.getPointRef()[1], 8e-4);
-<a class="jxr_linenumber" name="L195" href="#L195">195</a>         Assert.assertTrue(optimizer.getEvaluations() &gt; 60);
-<a class="jxr_linenumber" name="L196" href="#L196">196</a>         Assert.assertTrue(optimizer.getEvaluations() &lt; 80);
-<a class="jxr_linenumber" name="L197" href="#L197">197</a>         Assert.assertTrue(optimum.getValue() &lt; 1e-6);
-<a class="jxr_linenumber" name="L198" href="#L198">198</a>     }
-<a class="jxr_linenumber" name="L199" href="#L199">199</a> 
-<a class="jxr_linenumber" name="L200" href="#L200">200</a>     @Test(expected = TooManyEvaluationsException.<strong class="jxr_keyword">class</strong>)
-<a class="jxr_linenumber" name="L201" href="#L201">201</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testMaxIterations() {
-<a class="jxr_linenumber" name="L202" href="#L202">202</a>         <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerNelderMeadTest.html">Powell</a> powell = <strong class="jxr_keyword">new</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerNelderMeadTest.html">Powell</a>();
-<a class="jxr_linenumber" name="L203" href="#L203">203</a>         SimplexOptimizer optimizer = <strong class="jxr_keyword">new</strong> SimplexOptimizer(-1, 1e-3);
-<a class="jxr_linenumber" name="L204" href="#L204">204</a>         optimizer.setSimplex(<strong class="jxr_keyword">new</strong> NelderMeadSimplex(4));
-<a class="jxr_linenumber" name="L205" href="#L205">205</a>         optimizer.optimize(20, powell, GoalType.MINIMIZE, <strong class="jxr_keyword">new</strong> <strong class="jxr_keyword">double</strong>[] { 3, -1, 0, 1 });
-<a class="jxr_linenumber" name="L206" href="#L206">206</a>     }
-<a class="jxr_linenumber" name="L207" href="#L207">207</a> 
-<a class="jxr_linenumber" name="L208" href="#L208">208</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/optimization/direct/SimplexOptimizerMultiDirectionalTest.html">FourExtrema</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
-<a class="jxr_linenumber" name="L209" href="#L209">209</a>         <em class="jxr_comment">// The following function has 4 local extrema.</em>
-<a class="jxr_linenumber" name="L210" href="#L210">210</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> xM = -3.841947088256863675365;
-<a class="jxr_linenumber" name="L211" href="#L211">211</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> yM = -1.391745200270734924416;
-<a class="jxr_linenumber" name="L212" href="#L212">212</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> xP =  0.2286682237349059125691;
-<a class="jxr_linenumber" name="L213" href="#L213">213</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> yP = -yM;
-<a class="jxr_linenumber" name="L214" href="#L214">214</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> valueXmYm = 0.2373295333134216789769; <em class="jxr_comment">// Local maximum.</em>
-<a class="jxr_linenumber" name="L215" href="#L215">215</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> valueXmYp = -valueXmYm; <em class="jxr_comment">// Local minimum.</em>
-<a class="jxr_linenumber" name="L216" href="#L216">216</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> valueXpYm = -0.7290400707055187115322; <em class="jxr_comment">// Global minimum.</em>
-<a class="jxr_linenumber" name="L217" href="#L217">217</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> valueXpYp = -valueXpYm; <em class="jxr_comment">// Global maximum.</em>
-<a class="jxr_linenumber" name="L218" href="#L218">218</a> 
-<a class="jxr_linenumber" name="L219" href="#L219">219</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">double</strong> value(<strong class="jxr_keyword">double</strong>[] variables) {
-<a class="jxr_linenumber" name="L220" href="#L220">220</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> x = variables[0];
-<a class="jxr_linenumber" name="L221" href="#L221">221</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">double</strong> y = variables[1];
-<a class="jxr_linenumber" name="L222" href="#L222">222</a>             <strong class="jxr_keyword">return</strong> (x == 0 || y == 0) ? 0 :
-<a class="jxr_linenumber" name="L223" href="#L223">223</a>                 FastMath.atan(x) * FastMath.atan(x + 2) * FastMath.atan(y) * FastMath.atan(y) / (x * y);
-<a class="jxr_linenumber" name="L224" href="#L224">224</a>         }
-<a class="jxr_linenumber" name="L225" href="#L225">225</a>     }
-<a class="jxr_linenumber" name="L226" href="#L226">226</a> 
-<a class="jxr_linenumber" name="L227" href="#L227">227</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/optimization/MultivariateMultiStartOptimizerTest.html">Rosenbrock</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
-<a class="jxr_linenumber" name="L228" href="#L228">228</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> count;
-<a class="jxr_linenumber" name="L229" href="#L229">229</a> 
-<a class="jxr_linenumber" name="L230" href="#L230">230</a>         <strong class="jxr_keyword">public</strong> <a href="../../../../../../org/apache/commons/math3/optimization/MultivariateMultiStartOptimizerTest.html">Rosenbrock</a>() {
-<a class="jxr_linenumber" name="L231" href="#L231">231</a>             count = 0;
-<a class="jxr_linenumber" name="L232" href="#L232">232</a>         }
-<a class="jxr_linenumber" name="L233" href="#L233">233</a> 
-<a class="jxr_linenumber" name="L234" href="#L234">234</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="L235" href="#L235">235</a>             ++count;
-<a class="jxr_linenumber" name="L236" href="#L236">236</a>             <strong class="jxr_keyword">double</strong> a = x[1] - x[0] * x[0];
-<a class="jxr_linenumber" name="L237" href="#L237">237</a>             <strong class="jxr_keyword">double</strong> b = 1.0 - x[0];
-<a class="jxr_linenumber" name="L238" href="#L238">238</a>             <strong class="jxr_keyword">return</strong> 100 * a * a + b * b;
-<a class="jxr_linenumber" name="L239" href="#L239">239</a>         }
-<a class="jxr_linenumber" name="L240" href="#L240">240</a> 
-<a class="jxr_linenumber" name="L241" href="#L241">241</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> getCount() {
-<a class="jxr_linenumber" name="L242" href="#L242">242</a>             <strong class="jxr_keyword">return</strong> count;
-<a class="jxr_linenumber" name="L243" href="#L243">243</a>         }
-<a class="jxr_linenumber" name="L244" href="#L244">244</a>     }
-<a class="jxr_linenumber" name="L245" href="#L245">245</a> 
-<a class="jxr_linenumber" name="L246" href="#L246">246</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/optimization/direct/SimplexOptimizerNelderMeadTest.html">Powell</a> <strong class="jxr_keyword">implements</strong> MultivariateFunction {
-<a class="jxr_linenumber" name="L247" href="#L247">247</a>         <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> count;
-<a class="jxr_linenumber" name="L248" href="#L248">248</a> 
-<a class="jxr_linenumber" name="L249" href="#L249">249</a>         <strong class="jxr_keyword">public</strong> <a href="../../../../../../org/apache/commons/math3/optimization/direct/SimplexOptimizerNelderMeadTest.html">Powell</a>() {
-<a class="jxr_linenumber" name="L250" href="#L250">250</a>             count = 0;
-<a class="jxr_linenumber" name="L251" href="#L251">251</a>         }
-<a class="jxr_linenumber" name="L252" href="#L252">252</a> 
-<a class="jxr_linenumber" name="L253" href="#L253">253</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="L254" href="#L254">254</a>             ++count;
-<a class="jxr_linenumber" name="L255" href="#L255">255</a>             <strong class="jxr_keyword">double</strong> a = x[0] + 10 * x[1];
-<a class="jxr_linenumber" name="L256" href="#L256">256</a>             <strong class="jxr_keyword">double</strong> b = x[2] - x[3];
-<a class="jxr_linenumber" name="L257" href="#L257">257</a>             <strong class="jxr_keyword">double</strong> c = x[1] - 2 * x[2];
-<a class="jxr_linenumber" name="L258" href="#L258">258</a>             <strong class="jxr_keyword">double</strong> d = x[0] - x[3];
-<a class="jxr_linenumber" name="L259" href="#L259">259</a>             <strong class="jxr_keyword">return</strong> a * a + 5 * b * b + c * c * c * c + 10 * d * d * d * d;
-<a class="jxr_linenumber" name="L260" href="#L260">260</a>         }
-<a class="jxr_linenumber" name="L261" href="#L261">261</a> 
-<a class="jxr_linenumber" name="L262" href="#L262">262</a>         <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> getCount() {
-<a class="jxr_linenumber" name="L263" href="#L263">263</a>             <strong class="jxr_keyword">return</strong> count;
-<a class="jxr_linenumber" name="L264" href="#L264">264</a>         }
-<a class="jxr_linenumber" name="L265" href="#L265">265</a>     }
-<a class="jxr_linenumber" name="L266" href="#L266">266</a> }
-</pre>
-<hr/>
-<div id="footer">Copyright &#169; 2003&#x2013;2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/02/026dc539e335ab389d5f8c8ae723df1008733be1.svn-base
----------------------------------------------------------------------
diff --git a/site-content/.svn/pristine/02/026dc539e335ab389d5f8c8ae723df1008733be1.svn-base b/site-content/.svn/pristine/02/026dc539e335ab389d5f8c8ae723df1008733be1.svn-base
deleted file mode 100644
index 67503f6..0000000
--- a/site-content/.svn/pristine/02/026dc539e335ab389d5f8c8ae723df1008733be1.svn-base
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>DstNormalization.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Math</a> &gt; <a href="index.source.html" class="el_package">org.apache.commons.math3.transform</a> &gt; <span class="el_source">DstNormalization.java<
 /span></div><h1>DstNormalization.java</h1><pre class="source lang-java linenums">/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the &quot;License&quot;); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.commons.math3.transform;
-
-/**
- * This enumeration defines the various types of normalizations that can be
- * applied to discrete sine transforms (DST). The exact definition of these
- * normalizations is detailed below.
- *
- * @see FastSineTransformer
- * @since 3.0
- */
-<span class="pc" id="L27">public enum DstNormalization {</span>
-    /**
-     * Should be passed to the constructor of {@link FastSineTransformer} to
-     * use the &lt;em&gt;standard&lt;/em&gt; normalization convention. The standard DST-I
-     * normalization convention is defined as follows
-     * &lt;ul&gt;
-     * &lt;li&gt;forward transform: y&lt;sub&gt;n&lt;/sub&gt; = &amp;sum;&lt;sub&gt;k=0&lt;/sub&gt;&lt;sup&gt;N-1&lt;/sup&gt;
-     * x&lt;sub&gt;k&lt;/sub&gt; sin(&amp;pi; nk / N),&lt;/li&gt;
-     * &lt;li&gt;inverse transform: x&lt;sub&gt;k&lt;/sub&gt; = (2 / N)
-     * &amp;sum;&lt;sub&gt;n=0&lt;/sub&gt;&lt;sup&gt;N-1&lt;/sup&gt; y&lt;sub&gt;n&lt;/sub&gt; sin(&amp;pi; nk / N),&lt;/li&gt;
-     * &lt;/ul&gt;
-     * where N is the size of the data sample, and x&lt;sub&gt;0&lt;/sub&gt; = 0.
-     */
-<span class="fc" id="L40">    STANDARD_DST_I,</span>
-
-    /**
-     * Should be passed to the constructor of {@link FastSineTransformer} to
-     * use the &lt;em&gt;orthogonal&lt;/em&gt; normalization convention. The orthogonal
-     * DCT-I normalization convention is defined as follows
-     * &lt;ul&gt;
-     * &lt;li&gt;Forward transform: y&lt;sub&gt;n&lt;/sub&gt; = &amp;radic;(2 / N)
-     * &amp;sum;&lt;sub&gt;k=0&lt;/sub&gt;&lt;sup&gt;N-1&lt;/sup&gt; x&lt;sub&gt;k&lt;/sub&gt; sin(&amp;pi; nk / N),&lt;/li&gt;
-     * &lt;li&gt;Inverse transform: x&lt;sub&gt;k&lt;/sub&gt; = &amp;radic;(2 / N)
-     * &amp;sum;&lt;sub&gt;n=0&lt;/sub&gt;&lt;sup&gt;N-1&lt;/sup&gt; y&lt;sub&gt;n&lt;/sub&gt; sin(&amp;pi; nk / N),&lt;/li&gt;
-     * &lt;/ul&gt;
-     * which makes the transform orthogonal. N is the size of the data sample,
-     * and x&lt;sub&gt;0&lt;/sub&gt; = 0.
-     */
-<span class="fc" id="L55">    ORTHOGONAL_DST_I</span>
-}
-</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.5.201505241946</span></div></body></html>
\ No newline at end of file


Mime
View raw message