commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r961863 [6/34] - in /websites/production/commons/content/proper/commons-math: ./ apidocs/ apidocs/org/apache/commons/math3/analysis/class-use/ apidocs/org/apache/commons/math3/analysis/interpolation/ apidocs/org/apache/commons/math3/analysi...
Date Fri, 14 Aug 2015 19:12:44 GMT
Modified: websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolatingFunction.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolatingFunction.html (original)
+++ websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolatingFunction.html Fri Aug 14 19:12:42 2015
@@ -42,220 +42,223 @@
 <span class="sourceLineNo">034</span> * Interpolating function that implements the<a name="line.34"></a>
 <span class="sourceLineNo">035</span> * &lt;a href="http://www.dudziak.com/microsphere.php"&gt;Microsphere Projection&lt;/a&gt;.<a name="line.35"></a>
 <span class="sourceLineNo">036</span> *<a name="line.36"></a>
-<span class="sourceLineNo">037</span> */<a name="line.37"></a>
-<span class="sourceLineNo">038</span>public class MicrosphereInterpolatingFunction<a name="line.38"></a>
-<span class="sourceLineNo">039</span>    implements MultivariateFunction {<a name="line.39"></a>
-<span class="sourceLineNo">040</span>    /**<a name="line.40"></a>
-<span class="sourceLineNo">041</span>     * Space dimension.<a name="line.41"></a>
-<span class="sourceLineNo">042</span>     */<a name="line.42"></a>
-<span class="sourceLineNo">043</span>    private final int dimension;<a name="line.43"></a>
-<span class="sourceLineNo">044</span>    /**<a name="line.44"></a>
-<span class="sourceLineNo">045</span>     * Internal accounting data for the interpolation algorithm.<a name="line.45"></a>
-<span class="sourceLineNo">046</span>     * Each element of the list corresponds to one surface element of<a name="line.46"></a>
-<span class="sourceLineNo">047</span>     * the microsphere.<a name="line.47"></a>
-<span class="sourceLineNo">048</span>     */<a name="line.48"></a>
-<span class="sourceLineNo">049</span>    private final List&lt;MicrosphereSurfaceElement&gt; microsphere;<a name="line.49"></a>
-<span class="sourceLineNo">050</span>    /**<a name="line.50"></a>
-<span class="sourceLineNo">051</span>     * Exponent used in the power law that computes the weights of the<a name="line.51"></a>
-<span class="sourceLineNo">052</span>     * sample data.<a name="line.52"></a>
-<span class="sourceLineNo">053</span>     */<a name="line.53"></a>
-<span class="sourceLineNo">054</span>    private final double brightnessExponent;<a name="line.54"></a>
-<span class="sourceLineNo">055</span>    /**<a name="line.55"></a>
-<span class="sourceLineNo">056</span>     * Sample data.<a name="line.56"></a>
-<span class="sourceLineNo">057</span>     */<a name="line.57"></a>
-<span class="sourceLineNo">058</span>    private final Map&lt;RealVector, Double&gt; samples;<a name="line.58"></a>
-<span class="sourceLineNo">059</span><a name="line.59"></a>
-<span class="sourceLineNo">060</span>    /**<a name="line.60"></a>
-<span class="sourceLineNo">061</span>     * Class for storing the accounting data needed to perform the<a name="line.61"></a>
-<span class="sourceLineNo">062</span>     * microsphere projection.<a name="line.62"></a>
-<span class="sourceLineNo">063</span>     */<a name="line.63"></a>
-<span class="sourceLineNo">064</span>    private static class MicrosphereSurfaceElement {<a name="line.64"></a>
-<span class="sourceLineNo">065</span>        /** Normal vector characterizing a surface element. */<a name="line.65"></a>
-<span class="sourceLineNo">066</span>        private final RealVector normal;<a name="line.66"></a>
-<span class="sourceLineNo">067</span>        /** Illumination received from the brightest sample. */<a name="line.67"></a>
-<span class="sourceLineNo">068</span>        private double brightestIllumination;<a name="line.68"></a>
-<span class="sourceLineNo">069</span>        /** Brightest sample. */<a name="line.69"></a>
-<span class="sourceLineNo">070</span>        private Map.Entry&lt;RealVector, Double&gt; brightestSample;<a name="line.70"></a>
-<span class="sourceLineNo">071</span><a name="line.71"></a>
-<span class="sourceLineNo">072</span>        /**<a name="line.72"></a>
-<span class="sourceLineNo">073</span>         * @param n Normal vector characterizing a surface element<a name="line.73"></a>
-<span class="sourceLineNo">074</span>         * of the microsphere.<a name="line.74"></a>
-<span class="sourceLineNo">075</span>         */<a name="line.75"></a>
-<span class="sourceLineNo">076</span>        MicrosphereSurfaceElement(double[] n) {<a name="line.76"></a>
-<span class="sourceLineNo">077</span>            normal = new ArrayRealVector(n);<a name="line.77"></a>
-<span class="sourceLineNo">078</span>        }<a name="line.78"></a>
-<span class="sourceLineNo">079</span><a name="line.79"></a>
-<span class="sourceLineNo">080</span>        /**<a name="line.80"></a>
-<span class="sourceLineNo">081</span>         * Return the normal vector.<a name="line.81"></a>
-<span class="sourceLineNo">082</span>         * @return the normal vector<a name="line.82"></a>
-<span class="sourceLineNo">083</span>         */<a name="line.83"></a>
-<span class="sourceLineNo">084</span>        RealVector normal() {<a name="line.84"></a>
-<span class="sourceLineNo">085</span>            return normal;<a name="line.85"></a>
-<span class="sourceLineNo">086</span>        }<a name="line.86"></a>
-<span class="sourceLineNo">087</span><a name="line.87"></a>
-<span class="sourceLineNo">088</span>        /**<a name="line.88"></a>
-<span class="sourceLineNo">089</span>         * Reset "illumination" and "sampleIndex".<a name="line.89"></a>
-<span class="sourceLineNo">090</span>         */<a name="line.90"></a>
-<span class="sourceLineNo">091</span>        void reset() {<a name="line.91"></a>
-<span class="sourceLineNo">092</span>            brightestIllumination = 0;<a name="line.92"></a>
-<span class="sourceLineNo">093</span>            brightestSample = null;<a name="line.93"></a>
-<span class="sourceLineNo">094</span>        }<a name="line.94"></a>
-<span class="sourceLineNo">095</span><a name="line.95"></a>
-<span class="sourceLineNo">096</span>        /**<a name="line.96"></a>
-<span class="sourceLineNo">097</span>         * Store the illumination and index of the brightest sample.<a name="line.97"></a>
-<span class="sourceLineNo">098</span>         * @param illuminationFromSample illumination received from sample<a name="line.98"></a>
-<span class="sourceLineNo">099</span>         * @param sample current sample illuminating the element<a name="line.99"></a>
-<span class="sourceLineNo">100</span>         */<a name="line.100"></a>
-<span class="sourceLineNo">101</span>        void store(final double illuminationFromSample,<a name="line.101"></a>
-<span class="sourceLineNo">102</span>                   final Map.Entry&lt;RealVector, Double&gt; sample) {<a name="line.102"></a>
-<span class="sourceLineNo">103</span>            if (illuminationFromSample &gt; this.brightestIllumination) {<a name="line.103"></a>
-<span class="sourceLineNo">104</span>                this.brightestIllumination = illuminationFromSample;<a name="line.104"></a>
-<span class="sourceLineNo">105</span>                this.brightestSample = sample;<a name="line.105"></a>
-<span class="sourceLineNo">106</span>            }<a name="line.106"></a>
-<span class="sourceLineNo">107</span>        }<a name="line.107"></a>
-<span class="sourceLineNo">108</span><a name="line.108"></a>
-<span class="sourceLineNo">109</span>        /**<a name="line.109"></a>
-<span class="sourceLineNo">110</span>         * Get the illumination of the element.<a name="line.110"></a>
-<span class="sourceLineNo">111</span>         * @return the illumination.<a name="line.111"></a>
-<span class="sourceLineNo">112</span>         */<a name="line.112"></a>
-<span class="sourceLineNo">113</span>        double illumination() {<a name="line.113"></a>
-<span class="sourceLineNo">114</span>            return brightestIllumination;<a name="line.114"></a>
-<span class="sourceLineNo">115</span>        }<a name="line.115"></a>
-<span class="sourceLineNo">116</span><a name="line.116"></a>
-<span class="sourceLineNo">117</span>        /**<a name="line.117"></a>
-<span class="sourceLineNo">118</span>         * Get the sample illuminating the element the most.<a name="line.118"></a>
-<span class="sourceLineNo">119</span>         * @return the sample.<a name="line.119"></a>
-<span class="sourceLineNo">120</span>         */<a name="line.120"></a>
-<span class="sourceLineNo">121</span>        Map.Entry&lt;RealVector, Double&gt; sample() {<a name="line.121"></a>
-<span class="sourceLineNo">122</span>            return brightestSample;<a name="line.122"></a>
-<span class="sourceLineNo">123</span>        }<a name="line.123"></a>
-<span class="sourceLineNo">124</span>    }<a name="line.124"></a>
-<span class="sourceLineNo">125</span><a name="line.125"></a>
-<span class="sourceLineNo">126</span>    /**<a name="line.126"></a>
-<span class="sourceLineNo">127</span>     * @param xval Arguments for the interpolation points.<a name="line.127"></a>
-<span class="sourceLineNo">128</span>     * {@code xval[i][0]} is the first component of interpolation point<a name="line.128"></a>
-<span class="sourceLineNo">129</span>     * {@code i}, {@code xval[i][1]} is the second component, and so on<a name="line.129"></a>
-<span class="sourceLineNo">130</span>     * until {@code xval[i][d-1]}, the last component of that interpolation<a name="line.130"></a>
-<span class="sourceLineNo">131</span>     * point (where {@code dimension} is thus the dimension of the sampled<a name="line.131"></a>
-<span class="sourceLineNo">132</span>     * space).<a name="line.132"></a>
-<span class="sourceLineNo">133</span>     * @param yval Values for the interpolation points.<a name="line.133"></a>
-<span class="sourceLineNo">134</span>     * @param brightnessExponent Brightness dimming factor.<a name="line.134"></a>
-<span class="sourceLineNo">135</span>     * @param microsphereElements Number of surface elements of the<a name="line.135"></a>
-<span class="sourceLineNo">136</span>     * microsphere.<a name="line.136"></a>
-<span class="sourceLineNo">137</span>     * @param rand Unit vector generator for creating the microsphere.<a name="line.137"></a>
-<span class="sourceLineNo">138</span>     * @throws DimensionMismatchException if the lengths of {@code yval} and<a name="line.138"></a>
-<span class="sourceLineNo">139</span>     * {@code xval} (equal to {@code n}, the number of interpolation points)<a name="line.139"></a>
-<span class="sourceLineNo">140</span>     * do not match, or the the arrays {@code xval[0]} ... {@code xval[n]},<a name="line.140"></a>
-<span class="sourceLineNo">141</span>     * have lengths different from {@code dimension}.<a name="line.141"></a>
-<span class="sourceLineNo">142</span>     * @throws NoDataException if there an array has zero-length.<a name="line.142"></a>
-<span class="sourceLineNo">143</span>     * @throws NullArgumentException if an argument is {@code null}.<a name="line.143"></a>
-<span class="sourceLineNo">144</span>     */<a name="line.144"></a>
-<span class="sourceLineNo">145</span>    public MicrosphereInterpolatingFunction(double[][] xval,<a name="line.145"></a>
-<span class="sourceLineNo">146</span>                                            double[] yval,<a name="line.146"></a>
-<span class="sourceLineNo">147</span>                                            int brightnessExponent,<a name="line.147"></a>
-<span class="sourceLineNo">148</span>                                            int microsphereElements,<a name="line.148"></a>
-<span class="sourceLineNo">149</span>                                            UnitSphereRandomVectorGenerator rand)<a name="line.149"></a>
-<span class="sourceLineNo">150</span>        throws DimensionMismatchException,<a name="line.150"></a>
-<span class="sourceLineNo">151</span>               NoDataException,<a name="line.151"></a>
-<span class="sourceLineNo">152</span>               NullArgumentException {<a name="line.152"></a>
-<span class="sourceLineNo">153</span>        if (xval == null ||<a name="line.153"></a>
-<span class="sourceLineNo">154</span>            yval == null) {<a name="line.154"></a>
-<span class="sourceLineNo">155</span>            throw new NullArgumentException();<a name="line.155"></a>
-<span class="sourceLineNo">156</span>        }<a name="line.156"></a>
-<span class="sourceLineNo">157</span>        if (xval.length == 0) {<a name="line.157"></a>
-<span class="sourceLineNo">158</span>            throw new NoDataException();<a name="line.158"></a>
+<span class="sourceLineNo">037</span> * @deprecated Code will be removed in 4.0.  Use {@link InterpolatingMicrosphere}<a name="line.37"></a>
+<span class="sourceLineNo">038</span> * and {@link MicrosphereProjectionInterpolator} instead.<a name="line.38"></a>
+<span class="sourceLineNo">039</span> */<a name="line.39"></a>
+<span class="sourceLineNo">040</span>@Deprecated<a name="line.40"></a>
+<span class="sourceLineNo">041</span>public class MicrosphereInterpolatingFunction<a name="line.41"></a>
+<span class="sourceLineNo">042</span>    implements MultivariateFunction {<a name="line.42"></a>
+<span class="sourceLineNo">043</span>    /**<a name="line.43"></a>
+<span class="sourceLineNo">044</span>     * Space dimension.<a name="line.44"></a>
+<span class="sourceLineNo">045</span>     */<a name="line.45"></a>
+<span class="sourceLineNo">046</span>    private final int dimension;<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    /**<a name="line.47"></a>
+<span class="sourceLineNo">048</span>     * Internal accounting data for the interpolation algorithm.<a name="line.48"></a>
+<span class="sourceLineNo">049</span>     * Each element of the list corresponds to one surface element of<a name="line.49"></a>
+<span class="sourceLineNo">050</span>     * the microsphere.<a name="line.50"></a>
+<span class="sourceLineNo">051</span>     */<a name="line.51"></a>
+<span class="sourceLineNo">052</span>    private final List&lt;MicrosphereSurfaceElement&gt; microsphere;<a name="line.52"></a>
+<span class="sourceLineNo">053</span>    /**<a name="line.53"></a>
+<span class="sourceLineNo">054</span>     * Exponent used in the power law that computes the weights of the<a name="line.54"></a>
+<span class="sourceLineNo">055</span>     * sample data.<a name="line.55"></a>
+<span class="sourceLineNo">056</span>     */<a name="line.56"></a>
+<span class="sourceLineNo">057</span>    private final double brightnessExponent;<a name="line.57"></a>
+<span class="sourceLineNo">058</span>    /**<a name="line.58"></a>
+<span class="sourceLineNo">059</span>     * Sample data.<a name="line.59"></a>
+<span class="sourceLineNo">060</span>     */<a name="line.60"></a>
+<span class="sourceLineNo">061</span>    private final Map&lt;RealVector, Double&gt; samples;<a name="line.61"></a>
+<span class="sourceLineNo">062</span><a name="line.62"></a>
+<span class="sourceLineNo">063</span>    /**<a name="line.63"></a>
+<span class="sourceLineNo">064</span>     * Class for storing the accounting data needed to perform the<a name="line.64"></a>
+<span class="sourceLineNo">065</span>     * microsphere projection.<a name="line.65"></a>
+<span class="sourceLineNo">066</span>     */<a name="line.66"></a>
+<span class="sourceLineNo">067</span>    private static class MicrosphereSurfaceElement {<a name="line.67"></a>
+<span class="sourceLineNo">068</span>        /** Normal vector characterizing a surface element. */<a name="line.68"></a>
+<span class="sourceLineNo">069</span>        private final RealVector normal;<a name="line.69"></a>
+<span class="sourceLineNo">070</span>        /** Illumination received from the brightest sample. */<a name="line.70"></a>
+<span class="sourceLineNo">071</span>        private double brightestIllumination;<a name="line.71"></a>
+<span class="sourceLineNo">072</span>        /** Brightest sample. */<a name="line.72"></a>
+<span class="sourceLineNo">073</span>        private Map.Entry&lt;RealVector, Double&gt; brightestSample;<a name="line.73"></a>
+<span class="sourceLineNo">074</span><a name="line.74"></a>
+<span class="sourceLineNo">075</span>        /**<a name="line.75"></a>
+<span class="sourceLineNo">076</span>         * @param n Normal vector characterizing a surface element<a name="line.76"></a>
+<span class="sourceLineNo">077</span>         * of the microsphere.<a name="line.77"></a>
+<span class="sourceLineNo">078</span>         */<a name="line.78"></a>
+<span class="sourceLineNo">079</span>        MicrosphereSurfaceElement(double[] n) {<a name="line.79"></a>
+<span class="sourceLineNo">080</span>            normal = new ArrayRealVector(n);<a name="line.80"></a>
+<span class="sourceLineNo">081</span>        }<a name="line.81"></a>
+<span class="sourceLineNo">082</span><a name="line.82"></a>
+<span class="sourceLineNo">083</span>        /**<a name="line.83"></a>
+<span class="sourceLineNo">084</span>         * Return the normal vector.<a name="line.84"></a>
+<span class="sourceLineNo">085</span>         * @return the normal vector<a name="line.85"></a>
+<span class="sourceLineNo">086</span>         */<a name="line.86"></a>
+<span class="sourceLineNo">087</span>        RealVector normal() {<a name="line.87"></a>
+<span class="sourceLineNo">088</span>            return normal;<a name="line.88"></a>
+<span class="sourceLineNo">089</span>        }<a name="line.89"></a>
+<span class="sourceLineNo">090</span><a name="line.90"></a>
+<span class="sourceLineNo">091</span>        /**<a name="line.91"></a>
+<span class="sourceLineNo">092</span>         * Reset "illumination" and "sampleIndex".<a name="line.92"></a>
+<span class="sourceLineNo">093</span>         */<a name="line.93"></a>
+<span class="sourceLineNo">094</span>        void reset() {<a name="line.94"></a>
+<span class="sourceLineNo">095</span>            brightestIllumination = 0;<a name="line.95"></a>
+<span class="sourceLineNo">096</span>            brightestSample = null;<a name="line.96"></a>
+<span class="sourceLineNo">097</span>        }<a name="line.97"></a>
+<span class="sourceLineNo">098</span><a name="line.98"></a>
+<span class="sourceLineNo">099</span>        /**<a name="line.99"></a>
+<span class="sourceLineNo">100</span>         * Store the illumination and index of the brightest sample.<a name="line.100"></a>
+<span class="sourceLineNo">101</span>         * @param illuminationFromSample illumination received from sample<a name="line.101"></a>
+<span class="sourceLineNo">102</span>         * @param sample current sample illuminating the element<a name="line.102"></a>
+<span class="sourceLineNo">103</span>         */<a name="line.103"></a>
+<span class="sourceLineNo">104</span>        void store(final double illuminationFromSample,<a name="line.104"></a>
+<span class="sourceLineNo">105</span>                   final Map.Entry&lt;RealVector, Double&gt; sample) {<a name="line.105"></a>
+<span class="sourceLineNo">106</span>            if (illuminationFromSample &gt; this.brightestIllumination) {<a name="line.106"></a>
+<span class="sourceLineNo">107</span>                this.brightestIllumination = illuminationFromSample;<a name="line.107"></a>
+<span class="sourceLineNo">108</span>                this.brightestSample = sample;<a name="line.108"></a>
+<span class="sourceLineNo">109</span>            }<a name="line.109"></a>
+<span class="sourceLineNo">110</span>        }<a name="line.110"></a>
+<span class="sourceLineNo">111</span><a name="line.111"></a>
+<span class="sourceLineNo">112</span>        /**<a name="line.112"></a>
+<span class="sourceLineNo">113</span>         * Get the illumination of the element.<a name="line.113"></a>
+<span class="sourceLineNo">114</span>         * @return the illumination.<a name="line.114"></a>
+<span class="sourceLineNo">115</span>         */<a name="line.115"></a>
+<span class="sourceLineNo">116</span>        double illumination() {<a name="line.116"></a>
+<span class="sourceLineNo">117</span>            return brightestIllumination;<a name="line.117"></a>
+<span class="sourceLineNo">118</span>        }<a name="line.118"></a>
+<span class="sourceLineNo">119</span><a name="line.119"></a>
+<span class="sourceLineNo">120</span>        /**<a name="line.120"></a>
+<span class="sourceLineNo">121</span>         * Get the sample illuminating the element the most.<a name="line.121"></a>
+<span class="sourceLineNo">122</span>         * @return the sample.<a name="line.122"></a>
+<span class="sourceLineNo">123</span>         */<a name="line.123"></a>
+<span class="sourceLineNo">124</span>        Map.Entry&lt;RealVector, Double&gt; sample() {<a name="line.124"></a>
+<span class="sourceLineNo">125</span>            return brightestSample;<a name="line.125"></a>
+<span class="sourceLineNo">126</span>        }<a name="line.126"></a>
+<span class="sourceLineNo">127</span>    }<a name="line.127"></a>
+<span class="sourceLineNo">128</span><a name="line.128"></a>
+<span class="sourceLineNo">129</span>    /**<a name="line.129"></a>
+<span class="sourceLineNo">130</span>     * @param xval Arguments for the interpolation points.<a name="line.130"></a>
+<span class="sourceLineNo">131</span>     * {@code xval[i][0]} is the first component of interpolation point<a name="line.131"></a>
+<span class="sourceLineNo">132</span>     * {@code i}, {@code xval[i][1]} is the second component, and so on<a name="line.132"></a>
+<span class="sourceLineNo">133</span>     * until {@code xval[i][d-1]}, the last component of that interpolation<a name="line.133"></a>
+<span class="sourceLineNo">134</span>     * point (where {@code dimension} is thus the dimension of the sampled<a name="line.134"></a>
+<span class="sourceLineNo">135</span>     * space).<a name="line.135"></a>
+<span class="sourceLineNo">136</span>     * @param yval Values for the interpolation points.<a name="line.136"></a>
+<span class="sourceLineNo">137</span>     * @param brightnessExponent Brightness dimming factor.<a name="line.137"></a>
+<span class="sourceLineNo">138</span>     * @param microsphereElements Number of surface elements of the<a name="line.138"></a>
+<span class="sourceLineNo">139</span>     * microsphere.<a name="line.139"></a>
+<span class="sourceLineNo">140</span>     * @param rand Unit vector generator for creating the microsphere.<a name="line.140"></a>
+<span class="sourceLineNo">141</span>     * @throws DimensionMismatchException if the lengths of {@code yval} and<a name="line.141"></a>
+<span class="sourceLineNo">142</span>     * {@code xval} (equal to {@code n}, the number of interpolation points)<a name="line.142"></a>
+<span class="sourceLineNo">143</span>     * do not match, or the the arrays {@code xval[0]} ... {@code xval[n]},<a name="line.143"></a>
+<span class="sourceLineNo">144</span>     * have lengths different from {@code dimension}.<a name="line.144"></a>
+<span class="sourceLineNo">145</span>     * @throws NoDataException if there an array has zero-length.<a name="line.145"></a>
+<span class="sourceLineNo">146</span>     * @throws NullArgumentException if an argument is {@code null}.<a name="line.146"></a>
+<span class="sourceLineNo">147</span>     */<a name="line.147"></a>
+<span class="sourceLineNo">148</span>    public MicrosphereInterpolatingFunction(double[][] xval,<a name="line.148"></a>
+<span class="sourceLineNo">149</span>                                            double[] yval,<a name="line.149"></a>
+<span class="sourceLineNo">150</span>                                            int brightnessExponent,<a name="line.150"></a>
+<span class="sourceLineNo">151</span>                                            int microsphereElements,<a name="line.151"></a>
+<span class="sourceLineNo">152</span>                                            UnitSphereRandomVectorGenerator rand)<a name="line.152"></a>
+<span class="sourceLineNo">153</span>        throws DimensionMismatchException,<a name="line.153"></a>
+<span class="sourceLineNo">154</span>               NoDataException,<a name="line.154"></a>
+<span class="sourceLineNo">155</span>               NullArgumentException {<a name="line.155"></a>
+<span class="sourceLineNo">156</span>        if (xval == null ||<a name="line.156"></a>
+<span class="sourceLineNo">157</span>            yval == null) {<a name="line.157"></a>
+<span class="sourceLineNo">158</span>            throw new NullArgumentException();<a name="line.158"></a>
 <span class="sourceLineNo">159</span>        }<a name="line.159"></a>
-<span class="sourceLineNo">160</span>        if (xval.length != yval.length) {<a name="line.160"></a>
-<span class="sourceLineNo">161</span>            throw new DimensionMismatchException(xval.length, yval.length);<a name="line.161"></a>
+<span class="sourceLineNo">160</span>        if (xval.length == 0) {<a name="line.160"></a>
+<span class="sourceLineNo">161</span>            throw new NoDataException();<a name="line.161"></a>
 <span class="sourceLineNo">162</span>        }<a name="line.162"></a>
-<span class="sourceLineNo">163</span>        if (xval[0] == null) {<a name="line.163"></a>
-<span class="sourceLineNo">164</span>            throw new NullArgumentException();<a name="line.164"></a>
+<span class="sourceLineNo">163</span>        if (xval.length != yval.length) {<a name="line.163"></a>
+<span class="sourceLineNo">164</span>            throw new DimensionMismatchException(xval.length, yval.length);<a name="line.164"></a>
 <span class="sourceLineNo">165</span>        }<a name="line.165"></a>
-<span class="sourceLineNo">166</span><a name="line.166"></a>
-<span class="sourceLineNo">167</span>        dimension = xval[0].length;<a name="line.167"></a>
-<span class="sourceLineNo">168</span>        this.brightnessExponent = brightnessExponent;<a name="line.168"></a>
+<span class="sourceLineNo">166</span>        if (xval[0] == null) {<a name="line.166"></a>
+<span class="sourceLineNo">167</span>            throw new NullArgumentException();<a name="line.167"></a>
+<span class="sourceLineNo">168</span>        }<a name="line.168"></a>
 <span class="sourceLineNo">169</span><a name="line.169"></a>
-<span class="sourceLineNo">170</span>        // Copy data samples.<a name="line.170"></a>
-<span class="sourceLineNo">171</span>        samples = new HashMap&lt;RealVector, Double&gt;(yval.length);<a name="line.171"></a>
-<span class="sourceLineNo">172</span>        for (int i = 0; i &lt; xval.length; ++i) {<a name="line.172"></a>
-<span class="sourceLineNo">173</span>            final double[] xvalI = xval[i];<a name="line.173"></a>
-<span class="sourceLineNo">174</span>            if (xvalI == null) {<a name="line.174"></a>
-<span class="sourceLineNo">175</span>                throw new NullArgumentException();<a name="line.175"></a>
-<span class="sourceLineNo">176</span>            }<a name="line.176"></a>
-<span class="sourceLineNo">177</span>            if (xvalI.length != dimension) {<a name="line.177"></a>
-<span class="sourceLineNo">178</span>                throw new DimensionMismatchException(xvalI.length, dimension);<a name="line.178"></a>
+<span class="sourceLineNo">170</span>        dimension = xval[0].length;<a name="line.170"></a>
+<span class="sourceLineNo">171</span>        this.brightnessExponent = brightnessExponent;<a name="line.171"></a>
+<span class="sourceLineNo">172</span><a name="line.172"></a>
+<span class="sourceLineNo">173</span>        // Copy data samples.<a name="line.173"></a>
+<span class="sourceLineNo">174</span>        samples = new HashMap&lt;RealVector, Double&gt;(yval.length);<a name="line.174"></a>
+<span class="sourceLineNo">175</span>        for (int i = 0; i &lt; xval.length; ++i) {<a name="line.175"></a>
+<span class="sourceLineNo">176</span>            final double[] xvalI = xval[i];<a name="line.176"></a>
+<span class="sourceLineNo">177</span>            if (xvalI == null) {<a name="line.177"></a>
+<span class="sourceLineNo">178</span>                throw new NullArgumentException();<a name="line.178"></a>
 <span class="sourceLineNo">179</span>            }<a name="line.179"></a>
-<span class="sourceLineNo">180</span><a name="line.180"></a>
-<span class="sourceLineNo">181</span>            samples.put(new ArrayRealVector(xvalI), yval[i]);<a name="line.181"></a>
-<span class="sourceLineNo">182</span>        }<a name="line.182"></a>
+<span class="sourceLineNo">180</span>            if (xvalI.length != dimension) {<a name="line.180"></a>
+<span class="sourceLineNo">181</span>                throw new DimensionMismatchException(xvalI.length, dimension);<a name="line.181"></a>
+<span class="sourceLineNo">182</span>            }<a name="line.182"></a>
 <span class="sourceLineNo">183</span><a name="line.183"></a>
-<span class="sourceLineNo">184</span>        microsphere = new ArrayList&lt;MicrosphereSurfaceElement&gt;(microsphereElements);<a name="line.184"></a>
-<span class="sourceLineNo">185</span>        // Generate the microsphere, assuming that a fairly large number of<a name="line.185"></a>
-<span class="sourceLineNo">186</span>        // randomly generated normals will represent a sphere.<a name="line.186"></a>
-<span class="sourceLineNo">187</span>        for (int i = 0; i &lt; microsphereElements; i++) {<a name="line.187"></a>
-<span class="sourceLineNo">188</span>            microsphere.add(new MicrosphereSurfaceElement(rand.nextVector()));<a name="line.188"></a>
-<span class="sourceLineNo">189</span>        }<a name="line.189"></a>
-<span class="sourceLineNo">190</span>    }<a name="line.190"></a>
-<span class="sourceLineNo">191</span><a name="line.191"></a>
-<span class="sourceLineNo">192</span>    /**<a name="line.192"></a>
-<span class="sourceLineNo">193</span>     * @param point Interpolation point.<a name="line.193"></a>
-<span class="sourceLineNo">194</span>     * @return the interpolated value.<a name="line.194"></a>
-<span class="sourceLineNo">195</span>     * @throws DimensionMismatchException if point dimension does not math sample<a name="line.195"></a>
-<span class="sourceLineNo">196</span>     */<a name="line.196"></a>
-<span class="sourceLineNo">197</span>    public double value(double[] point) throws DimensionMismatchException {<a name="line.197"></a>
-<span class="sourceLineNo">198</span>        final RealVector p = new ArrayRealVector(point);<a name="line.198"></a>
-<span class="sourceLineNo">199</span><a name="line.199"></a>
-<span class="sourceLineNo">200</span>        // Reset.<a name="line.200"></a>
-<span class="sourceLineNo">201</span>        for (MicrosphereSurfaceElement md : microsphere) {<a name="line.201"></a>
-<span class="sourceLineNo">202</span>            md.reset();<a name="line.202"></a>
-<span class="sourceLineNo">203</span>        }<a name="line.203"></a>
-<span class="sourceLineNo">204</span><a name="line.204"></a>
-<span class="sourceLineNo">205</span>        // Compute contribution of each sample points to the microsphere elements illumination<a name="line.205"></a>
-<span class="sourceLineNo">206</span>        for (Map.Entry&lt;RealVector, Double&gt; sd : samples.entrySet()) {<a name="line.206"></a>
+<span class="sourceLineNo">184</span>            samples.put(new ArrayRealVector(xvalI), yval[i]);<a name="line.184"></a>
+<span class="sourceLineNo">185</span>        }<a name="line.185"></a>
+<span class="sourceLineNo">186</span><a name="line.186"></a>
+<span class="sourceLineNo">187</span>        microsphere = new ArrayList&lt;MicrosphereSurfaceElement&gt;(microsphereElements);<a name="line.187"></a>
+<span class="sourceLineNo">188</span>        // Generate the microsphere, assuming that a fairly large number of<a name="line.188"></a>
+<span class="sourceLineNo">189</span>        // randomly generated normals will represent a sphere.<a name="line.189"></a>
+<span class="sourceLineNo">190</span>        for (int i = 0; i &lt; microsphereElements; i++) {<a name="line.190"></a>
+<span class="sourceLineNo">191</span>            microsphere.add(new MicrosphereSurfaceElement(rand.nextVector()));<a name="line.191"></a>
+<span class="sourceLineNo">192</span>        }<a name="line.192"></a>
+<span class="sourceLineNo">193</span>    }<a name="line.193"></a>
+<span class="sourceLineNo">194</span><a name="line.194"></a>
+<span class="sourceLineNo">195</span>    /**<a name="line.195"></a>
+<span class="sourceLineNo">196</span>     * @param point Interpolation point.<a name="line.196"></a>
+<span class="sourceLineNo">197</span>     * @return the interpolated value.<a name="line.197"></a>
+<span class="sourceLineNo">198</span>     * @throws DimensionMismatchException if point dimension does not math sample<a name="line.198"></a>
+<span class="sourceLineNo">199</span>     */<a name="line.199"></a>
+<span class="sourceLineNo">200</span>    public double value(double[] point) throws DimensionMismatchException {<a name="line.200"></a>
+<span class="sourceLineNo">201</span>        final RealVector p = new ArrayRealVector(point);<a name="line.201"></a>
+<span class="sourceLineNo">202</span><a name="line.202"></a>
+<span class="sourceLineNo">203</span>        // Reset.<a name="line.203"></a>
+<span class="sourceLineNo">204</span>        for (MicrosphereSurfaceElement md : microsphere) {<a name="line.204"></a>
+<span class="sourceLineNo">205</span>            md.reset();<a name="line.205"></a>
+<span class="sourceLineNo">206</span>        }<a name="line.206"></a>
 <span class="sourceLineNo">207</span><a name="line.207"></a>
-<span class="sourceLineNo">208</span>            // Vector between interpolation point and current sample point.<a name="line.208"></a>
-<span class="sourceLineNo">209</span>            final RealVector diff = sd.getKey().subtract(p);<a name="line.209"></a>
-<span class="sourceLineNo">210</span>            final double diffNorm = diff.getNorm();<a name="line.210"></a>
-<span class="sourceLineNo">211</span><a name="line.211"></a>
-<span class="sourceLineNo">212</span>            if (FastMath.abs(diffNorm) &lt; FastMath.ulp(1d)) {<a name="line.212"></a>
-<span class="sourceLineNo">213</span>                // No need to interpolate, as the interpolation point is<a name="line.213"></a>
-<span class="sourceLineNo">214</span>                // actually (very close to) one of the sampled points.<a name="line.214"></a>
-<span class="sourceLineNo">215</span>                return sd.getValue();<a name="line.215"></a>
-<span class="sourceLineNo">216</span>            }<a name="line.216"></a>
-<span class="sourceLineNo">217</span><a name="line.217"></a>
-<span class="sourceLineNo">218</span>            for (MicrosphereSurfaceElement md : microsphere) {<a name="line.218"></a>
-<span class="sourceLineNo">219</span>                final double w = FastMath.pow(diffNorm, -brightnessExponent);<a name="line.219"></a>
-<span class="sourceLineNo">220</span>                md.store(cosAngle(diff, md.normal()) * w, sd);<a name="line.220"></a>
-<span class="sourceLineNo">221</span>            }<a name="line.221"></a>
-<span class="sourceLineNo">222</span><a name="line.222"></a>
-<span class="sourceLineNo">223</span>        }<a name="line.223"></a>
-<span class="sourceLineNo">224</span><a name="line.224"></a>
-<span class="sourceLineNo">225</span>        // Interpolation calculation.<a name="line.225"></a>
-<span class="sourceLineNo">226</span>        double value = 0;<a name="line.226"></a>
-<span class="sourceLineNo">227</span>        double totalWeight = 0;<a name="line.227"></a>
-<span class="sourceLineNo">228</span>        for (MicrosphereSurfaceElement md : microsphere) {<a name="line.228"></a>
-<span class="sourceLineNo">229</span>            final double iV = md.illumination();<a name="line.229"></a>
-<span class="sourceLineNo">230</span>            final Map.Entry&lt;RealVector, Double&gt; sd = md.sample();<a name="line.230"></a>
-<span class="sourceLineNo">231</span>            if (sd != null) {<a name="line.231"></a>
-<span class="sourceLineNo">232</span>                value += iV * sd.getValue();<a name="line.232"></a>
-<span class="sourceLineNo">233</span>                totalWeight += iV;<a name="line.233"></a>
-<span class="sourceLineNo">234</span>            }<a name="line.234"></a>
-<span class="sourceLineNo">235</span>        }<a name="line.235"></a>
-<span class="sourceLineNo">236</span><a name="line.236"></a>
-<span class="sourceLineNo">237</span>        return value / totalWeight;<a name="line.237"></a>
-<span class="sourceLineNo">238</span>    }<a name="line.238"></a>
+<span class="sourceLineNo">208</span>        // Compute contribution of each sample points to the microsphere elements illumination<a name="line.208"></a>
+<span class="sourceLineNo">209</span>        for (Map.Entry&lt;RealVector, Double&gt; sd : samples.entrySet()) {<a name="line.209"></a>
+<span class="sourceLineNo">210</span><a name="line.210"></a>
+<span class="sourceLineNo">211</span>            // Vector between interpolation point and current sample point.<a name="line.211"></a>
+<span class="sourceLineNo">212</span>            final RealVector diff = sd.getKey().subtract(p);<a name="line.212"></a>
+<span class="sourceLineNo">213</span>            final double diffNorm = diff.getNorm();<a name="line.213"></a>
+<span class="sourceLineNo">214</span><a name="line.214"></a>
+<span class="sourceLineNo">215</span>            if (FastMath.abs(diffNorm) &lt; FastMath.ulp(1d)) {<a name="line.215"></a>
+<span class="sourceLineNo">216</span>                // No need to interpolate, as the interpolation point is<a name="line.216"></a>
+<span class="sourceLineNo">217</span>                // actually (very close to) one of the sampled points.<a name="line.217"></a>
+<span class="sourceLineNo">218</span>                return sd.getValue();<a name="line.218"></a>
+<span class="sourceLineNo">219</span>            }<a name="line.219"></a>
+<span class="sourceLineNo">220</span><a name="line.220"></a>
+<span class="sourceLineNo">221</span>            for (MicrosphereSurfaceElement md : microsphere) {<a name="line.221"></a>
+<span class="sourceLineNo">222</span>                final double w = FastMath.pow(diffNorm, -brightnessExponent);<a name="line.222"></a>
+<span class="sourceLineNo">223</span>                md.store(cosAngle(diff, md.normal()) * w, sd);<a name="line.223"></a>
+<span class="sourceLineNo">224</span>            }<a name="line.224"></a>
+<span class="sourceLineNo">225</span><a name="line.225"></a>
+<span class="sourceLineNo">226</span>        }<a name="line.226"></a>
+<span class="sourceLineNo">227</span><a name="line.227"></a>
+<span class="sourceLineNo">228</span>        // Interpolation calculation.<a name="line.228"></a>
+<span class="sourceLineNo">229</span>        double value = 0;<a name="line.229"></a>
+<span class="sourceLineNo">230</span>        double totalWeight = 0;<a name="line.230"></a>
+<span class="sourceLineNo">231</span>        for (MicrosphereSurfaceElement md : microsphere) {<a name="line.231"></a>
+<span class="sourceLineNo">232</span>            final double iV = md.illumination();<a name="line.232"></a>
+<span class="sourceLineNo">233</span>            final Map.Entry&lt;RealVector, Double&gt; sd = md.sample();<a name="line.233"></a>
+<span class="sourceLineNo">234</span>            if (sd != null) {<a name="line.234"></a>
+<span class="sourceLineNo">235</span>                value += iV * sd.getValue();<a name="line.235"></a>
+<span class="sourceLineNo">236</span>                totalWeight += iV;<a name="line.236"></a>
+<span class="sourceLineNo">237</span>            }<a name="line.237"></a>
+<span class="sourceLineNo">238</span>        }<a name="line.238"></a>
 <span class="sourceLineNo">239</span><a name="line.239"></a>
-<span class="sourceLineNo">240</span>    /**<a name="line.240"></a>
-<span class="sourceLineNo">241</span>     * Compute the cosine of the angle between 2 vectors.<a name="line.241"></a>
-<span class="sourceLineNo">242</span>     *<a name="line.242"></a>
-<span class="sourceLineNo">243</span>     * @param v Vector.<a name="line.243"></a>
-<span class="sourceLineNo">244</span>     * @param w Vector.<a name="line.244"></a>
-<span class="sourceLineNo">245</span>     * @return the cosine of the angle between {@code v} and {@code w}.<a name="line.245"></a>
-<span class="sourceLineNo">246</span>     */<a name="line.246"></a>
-<span class="sourceLineNo">247</span>    private double cosAngle(final RealVector v, final RealVector w) {<a name="line.247"></a>
-<span class="sourceLineNo">248</span>        return v.dotProduct(w) / (v.getNorm() * w.getNorm());<a name="line.248"></a>
-<span class="sourceLineNo">249</span>    }<a name="line.249"></a>
-<span class="sourceLineNo">250</span>}<a name="line.250"></a>
+<span class="sourceLineNo">240</span>        return value / totalWeight;<a name="line.240"></a>
+<span class="sourceLineNo">241</span>    }<a name="line.241"></a>
+<span class="sourceLineNo">242</span><a name="line.242"></a>
+<span class="sourceLineNo">243</span>    /**<a name="line.243"></a>
+<span class="sourceLineNo">244</span>     * Compute the cosine of the angle between 2 vectors.<a name="line.244"></a>
+<span class="sourceLineNo">245</span>     *<a name="line.245"></a>
+<span class="sourceLineNo">246</span>     * @param v Vector.<a name="line.246"></a>
+<span class="sourceLineNo">247</span>     * @param w Vector.<a name="line.247"></a>
+<span class="sourceLineNo">248</span>     * @return the cosine of the angle between {@code v} and {@code w}.<a name="line.248"></a>
+<span class="sourceLineNo">249</span>     */<a name="line.249"></a>
+<span class="sourceLineNo">250</span>    private double cosAngle(final RealVector v, final RealVector w) {<a name="line.250"></a>
+<span class="sourceLineNo">251</span>        return v.dotProduct(w) / (v.getNorm() * w.getNorm());<a name="line.251"></a>
+<span class="sourceLineNo">252</span>    }<a name="line.252"></a>
+<span class="sourceLineNo">253</span>}<a name="line.253"></a>
 
 
 

Modified: websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolator.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolator.html (original)
+++ websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereInterpolator.html Fri Aug 14 19:12:42 2015
@@ -38,76 +38,79 @@
 <span class="sourceLineNo">030</span> * &lt;a href="http://www.dudziak.com/microsphere.pdf"&gt;MS thesis&lt;/a&gt;.<a name="line.30"></a>
 <span class="sourceLineNo">031</span> *<a name="line.31"></a>
 <span class="sourceLineNo">032</span> * @since 2.1<a name="line.32"></a>
-<span class="sourceLineNo">033</span> */<a name="line.33"></a>
-<span class="sourceLineNo">034</span>public class MicrosphereInterpolator<a name="line.34"></a>
-<span class="sourceLineNo">035</span>    implements MultivariateInterpolator {<a name="line.35"></a>
-<span class="sourceLineNo">036</span>    /**<a name="line.36"></a>
-<span class="sourceLineNo">037</span>     * Default number of surface elements that composes the microsphere.<a name="line.37"></a>
-<span class="sourceLineNo">038</span>     */<a name="line.38"></a>
-<span class="sourceLineNo">039</span>    public static final int DEFAULT_MICROSPHERE_ELEMENTS = 2000;<a name="line.39"></a>
-<span class="sourceLineNo">040</span>    /**<a name="line.40"></a>
-<span class="sourceLineNo">041</span>     * Default exponent used the weights calculation.<a name="line.41"></a>
-<span class="sourceLineNo">042</span>     */<a name="line.42"></a>
-<span class="sourceLineNo">043</span>    public static final int DEFAULT_BRIGHTNESS_EXPONENT = 2;<a name="line.43"></a>
-<span class="sourceLineNo">044</span>    /**<a name="line.44"></a>
-<span class="sourceLineNo">045</span>     * Number of surface elements of the microsphere.<a name="line.45"></a>
-<span class="sourceLineNo">046</span>     */<a name="line.46"></a>
-<span class="sourceLineNo">047</span>    private final int microsphereElements;<a name="line.47"></a>
-<span class="sourceLineNo">048</span>    /**<a name="line.48"></a>
-<span class="sourceLineNo">049</span>     * Exponent used in the power law that computes the weights of the<a name="line.49"></a>
-<span class="sourceLineNo">050</span>     * sample data.<a name="line.50"></a>
-<span class="sourceLineNo">051</span>     */<a name="line.51"></a>
-<span class="sourceLineNo">052</span>    private final int brightnessExponent;<a name="line.52"></a>
-<span class="sourceLineNo">053</span><a name="line.53"></a>
-<span class="sourceLineNo">054</span>    /**<a name="line.54"></a>
-<span class="sourceLineNo">055</span>     * Create a microsphere interpolator with default settings.<a name="line.55"></a>
-<span class="sourceLineNo">056</span>     * Calling this constructor is equivalent to call {@link<a name="line.56"></a>
-<span class="sourceLineNo">057</span>     * #MicrosphereInterpolator(int, int)<a name="line.57"></a>
-<span class="sourceLineNo">058</span>     * MicrosphereInterpolator(MicrosphereInterpolator.DEFAULT_MICROSPHERE_ELEMENTS,<a name="line.58"></a>
-<span class="sourceLineNo">059</span>     * MicrosphereInterpolator.DEFAULT_BRIGHTNESS_EXPONENT)}.<a name="line.59"></a>
-<span class="sourceLineNo">060</span>     */<a name="line.60"></a>
-<span class="sourceLineNo">061</span>    public MicrosphereInterpolator() {<a name="line.61"></a>
-<span class="sourceLineNo">062</span>        this(DEFAULT_MICROSPHERE_ELEMENTS, DEFAULT_BRIGHTNESS_EXPONENT);<a name="line.62"></a>
-<span class="sourceLineNo">063</span>    }<a name="line.63"></a>
-<span class="sourceLineNo">064</span><a name="line.64"></a>
-<span class="sourceLineNo">065</span>    /** Create a microsphere interpolator.<a name="line.65"></a>
-<span class="sourceLineNo">066</span>     * @param elements Number of surface elements of the microsphere.<a name="line.66"></a>
-<span class="sourceLineNo">067</span>     * @param exponent Exponent used in the power law that computes the<a name="line.67"></a>
-<span class="sourceLineNo">068</span>     * weights (distance dimming factor) of the sample data.<a name="line.68"></a>
-<span class="sourceLineNo">069</span>     * @throws NotPositiveException if {@code exponent &lt; 0}.<a name="line.69"></a>
-<span class="sourceLineNo">070</span>     * @throws NotStrictlyPositiveException if {@code elements &lt;= 0}.<a name="line.70"></a>
-<span class="sourceLineNo">071</span>     */<a name="line.71"></a>
-<span class="sourceLineNo">072</span>    public MicrosphereInterpolator(final int elements,<a name="line.72"></a>
-<span class="sourceLineNo">073</span>                                   final int exponent)<a name="line.73"></a>
-<span class="sourceLineNo">074</span>        throws NotPositiveException,<a name="line.74"></a>
-<span class="sourceLineNo">075</span>               NotStrictlyPositiveException {<a name="line.75"></a>
-<span class="sourceLineNo">076</span>        if (exponent &lt; 0) {<a name="line.76"></a>
-<span class="sourceLineNo">077</span>            throw new NotPositiveException(exponent);<a name="line.77"></a>
-<span class="sourceLineNo">078</span>        }<a name="line.78"></a>
-<span class="sourceLineNo">079</span>        if (elements &lt;= 0) {<a name="line.79"></a>
-<span class="sourceLineNo">080</span>            throw new NotStrictlyPositiveException(elements);<a name="line.80"></a>
+<span class="sourceLineNo">033</span> * @deprecated Code will be removed in 4.0.  Use {@link InterpolatingMicrosphere}<a name="line.33"></a>
+<span class="sourceLineNo">034</span> * and {@link MicrosphereProjectionInterpolator} instead.<a name="line.34"></a>
+<span class="sourceLineNo">035</span> */<a name="line.35"></a>
+<span class="sourceLineNo">036</span>@Deprecated<a name="line.36"></a>
+<span class="sourceLineNo">037</span>public class MicrosphereInterpolator<a name="line.37"></a>
+<span class="sourceLineNo">038</span>    implements MultivariateInterpolator {<a name="line.38"></a>
+<span class="sourceLineNo">039</span>    /**<a name="line.39"></a>
+<span class="sourceLineNo">040</span>     * Default number of surface elements that composes the microsphere.<a name="line.40"></a>
+<span class="sourceLineNo">041</span>     */<a name="line.41"></a>
+<span class="sourceLineNo">042</span>    public static final int DEFAULT_MICROSPHERE_ELEMENTS = 2000;<a name="line.42"></a>
+<span class="sourceLineNo">043</span>    /**<a name="line.43"></a>
+<span class="sourceLineNo">044</span>     * Default exponent used the weights calculation.<a name="line.44"></a>
+<span class="sourceLineNo">045</span>     */<a name="line.45"></a>
+<span class="sourceLineNo">046</span>    public static final int DEFAULT_BRIGHTNESS_EXPONENT = 2;<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    /**<a name="line.47"></a>
+<span class="sourceLineNo">048</span>     * Number of surface elements of the microsphere.<a name="line.48"></a>
+<span class="sourceLineNo">049</span>     */<a name="line.49"></a>
+<span class="sourceLineNo">050</span>    private final int microsphereElements;<a name="line.50"></a>
+<span class="sourceLineNo">051</span>    /**<a name="line.51"></a>
+<span class="sourceLineNo">052</span>     * Exponent used in the power law that computes the weights of the<a name="line.52"></a>
+<span class="sourceLineNo">053</span>     * sample data.<a name="line.53"></a>
+<span class="sourceLineNo">054</span>     */<a name="line.54"></a>
+<span class="sourceLineNo">055</span>    private final int brightnessExponent;<a name="line.55"></a>
+<span class="sourceLineNo">056</span><a name="line.56"></a>
+<span class="sourceLineNo">057</span>    /**<a name="line.57"></a>
+<span class="sourceLineNo">058</span>     * Create a microsphere interpolator with default settings.<a name="line.58"></a>
+<span class="sourceLineNo">059</span>     * Calling this constructor is equivalent to call {@link<a name="line.59"></a>
+<span class="sourceLineNo">060</span>     * #MicrosphereInterpolator(int, int)<a name="line.60"></a>
+<span class="sourceLineNo">061</span>     * MicrosphereInterpolator(MicrosphereInterpolator.DEFAULT_MICROSPHERE_ELEMENTS,<a name="line.61"></a>
+<span class="sourceLineNo">062</span>     * MicrosphereInterpolator.DEFAULT_BRIGHTNESS_EXPONENT)}.<a name="line.62"></a>
+<span class="sourceLineNo">063</span>     */<a name="line.63"></a>
+<span class="sourceLineNo">064</span>    public MicrosphereInterpolator() {<a name="line.64"></a>
+<span class="sourceLineNo">065</span>        this(DEFAULT_MICROSPHERE_ELEMENTS, DEFAULT_BRIGHTNESS_EXPONENT);<a name="line.65"></a>
+<span class="sourceLineNo">066</span>    }<a name="line.66"></a>
+<span class="sourceLineNo">067</span><a name="line.67"></a>
+<span class="sourceLineNo">068</span>    /** Create a microsphere interpolator.<a name="line.68"></a>
+<span class="sourceLineNo">069</span>     * @param elements Number of surface elements of the microsphere.<a name="line.69"></a>
+<span class="sourceLineNo">070</span>     * @param exponent Exponent used in the power law that computes the<a name="line.70"></a>
+<span class="sourceLineNo">071</span>     * weights (distance dimming factor) of the sample data.<a name="line.71"></a>
+<span class="sourceLineNo">072</span>     * @throws NotPositiveException if {@code exponent &lt; 0}.<a name="line.72"></a>
+<span class="sourceLineNo">073</span>     * @throws NotStrictlyPositiveException if {@code elements &lt;= 0}.<a name="line.73"></a>
+<span class="sourceLineNo">074</span>     */<a name="line.74"></a>
+<span class="sourceLineNo">075</span>    public MicrosphereInterpolator(final int elements,<a name="line.75"></a>
+<span class="sourceLineNo">076</span>                                   final int exponent)<a name="line.76"></a>
+<span class="sourceLineNo">077</span>        throws NotPositiveException,<a name="line.77"></a>
+<span class="sourceLineNo">078</span>               NotStrictlyPositiveException {<a name="line.78"></a>
+<span class="sourceLineNo">079</span>        if (exponent &lt; 0) {<a name="line.79"></a>
+<span class="sourceLineNo">080</span>            throw new NotPositiveException(exponent);<a name="line.80"></a>
 <span class="sourceLineNo">081</span>        }<a name="line.81"></a>
-<span class="sourceLineNo">082</span><a name="line.82"></a>
-<span class="sourceLineNo">083</span>        microsphereElements = elements;<a name="line.83"></a>
-<span class="sourceLineNo">084</span>        brightnessExponent = exponent;<a name="line.84"></a>
-<span class="sourceLineNo">085</span>    }<a name="line.85"></a>
-<span class="sourceLineNo">086</span><a name="line.86"></a>
-<span class="sourceLineNo">087</span>    /**<a name="line.87"></a>
-<span class="sourceLineNo">088</span>     * {@inheritDoc}<a name="line.88"></a>
-<span class="sourceLineNo">089</span>     */<a name="line.89"></a>
-<span class="sourceLineNo">090</span>    public MultivariateFunction interpolate(final double[][] xval,<a name="line.90"></a>
-<span class="sourceLineNo">091</span>                                            final double[] yval)<a name="line.91"></a>
-<span class="sourceLineNo">092</span>        throws DimensionMismatchException,<a name="line.92"></a>
-<span class="sourceLineNo">093</span>               NoDataException,<a name="line.93"></a>
-<span class="sourceLineNo">094</span>               NullArgumentException {<a name="line.94"></a>
-<span class="sourceLineNo">095</span>        final UnitSphereRandomVectorGenerator rand<a name="line.95"></a>
-<span class="sourceLineNo">096</span>            = new UnitSphereRandomVectorGenerator(xval[0].length);<a name="line.96"></a>
-<span class="sourceLineNo">097</span>        return new MicrosphereInterpolatingFunction(xval, yval,<a name="line.97"></a>
-<span class="sourceLineNo">098</span>                                                    brightnessExponent,<a name="line.98"></a>
-<span class="sourceLineNo">099</span>                                                    microsphereElements,<a name="line.99"></a>
-<span class="sourceLineNo">100</span>                                                    rand);<a name="line.100"></a>
-<span class="sourceLineNo">101</span>    }<a name="line.101"></a>
-<span class="sourceLineNo">102</span>}<a name="line.102"></a>
+<span class="sourceLineNo">082</span>        if (elements &lt;= 0) {<a name="line.82"></a>
+<span class="sourceLineNo">083</span>            throw new NotStrictlyPositiveException(elements);<a name="line.83"></a>
+<span class="sourceLineNo">084</span>        }<a name="line.84"></a>
+<span class="sourceLineNo">085</span><a name="line.85"></a>
+<span class="sourceLineNo">086</span>        microsphereElements = elements;<a name="line.86"></a>
+<span class="sourceLineNo">087</span>        brightnessExponent = exponent;<a name="line.87"></a>
+<span class="sourceLineNo">088</span>    }<a name="line.88"></a>
+<span class="sourceLineNo">089</span><a name="line.89"></a>
+<span class="sourceLineNo">090</span>    /**<a name="line.90"></a>
+<span class="sourceLineNo">091</span>     * {@inheritDoc}<a name="line.91"></a>
+<span class="sourceLineNo">092</span>     */<a name="line.92"></a>
+<span class="sourceLineNo">093</span>    public MultivariateFunction interpolate(final double[][] xval,<a name="line.93"></a>
+<span class="sourceLineNo">094</span>                                            final double[] yval)<a name="line.94"></a>
+<span class="sourceLineNo">095</span>        throws DimensionMismatchException,<a name="line.95"></a>
+<span class="sourceLineNo">096</span>               NoDataException,<a name="line.96"></a>
+<span class="sourceLineNo">097</span>               NullArgumentException {<a name="line.97"></a>
+<span class="sourceLineNo">098</span>        final UnitSphereRandomVectorGenerator rand<a name="line.98"></a>
+<span class="sourceLineNo">099</span>            = new UnitSphereRandomVectorGenerator(xval[0].length);<a name="line.99"></a>
+<span class="sourceLineNo">100</span>        return new MicrosphereInterpolatingFunction(xval, yval,<a name="line.100"></a>
+<span class="sourceLineNo">101</span>                                                    brightnessExponent,<a name="line.101"></a>
+<span class="sourceLineNo">102</span>                                                    microsphereElements,<a name="line.102"></a>
+<span class="sourceLineNo">103</span>                                                    rand);<a name="line.103"></a>
+<span class="sourceLineNo">104</span>    }<a name="line.104"></a>
+<span class="sourceLineNo">105</span>}<a name="line.105"></a>
 
 
 

Added: websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereProjectionInterpolator.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereProjectionInterpolator.html (added)
+++ websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereProjectionInterpolator.html Fri Aug 14 19:12:42 2015
@@ -0,0 +1,238 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>/*<a name="line.1"></a>
+<span class="sourceLineNo">002</span> * Licensed to the Apache Software Foundation (ASF) under one or more<a name="line.2"></a>
+<span class="sourceLineNo">003</span> * contributor license agreements.  See the NOTICE file distributed with<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * this work for additional information regarding copyright ownership.<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * The ASF licenses this file to You under the Apache License, Version 2.0<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * (the "License"); you may not use this file except in compliance with<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * the License.  You may obtain a copy of the License at<a name="line.7"></a>
+<span class="sourceLineNo">008</span> *<a name="line.8"></a>
+<span class="sourceLineNo">009</span> *      http://www.apache.org/licenses/LICENSE-2.0<a name="line.9"></a>
+<span class="sourceLineNo">010</span> *<a name="line.10"></a>
+<span class="sourceLineNo">011</span> * Unless required by applicable law or agreed to in writing, software<a name="line.11"></a>
+<span class="sourceLineNo">012</span> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.12"></a>
+<span class="sourceLineNo">013</span> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * See the License for the specific language governing permissions and<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * limitations under the License.<a name="line.15"></a>
+<span class="sourceLineNo">016</span> */<a name="line.16"></a>
+<span class="sourceLineNo">017</span>package org.apache.commons.math3.analysis.interpolation;<a name="line.17"></a>
+<span class="sourceLineNo">018</span><a name="line.18"></a>
+<span class="sourceLineNo">019</span>import org.apache.commons.math3.analysis.MultivariateFunction;<a name="line.19"></a>
+<span class="sourceLineNo">020</span>import org.apache.commons.math3.exception.DimensionMismatchException;<a name="line.20"></a>
+<span class="sourceLineNo">021</span>import org.apache.commons.math3.exception.NoDataException;<a name="line.21"></a>
+<span class="sourceLineNo">022</span>import org.apache.commons.math3.exception.NotPositiveException;<a name="line.22"></a>
+<span class="sourceLineNo">023</span>import org.apache.commons.math3.exception.NullArgumentException;<a name="line.23"></a>
+<span class="sourceLineNo">024</span>import org.apache.commons.math3.random.UnitSphereRandomVectorGenerator;<a name="line.24"></a>
+<span class="sourceLineNo">025</span><a name="line.25"></a>
+<span class="sourceLineNo">026</span>/**<a name="line.26"></a>
+<span class="sourceLineNo">027</span> * Interpolator that implements the algorithm described in<a name="line.27"></a>
+<span class="sourceLineNo">028</span> * &lt;em&gt;William Dudziak&lt;/em&gt;'s<a name="line.28"></a>
+<span class="sourceLineNo">029</span> * &lt;a href="http://www.dudziak.com/microsphere.pdf"&gt;MS thesis&lt;/a&gt;.<a name="line.29"></a>
+<span class="sourceLineNo">030</span> *<a name="line.30"></a>
+<span class="sourceLineNo">031</span> * @since 3.6<a name="line.31"></a>
+<span class="sourceLineNo">032</span> */<a name="line.32"></a>
+<span class="sourceLineNo">033</span>public class MicrosphereProjectionInterpolator<a name="line.33"></a>
+<span class="sourceLineNo">034</span>    implements MultivariateInterpolator {<a name="line.34"></a>
+<span class="sourceLineNo">035</span>    /** Brightness exponent. */<a name="line.35"></a>
+<span class="sourceLineNo">036</span>    private final double exponent;<a name="line.36"></a>
+<span class="sourceLineNo">037</span>    /** Microsphere. */<a name="line.37"></a>
+<span class="sourceLineNo">038</span>    private final InterpolatingMicrosphere microsphere;<a name="line.38"></a>
+<span class="sourceLineNo">039</span>    /** Whether to share the sphere. */<a name="line.39"></a>
+<span class="sourceLineNo">040</span>    private final boolean sharedSphere;<a name="line.40"></a>
+<span class="sourceLineNo">041</span>    /** Tolerance value below which no interpolation is necessary. */<a name="line.41"></a>
+<span class="sourceLineNo">042</span>    private final double noInterpolationTolerance;<a name="line.42"></a>
+<span class="sourceLineNo">043</span><a name="line.43"></a>
+<span class="sourceLineNo">044</span>    /**<a name="line.44"></a>
+<span class="sourceLineNo">045</span>     * Create a microsphere interpolator.<a name="line.45"></a>
+<span class="sourceLineNo">046</span>     *<a name="line.46"></a>
+<span class="sourceLineNo">047</span>     * @param dimension Space dimension.<a name="line.47"></a>
+<span class="sourceLineNo">048</span>     * @param elements Number of surface elements of the microsphere.<a name="line.48"></a>
+<span class="sourceLineNo">049</span>     * @param exponent Exponent used in the power law that computes the<a name="line.49"></a>
+<span class="sourceLineNo">050</span>     * @param maxDarkFraction Maximum fraction of the facets that can be dark.<a name="line.50"></a>
+<span class="sourceLineNo">051</span>     * If the fraction of "non-illuminated" facets is larger, no estimation<a name="line.51"></a>
+<span class="sourceLineNo">052</span>     * of the value will be performed, and the {@code background} value will<a name="line.52"></a>
+<span class="sourceLineNo">053</span>     * be returned instead.<a name="line.53"></a>
+<span class="sourceLineNo">054</span>     * @param darkThreshold Value of the illumination below which a facet is<a name="line.54"></a>
+<span class="sourceLineNo">055</span>     * considered dark.<a name="line.55"></a>
+<span class="sourceLineNo">056</span>     * @param background Value returned when the {@code maxDarkFraction}<a name="line.56"></a>
+<span class="sourceLineNo">057</span>     * threshold is exceeded.<a name="line.57"></a>
+<span class="sourceLineNo">058</span>     * @param sharedSphere Whether the sphere can be shared among the<a name="line.58"></a>
+<span class="sourceLineNo">059</span>     * interpolating function instances.  If {@code true}, the instances<a name="line.59"></a>
+<span class="sourceLineNo">060</span>     * will share the same data, and thus will &lt;em&gt;not&lt;/em&gt; be thread-safe.<a name="line.60"></a>
+<span class="sourceLineNo">061</span>     * @param noInterpolationTolerance When the distance between an<a name="line.61"></a>
+<span class="sourceLineNo">062</span>     * interpolated point and one of the sample points is less than this<a name="line.62"></a>
+<span class="sourceLineNo">063</span>     * value, no interpolation will be performed (the value of the sample<a name="line.63"></a>
+<span class="sourceLineNo">064</span>     * will be returned).<a name="line.64"></a>
+<span class="sourceLineNo">065</span>     * @throws org.apache.commons.math3.exception.NotStrictlyPositiveException<a name="line.65"></a>
+<span class="sourceLineNo">066</span>     * if {@code dimension &lt;= 0} or {@code elements &lt;= 0}.<a name="line.66"></a>
+<span class="sourceLineNo">067</span>     * @throws NotPositiveException if {@code exponent &lt; 0}.<a name="line.67"></a>
+<span class="sourceLineNo">068</span>     * @throws NotPositiveException if {@code darkThreshold &lt; 0}.<a name="line.68"></a>
+<span class="sourceLineNo">069</span>     * @throws org.apache.commons.math3.exception.OutOfRangeException if<a name="line.69"></a>
+<span class="sourceLineNo">070</span>     * {@code maxDarkFraction} does not belong to the interval {@code [0, 1]}.<a name="line.70"></a>
+<span class="sourceLineNo">071</span>     */<a name="line.71"></a>
+<span class="sourceLineNo">072</span>    public MicrosphereProjectionInterpolator(int dimension,<a name="line.72"></a>
+<span class="sourceLineNo">073</span>                                             int elements,<a name="line.73"></a>
+<span class="sourceLineNo">074</span>                                             double maxDarkFraction,<a name="line.74"></a>
+<span class="sourceLineNo">075</span>                                             double darkThreshold,<a name="line.75"></a>
+<span class="sourceLineNo">076</span>                                             double background,<a name="line.76"></a>
+<span class="sourceLineNo">077</span>                                             double exponent,<a name="line.77"></a>
+<span class="sourceLineNo">078</span>                                             boolean sharedSphere,<a name="line.78"></a>
+<span class="sourceLineNo">079</span>                                             double noInterpolationTolerance) {<a name="line.79"></a>
+<span class="sourceLineNo">080</span>        this(new InterpolatingMicrosphere(dimension,<a name="line.80"></a>
+<span class="sourceLineNo">081</span>                                          elements,<a name="line.81"></a>
+<span class="sourceLineNo">082</span>                                          maxDarkFraction,<a name="line.82"></a>
+<span class="sourceLineNo">083</span>                                          darkThreshold,<a name="line.83"></a>
+<span class="sourceLineNo">084</span>                                          background,<a name="line.84"></a>
+<span class="sourceLineNo">085</span>                                          new UnitSphereRandomVectorGenerator(dimension)),<a name="line.85"></a>
+<span class="sourceLineNo">086</span>             exponent,<a name="line.86"></a>
+<span class="sourceLineNo">087</span>             sharedSphere,<a name="line.87"></a>
+<span class="sourceLineNo">088</span>             noInterpolationTolerance);<a name="line.88"></a>
+<span class="sourceLineNo">089</span>    }<a name="line.89"></a>
+<span class="sourceLineNo">090</span><a name="line.90"></a>
+<span class="sourceLineNo">091</span>    /**<a name="line.91"></a>
+<span class="sourceLineNo">092</span>     * Create a microsphere interpolator.<a name="line.92"></a>
+<span class="sourceLineNo">093</span>     *<a name="line.93"></a>
+<span class="sourceLineNo">094</span>     * @param microsphere Microsphere.<a name="line.94"></a>
+<span class="sourceLineNo">095</span>     * @param exponent Exponent used in the power law that computes the<a name="line.95"></a>
+<span class="sourceLineNo">096</span>     * weights (distance dimming factor) of the sample data.<a name="line.96"></a>
+<span class="sourceLineNo">097</span>     * @param sharedSphere Whether the sphere can be shared among the<a name="line.97"></a>
+<span class="sourceLineNo">098</span>     * interpolating function instances.  If {@code true}, the instances<a name="line.98"></a>
+<span class="sourceLineNo">099</span>     * will share the same data, and thus will &lt;em&gt;not&lt;/em&gt; be thread-safe.<a name="line.99"></a>
+<span class="sourceLineNo">100</span>     * @param noInterpolationTolerance When the distance between an<a name="line.100"></a>
+<span class="sourceLineNo">101</span>     * interpolated point and one of the sample points is less than this<a name="line.101"></a>
+<span class="sourceLineNo">102</span>     * value, no interpolation will be performed (the value of the sample<a name="line.102"></a>
+<span class="sourceLineNo">103</span>     * will be returned).<a name="line.103"></a>
+<span class="sourceLineNo">104</span>     * @throws NotPositiveException if {@code exponent &lt; 0}.<a name="line.104"></a>
+<span class="sourceLineNo">105</span>     */<a name="line.105"></a>
+<span class="sourceLineNo">106</span>    public MicrosphereProjectionInterpolator(InterpolatingMicrosphere microsphere,<a name="line.106"></a>
+<span class="sourceLineNo">107</span>                                             double exponent,<a name="line.107"></a>
+<span class="sourceLineNo">108</span>                                             boolean sharedSphere,<a name="line.108"></a>
+<span class="sourceLineNo">109</span>                                             double noInterpolationTolerance)<a name="line.109"></a>
+<span class="sourceLineNo">110</span>        throws NotPositiveException {<a name="line.110"></a>
+<span class="sourceLineNo">111</span>        if (exponent &lt; 0) {<a name="line.111"></a>
+<span class="sourceLineNo">112</span>            throw new NotPositiveException(exponent);<a name="line.112"></a>
+<span class="sourceLineNo">113</span>        }<a name="line.113"></a>
+<span class="sourceLineNo">114</span><a name="line.114"></a>
+<span class="sourceLineNo">115</span>        this.microsphere = microsphere;<a name="line.115"></a>
+<span class="sourceLineNo">116</span>        this.exponent = exponent;<a name="line.116"></a>
+<span class="sourceLineNo">117</span>        this.sharedSphere = sharedSphere;<a name="line.117"></a>
+<span class="sourceLineNo">118</span>        this.noInterpolationTolerance = noInterpolationTolerance;<a name="line.118"></a>
+<span class="sourceLineNo">119</span>    }<a name="line.119"></a>
+<span class="sourceLineNo">120</span><a name="line.120"></a>
+<span class="sourceLineNo">121</span>    /**<a name="line.121"></a>
+<span class="sourceLineNo">122</span>     * {@inheritDoc}<a name="line.122"></a>
+<span class="sourceLineNo">123</span>     *<a name="line.123"></a>
+<span class="sourceLineNo">124</span>     * @throws DimensionMismatchException if the space dimension of the<a name="line.124"></a>
+<span class="sourceLineNo">125</span>     * given samples does not match the space dimension of the microsphere.<a name="line.125"></a>
+<span class="sourceLineNo">126</span>     */<a name="line.126"></a>
+<span class="sourceLineNo">127</span>    @Override<a name="line.127"></a>
+<span class="sourceLineNo">128</span>    public MultivariateFunction interpolate(final double[][] xval,<a name="line.128"></a>
+<span class="sourceLineNo">129</span>                                            final double[] yval)<a name="line.129"></a>
+<span class="sourceLineNo">130</span>        throws DimensionMismatchException,<a name="line.130"></a>
+<span class="sourceLineNo">131</span>               NoDataException,<a name="line.131"></a>
+<span class="sourceLineNo">132</span>               NullArgumentException {<a name="line.132"></a>
+<span class="sourceLineNo">133</span>        if (xval == null ||<a name="line.133"></a>
+<span class="sourceLineNo">134</span>            yval == null) {<a name="line.134"></a>
+<span class="sourceLineNo">135</span>            throw new NullArgumentException();<a name="line.135"></a>
+<span class="sourceLineNo">136</span>        }<a name="line.136"></a>
+<span class="sourceLineNo">137</span>        if (xval.length == 0) {<a name="line.137"></a>
+<span class="sourceLineNo">138</span>            throw new NoDataException();<a name="line.138"></a>
+<span class="sourceLineNo">139</span>        }<a name="line.139"></a>
+<span class="sourceLineNo">140</span>        if (xval.length != yval.length) {<a name="line.140"></a>
+<span class="sourceLineNo">141</span>            throw new DimensionMismatchException(xval.length, yval.length);<a name="line.141"></a>
+<span class="sourceLineNo">142</span>        }<a name="line.142"></a>
+<span class="sourceLineNo">143</span>        if (xval[0] == null) {<a name="line.143"></a>
+<span class="sourceLineNo">144</span>            throw new NullArgumentException();<a name="line.144"></a>
+<span class="sourceLineNo">145</span>        }<a name="line.145"></a>
+<span class="sourceLineNo">146</span>        final int dimension = microsphere.getDimension();<a name="line.146"></a>
+<span class="sourceLineNo">147</span>        if (dimension != xval[0].length) {<a name="line.147"></a>
+<span class="sourceLineNo">148</span>            throw new DimensionMismatchException(xval[0].length, dimension);<a name="line.148"></a>
+<span class="sourceLineNo">149</span>        }<a name="line.149"></a>
+<span class="sourceLineNo">150</span><a name="line.150"></a>
+<span class="sourceLineNo">151</span>        // Microsphere copy.<a name="line.151"></a>
+<span class="sourceLineNo">152</span>        final InterpolatingMicrosphere m = sharedSphere ? microsphere : microsphere.copy();<a name="line.152"></a>
+<span class="sourceLineNo">153</span><a name="line.153"></a>
+<span class="sourceLineNo">154</span>        return new MultivariateFunction() {<a name="line.154"></a>
+<span class="sourceLineNo">155</span>            /** {inheritDoc} */<a name="line.155"></a>
+<span class="sourceLineNo">156</span>            @Override<a name="line.156"></a>
+<span class="sourceLineNo">157</span>            public double value(double[] point) {<a name="line.157"></a>
+<span class="sourceLineNo">158</span>                return m.value(point,<a name="line.158"></a>
+<span class="sourceLineNo">159</span>                               xval,<a name="line.159"></a>
+<span class="sourceLineNo">160</span>                               yval,<a name="line.160"></a>
+<span class="sourceLineNo">161</span>                               exponent,<a name="line.161"></a>
+<span class="sourceLineNo">162</span>                               noInterpolationTolerance);<a name="line.162"></a>
+<span class="sourceLineNo">163</span>            }<a name="line.163"></a>
+<span class="sourceLineNo">164</span>        };<a name="line.164"></a>
+<span class="sourceLineNo">165</span>    }<a name="line.165"></a>
+<span class="sourceLineNo">166</span>}<a name="line.166"></a>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</pre>
+</div>
+</body>
+</html>

Propchange: websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereProjectionInterpolator.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/analysis/interpolation/MicrosphereProjectionInterpolator.html
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/ml/neuralnet/sofm/KohonenUpdateAction.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/ml/neuralnet/sofm/KohonenUpdateAction.html (original)
+++ websites/production/commons/content/proper/commons-math/apidocs/src-html/org/apache/commons/math3/ml/neuralnet/sofm/KohonenUpdateAction.html Fri Aug 14 19:12:42 2015
@@ -115,7 +115,7 @@
 <span class="sourceLineNo">107</span>        final Gaussian neighbourhoodDecay<a name="line.107"></a>
 <span class="sourceLineNo">108</span>            = new Gaussian(currentLearning,<a name="line.108"></a>
 <span class="sourceLineNo">109</span>                           0,<a name="line.109"></a>
-<span class="sourceLineNo">110</span>                           1d / currentNeighbourhood);<a name="line.110"></a>
+<span class="sourceLineNo">110</span>                           currentNeighbourhood);<a name="line.110"></a>
 <span class="sourceLineNo">111</span><a name="line.111"></a>
 <span class="sourceLineNo">112</span>        if (currentNeighbourhood &gt; 0) {<a name="line.112"></a>
 <span class="sourceLineNo">113</span>            // Initial set of neurons only contains the winning neuron.<a name="line.113"></a>



Mime
View raw message