http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/01/018a0a37eb50756c7f1d6da7dd5ce005fee54cd3.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/018a0a37eb50756c7f1d6da7dd5ce005fee54cd3.svn-base b/site-content/.svn/pristine/01/018a0a37eb50756c7f1d6da7dd5ce005fee54cd3.svn-base deleted file mode 100644 index a027517..0000000 --- a/site-content/.svn/pristine/01/018a0a37eb50756c7f1d6da7dd5ce005fee54cd3.svn-base +++ /dev/null @@ -1,160 +0,0 @@ -<!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.geometry.spherical.twod;<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.exception.OutOfRangeException;<a name="line.19"></a> -<span class="sourceLineNo">020</span>import org.apache.commons.math3.geometry.spherical.oned.Sphere1D;<a name="line.20"></a> -<span class="sourceLineNo">021</span>import org.apache.commons.math3.util.FastMath;<a name="line.21"></a> -<span class="sourceLineNo">022</span>import org.apache.commons.math3.util.MathUtils;<a name="line.22"></a> -<span class="sourceLineNo">023</span>import org.junit.Assert;<a name="line.23"></a> -<span class="sourceLineNo">024</span>import org.junit.Test;<a name="line.24"></a> -<span class="sourceLineNo">025</span><a name="line.25"></a> -<span class="sourceLineNo">026</span>public class S2PointTest {<a name="line.26"></a> -<span class="sourceLineNo">027</span><a name="line.27"></a> -<span class="sourceLineNo">028</span><a name="line.28"></a> -<span class="sourceLineNo">029</span> @Test<a name="line.29"></a> -<span class="sourceLineNo">030</span> public void testS2Point() {<a name="line.30"></a> -<span class="sourceLineNo">031</span> for (int k = -2; k < 3; ++k) {<a name="line.31"></a> -<span class="sourceLineNo">032</span> S2Point p = new S2Point(1.0 + k * MathUtils.TWO_PI, 1.4);<a name="line.32"></a> -<span class="sourceLineNo">033</span> Assert.assertEquals(1.0 + k * MathUtils.TWO_PI, p.getTheta(), 1.0e-10);<a name="line.33"></a> -<span class="sourceLineNo">034</span> Assert.assertEquals(1.4, p.getPhi(), 1.0e-10);<a name="line.34"></a> -<span class="sourceLineNo">035</span> Assert.assertEquals(FastMath.cos(1.0) * FastMath.sin(1.4), p.getVector().getX(), 1.0e-10);<a name="line.35"></a> -<span class="sourceLineNo">036</span> Assert.assertEquals(FastMath.sin(1.0) * FastMath.sin(1.4), p.getVector().getY(), 1.0e-10);<a name="line.36"></a> -<span class="sourceLineNo">037</span> Assert.assertEquals(FastMath.cos(1.4), p.getVector().getZ(), 1.0e-10);<a name="line.37"></a> -<span class="sourceLineNo">038</span> Assert.assertFalse(p.isNaN());<a name="line.38"></a> -<span class="sourceLineNo">039</span> }<a name="line.39"></a> -<span class="sourceLineNo">040</span> }<a name="line.40"></a> -<span class="sourceLineNo">041</span><a name="line.41"></a> -<span class="sourceLineNo">042</span> @Test(expected=OutOfRangeException.class)<a name="line.42"></a> -<span class="sourceLineNo">043</span> public void testNegativePolarAngle() {<a name="line.43"></a> -<span class="sourceLineNo">044</span> new S2Point(1.0, -1.0);<a name="line.44"></a> -<span class="sourceLineNo">045</span> }<a name="line.45"></a> -<span class="sourceLineNo">046</span><a name="line.46"></a> -<span class="sourceLineNo">047</span> @Test(expected=OutOfRangeException.class)<a name="line.47"></a> -<span class="sourceLineNo">048</span> public void testTooLargePolarAngle() {<a name="line.48"></a> -<span class="sourceLineNo">049</span> new S2Point(1.0, 3.5);<a name="line.49"></a> -<span class="sourceLineNo">050</span> }<a name="line.50"></a> -<span class="sourceLineNo">051</span><a name="line.51"></a> -<span class="sourceLineNo">052</span> @Test<a name="line.52"></a> -<span class="sourceLineNo">053</span> public void testNaN() {<a name="line.53"></a> -<span class="sourceLineNo">054</span> Assert.assertTrue(S2Point.NaN.isNaN());<a name="line.54"></a> -<span class="sourceLineNo">055</span> Assert.assertTrue(S2Point.NaN.equals(new S2Point(Double.NaN, 1.0)));<a name="line.55"></a> -<span class="sourceLineNo">056</span> Assert.assertFalse(new S2Point(1.0, 1.3).equals(S2Point.NaN));<a name="line.56"></a> -<span class="sourceLineNo">057</span> }<a name="line.57"></a> -<span class="sourceLineNo">058</span><a name="line.58"></a> -<span class="sourceLineNo">059</span> @Test<a name="line.59"></a> -<span class="sourceLineNo">060</span> public void testEquals() {<a name="line.60"></a> -<span class="sourceLineNo">061</span> S2Point a = new S2Point(1.0, 1.0);<a name="line.61"></a> -<span class="sourceLineNo">062</span> S2Point b = new S2Point(1.0, 1.0);<a name="line.62"></a> -<span class="sourceLineNo">063</span> Assert.assertEquals(a.hashCode(), b.hashCode());<a name="line.63"></a> -<span class="sourceLineNo">064</span> Assert.assertFalse(a == b);<a name="line.64"></a> -<span class="sourceLineNo">065</span> Assert.assertTrue(a.equals(b));<a name="line.65"></a> -<span class="sourceLineNo">066</span> Assert.assertTrue(a.equals(a));<a name="line.66"></a> -<span class="sourceLineNo">067</span> Assert.assertFalse(a.equals('a'));<a name="line.67"></a> -<span class="sourceLineNo">068</span> }<a name="line.68"></a> -<span class="sourceLineNo">069</span><a name="line.69"></a> -<span class="sourceLineNo">070</span> @Test<a name="line.70"></a> -<span class="sourceLineNo">071</span> public void testDistance() {<a name="line.71"></a> -<span class="sourceLineNo">072</span> S2Point a = new S2Point(1.0, 0.5 * FastMath.PI);<a name="line.72"></a> -<span class="sourceLineNo">073</span> S2Point b = new S2Point(a.getTheta() + 0.5 * FastMath.PI, a.getPhi());<a name="line.73"></a> -<span class="sourceLineNo">074</span> Assert.assertEquals(0.5 * FastMath.PI, a.distance(b), 1.0e-10);<a name="line.74"></a> -<span class="sourceLineNo">075</span> Assert.assertEquals(FastMath.PI, a.distance(a.negate()), 1.0e-10);<a name="line.75"></a> -<span class="sourceLineNo">076</span> Assert.assertEquals(0.5 * FastMath.PI, S2Point.MINUS_I.distance(S2Point.MINUS_K), 1.0e-10);<a name="line.76"></a> -<span class="sourceLineNo">077</span> Assert.assertEquals(0.0, new S2Point(1.0, 0).distance(new S2Point(2.0, 0)), 1.0e-10);<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> @Test<a name="line.80"></a> -<span class="sourceLineNo">081</span> public void testSpace() {<a name="line.81"></a> -<span class="sourceLineNo">082</span> S2Point a = new S2Point(1.0, 1.0);<a name="line.82"></a> -<span class="sourceLineNo">083</span> Assert.assertTrue(a.getSpace() instanceof Sphere2D);<a name="line.83"></a> -<span class="sourceLineNo">084</span> Assert.assertEquals(2, a.getSpace().getDimension());<a name="line.84"></a> -<span class="sourceLineNo">085</span> Assert.assertTrue(a.getSpace().getSubSpace() instanceof Sphere1D);<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> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</pre> -</div> -</body> -</html>
http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/01/018bea896908441d874252ea5ccda6d39cb8eb6b.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/018bea896908441d874252ea5ccda6d39cb8eb6b.svn-base b/site-content/.svn/pristine/01/018bea896908441d874252ea5ccda6d39cb8eb6b.svn-base deleted file mode 100644 index 46b3f5d..0000000 --- a/site-content/.svn/pristine/01/018bea896908441d874252ea5ccda6d39cb8eb6b.svn-base +++ /dev/null @@ -1,379 +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>RegionFactory.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> > <a href="index.source.html" class="el_package">org.apache.commons.math3.geometry.partitioning</a> > <span class="el_source">RegionFactory .java</span></div><h1>RegionFactory.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 "License"); 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 "AS IS" 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.geometry.partitioning; - -import java.util.HashMap; -import java.util.Map; - -import org.apache.commons.math3.exception.MathIllegalArgumentException; -import org.apache.commons.math3.exception.util.LocalizedFormats; -import org.apache.commons.math3.geometry.Point; -import org.apache.commons.math3.geometry.Space; -import org.apache.commons.math3.geometry.partitioning.BSPTree.VanishingCutHandler; -import org.apache.commons.math3.geometry.partitioning.Region.Location; -import org.apache.commons.math3.geometry.partitioning.SubHyperplane.SplitSubHyperplane; - -/** This class is a factory for {@link Region}. - - * @param <S> Type of the space. - - * @since 3.0 - */ -public class RegionFactory<S extends Space> { - - /** Visitor removing internal nodes attributes. */ - private final NodesCleaner nodeCleaner; - - /** Simple constructor. - */ -<span class="fc" id="L43"> public RegionFactory() {</span> -<span class="fc" id="L44"> nodeCleaner = new NodesCleaner();</span> -<span class="fc" id="L45"> }</span> - - /** Build a convex region from a collection of bounding hyperplanes. - * @param hyperplanes collection of bounding hyperplanes - * @return a new convex region, or null if the collection is empty - */ - public Region<S> buildConvex(final Hyperplane<S> ... hyperplanes) { -<span class="pc bpc" id="L52" title="2 of 4 branches missed."> if ((hyperplanes == null) || (hyperplanes.length == 0)) {</span> -<span class="nc" id="L53"> return null;</span> - } - - // use the first hyperplane to build the right class -<span class="fc" id="L57"> final Region<S> region = hyperplanes[0].wholeSpace();</span> - - // chop off parts of the space -<span class="fc" id="L60"> BSPTree<S> node = region.getTree(false);</span> -<span class="fc" id="L61"> node.setAttribute(Boolean.TRUE);</span> -<span class="fc bfc" id="L62" title="All 2 branches covered."> for (final Hyperplane<S> hyperplane : hyperplanes) {</span> -<span class="fc bfc" id="L63" title="All 2 branches covered."> if (node.insertCut(hyperplane)) {</span> -<span class="fc" id="L64"> node.setAttribute(null);</span> -<span class="fc" id="L65"> node.getPlus().setAttribute(Boolean.FALSE);</span> -<span class="fc" id="L66"> node = node.getMinus();</span> -<span class="fc" id="L67"> node.setAttribute(Boolean.TRUE);</span> - } else { - // the hyperplane could not be inserted in the current leaf node - // either it is completely outside (which means the input hyperplanes - // are wrong), or it is parallel to a previous hyperplane -<span class="fc" id="L72"> SubHyperplane<S> s = hyperplane.wholeHyperplane();</span> -<span class="pc bpc" id="L73" title="1 of 4 branches missed."> for (BSPTree<S> tree = node; tree.getParent() != null && s != null; tree = tree.getParent()) {</span> -<span class="fc" id="L74"> final Hyperplane<S> other = tree.getParent().getCut().getHyperplane();</span> -<span class="fc" id="L75"> final SplitSubHyperplane<S> split = s.split(other);</span> -<span class="pc bfc" id="L76" title="All 3 branches covered."> switch (split.getSide()) {</span> - case HYPER : - // the hyperplane is parallel to a previous hyperplane -<span class="fc bfc" id="L79" title="All 2 branches covered."> if (!hyperplane.sameOrientationAs(other)) {</span> - // this hyperplane is opposite to the other one, - // the region is thinner than the tolerance, we consider it empty -<span class="fc" id="L82"> return getComplement(hyperplanes[0].wholeSpace());</span> - } - // the hyperplane is an extension of an already known hyperplane, we just ignore it - break; - case PLUS : - // the hyperplane is outside of the current convex zone, - // the input hyperplanes are inconsistent -<span class="fc" id="L89"> throw new MathIllegalArgumentException(LocalizedFormats.NOT_CONVEX_HYPERPLANES);</span> - default : -<span class="fc" id="L91"> s = split.getMinus();</span> - } - } - } - } - -<span class="fc" id="L97"> return region;</span> - - } - - /** Compute the union of two regions. - * @param region1 first region (will be unusable after the operation as - * parts of it will be reused in the new region) - * @param region2 second region (will be unusable after the operation as - * parts of it will be reused in the new region) - * @return a new region, result of {@code region1 union region2} - */ - public Region<S> union(final Region<S> region1, final Region<S> region2) { -<span class="fc" id="L109"> final BSPTree<S> tree =</span> - region1.getTree(false).merge(region2.getTree(false), new UnionMerger()); -<span class="fc" id="L111"> tree.visit(nodeCleaner);</span> -<span class="fc" id="L112"> return region1.buildNew(tree);</span> - } - - /** Compute the intersection of two regions. - * @param region1 first region (will be unusable after the operation as - * parts of it will be reused in the new region) - * @param region2 second region (will be unusable after the operation as - * parts of it will be reused in the new region) - * @return a new region, result of {@code region1 intersection region2} - */ - public Region<S> intersection(final Region<S> region1, final Region<S> region2) { -<span class="fc" id="L123"> final BSPTree<S> tree =</span> - region1.getTree(false).merge(region2.getTree(false), new IntersectionMerger()); -<span class="fc" id="L125"> tree.visit(nodeCleaner);</span> -<span class="fc" id="L126"> return region1.buildNew(tree);</span> - } - - /** Compute the symmetric difference (exclusive or) of two regions. - * @param region1 first region (will be unusable after the operation as - * parts of it will be reused in the new region) - * @param region2 second region (will be unusable after the operation as - * parts of it will be reused in the new region) - * @return a new region, result of {@code region1 xor region2} - */ - public Region<S> xor(final Region<S> region1, final Region<S> region2) { -<span class="fc" id="L137"> final BSPTree<S> tree =</span> - region1.getTree(false).merge(region2.getTree(false), new XorMerger()); -<span class="fc" id="L139"> tree.visit(nodeCleaner);</span> -<span class="fc" id="L140"> return region1.buildNew(tree);</span> - } - - /** Compute the difference of two regions. - * @param region1 first region (will be unusable after the operation as - * parts of it will be reused in the new region) - * @param region2 second region (will be unusable after the operation as - * parts of it will be reused in the new region) - * @return a new region, result of {@code region1 minus region2} - */ - public Region<S> difference(final Region<S> region1, final Region<S> region2) { -<span class="fc" id="L151"> final BSPTree<S> tree =</span> - region1.getTree(false).merge(region2.getTree(false), new DifferenceMerger(region1, region2)); -<span class="fc" id="L153"> tree.visit(nodeCleaner);</span> -<span class="fc" id="L154"> return region1.buildNew(tree);</span> - } - - /** Get the complement of the region (exchanged interior/exterior). - * @param region region to complement, it will not modified, a new - * region independent region will be built - * @return a new region, complement of the specified one - */ - /** Get the complement of the region (exchanged interior/exterior). - * @param region region to complement, it will not modified, a new - * region independent region will be built - * @return a new region, complement of the specified one - */ - public Region<S> getComplement(final Region<S> region) { -<span class="fc" id="L168"> return region.buildNew(recurseComplement(region.getTree(false)));</span> - } - - /** Recursively build the complement of a BSP tree. - * @param node current node of the original tree - * @return new tree, complement of the node - */ - private BSPTree<S> recurseComplement(final BSPTree<S> node) { - - // transform the tree, except for boundary attribute splitters -<span class="fc" id="L178"> final Map<BSPTree<S>, BSPTree<S>> map = new HashMap<BSPTree<S>, BSPTree<S>>();</span> -<span class="fc" id="L179"> final BSPTree<S> transformedTree = recurseComplement(node, map);</span> - - // set up the boundary attributes splitters -<span class="fc bfc" id="L182" title="All 2 branches covered."> for (final Map.Entry<BSPTree<S>, BSPTree<S>> entry : map.entrySet()) {</span> -<span class="fc bfc" id="L183" title="All 2 branches covered."> if (entry.getKey().getCut() != null) {</span> - @SuppressWarnings("unchecked") -<span class="fc" id="L185"> BoundaryAttribute<S> original = (BoundaryAttribute<S>) entry.getKey().getAttribute();</span> -<span class="fc bfc" id="L186" title="All 2 branches covered."> if (original != null) {</span> - @SuppressWarnings("unchecked") -<span class="fc" id="L188"> BoundaryAttribute<S> transformed = (BoundaryAttribute<S>) entry.getValue().getAttribute();</span> -<span class="fc bfc" id="L189" title="All 2 branches covered."> for (final BSPTree<S> splitter : original.getSplitters()) {</span> -<span class="fc" id="L190"> transformed.getSplitters().add(map.get(splitter));</span> -<span class="fc" id="L191"> }</span> - } - } -<span class="fc" id="L194"> }</span> - -<span class="fc" id="L196"> return transformedTree;</span> - - } - - /** Recursively build the complement of a BSP tree. - * @param node current node of the original tree - * @param map transformed nodes map - * @return new tree, complement of the node - */ - private BSPTree<S> recurseComplement(final BSPTree<S> node, - final Map<BSPTree<S>, BSPTree<S>> map) { - - final BSPTree<S> transformedNode; -<span class="fc bfc" id="L209" title="All 2 branches covered."> if (node.getCut() == null) {</span> -<span class="fc bfc" id="L210" title="All 2 branches covered."> transformedNode = new BSPTree<S>(((Boolean) node.getAttribute()) ? Boolean.FALSE : Boolean.TRUE);</span> - } else { - - @SuppressWarnings("unchecked") -<span class="fc" id="L214"> BoundaryAttribute<S> attribute = (BoundaryAttribute<S>) node.getAttribute();</span> -<span class="fc bfc" id="L215" title="All 2 branches covered."> if (attribute != null) {</span> -<span class="fc bfc" id="L216" title="All 2 branches covered."> final SubHyperplane<S> plusOutside =</span> - (attribute.getPlusInside() == null) ? null : attribute.getPlusInside().copySelf(); -<span class="fc bfc" id="L218" title="All 2 branches covered."> final SubHyperplane<S> plusInside =</span> - (attribute.getPlusOutside() == null) ? null : attribute.getPlusOutside().copySelf(); - // we start with an empty list of splitters, it will be filled in out of recursion -<span class="fc" id="L221"> attribute = new BoundaryAttribute<S>(plusOutside, plusInside, new NodesSet<S>());</span> - } - -<span class="fc" id="L224"> transformedNode = new BSPTree<S>(node.getCut().copySelf(),</span> - recurseComplement(node.getPlus(), map), - recurseComplement(node.getMinus(), map), - attribute); - } - -<span class="fc" id="L230"> map.put(node, transformedNode);</span> -<span class="fc" id="L231"> return transformedNode;</span> - - } - - /** BSP tree leaf merger computing union of two regions. */ -<span class="fc" id="L236"> private class UnionMerger implements BSPTree.LeafMerger<S> {</span> - /** {@inheritDoc} */ - public BSPTree<S> merge(final BSPTree<S> leaf, final BSPTree<S> tree, - final BSPTree<S> parentTree, - final boolean isPlusChild, final boolean leafFromInstance) { -<span class="fc bfc" id="L241" title="All 2 branches covered."> if ((Boolean) leaf.getAttribute()) {</span> - // the leaf node represents an inside cell -<span class="fc" id="L243"> leaf.insertInTree(parentTree, isPlusChild, new VanishingToLeaf(true));</span> -<span class="fc" id="L244"> return leaf;</span> - } - // the leaf node represents an outside cell -<span class="fc" id="L247"> tree.insertInTree(parentTree, isPlusChild, new VanishingToLeaf(false));</span> -<span class="fc" id="L248"> return tree;</span> - } - } - - /** BSP tree leaf merger computing intersection of two regions. */ -<span class="fc" id="L253"> private class IntersectionMerger implements BSPTree.LeafMerger<S> {</span> - /** {@inheritDoc} */ - public BSPTree<S> merge(final BSPTree<S> leaf, final BSPTree<S> tree, - final BSPTree<S> parentTree, - final boolean isPlusChild, final boolean leafFromInstance) { -<span class="fc bfc" id="L258" title="All 2 branches covered."> if ((Boolean) leaf.getAttribute()) {</span> - // the leaf node represents an inside cell -<span class="fc" id="L260"> tree.insertInTree(parentTree, isPlusChild, new VanishingToLeaf(true));</span> -<span class="fc" id="L261"> return tree;</span> - } - // the leaf node represents an outside cell -<span class="fc" id="L264"> leaf.insertInTree(parentTree, isPlusChild, new VanishingToLeaf(false));</span> -<span class="fc" id="L265"> return leaf;</span> - } - } - - /** BSP tree leaf merger computing symmetric difference (exclusive or) of two regions. */ -<span class="fc" id="L270"> private class XorMerger implements BSPTree.LeafMerger<S> {</span> - /** {@inheritDoc} */ - public BSPTree<S> merge(final BSPTree<S> leaf, final BSPTree<S> tree, - final BSPTree<S> parentTree, final boolean isPlusChild, - final boolean leafFromInstance) { -<span class="fc" id="L275"> BSPTree<S> t = tree;</span> -<span class="fc bfc" id="L276" title="All 2 branches covered."> if ((Boolean) leaf.getAttribute()) {</span> - // the leaf node represents an inside cell -<span class="fc" id="L278"> t = recurseComplement(t);</span> - } -<span class="fc" id="L280"> t.insertInTree(parentTree, isPlusChild, new VanishingToLeaf(true));</span> -<span class="fc" id="L281"> return t;</span> - } - } - - /** BSP tree leaf merger computing difference of two regions. */ - private class DifferenceMerger implements BSPTree.LeafMerger<S>, VanishingCutHandler<S> { - - /** Region to subtract from. */ - private final Region<S> region1; - - /** Region to subtract. */ - private final Region<S> region2; - - /** Simple constructor. - * @param region1 region to subtract from - * @param region2 region to subtract - */ -<span class="fc" id="L298"> DifferenceMerger(final Region<S> region1, final Region<S> region2) {</span> -<span class="fc" id="L299"> this.region1 = region1.copySelf();</span> -<span class="fc" id="L300"> this.region2 = region2.copySelf();</span> -<span class="fc" id="L301"> }</span> - - /** {@inheritDoc} */ - public BSPTree<S> merge(final BSPTree<S> leaf, final BSPTree<S> tree, - final BSPTree<S> parentTree, final boolean isPlusChild, - final boolean leafFromInstance) { -<span class="fc bfc" id="L307" title="All 2 branches covered."> if ((Boolean) leaf.getAttribute()) {</span> - // the leaf node represents an inside cell -<span class="fc bfc" id="L309" title="All 2 branches covered."> final BSPTree<S> argTree =</span> - recurseComplement(leafFromInstance ? tree : leaf); -<span class="fc" id="L311"> argTree.insertInTree(parentTree, isPlusChild, this);</span> -<span class="fc" id="L312"> return argTree;</span> - } - // the leaf node represents an outside cell -<span class="fc bfc" id="L315" title="All 2 branches covered."> final BSPTree<S> instanceTree =</span> - leafFromInstance ? leaf : tree; -<span class="fc" id="L317"> instanceTree.insertInTree(parentTree, isPlusChild, this);</span> -<span class="fc" id="L318"> return instanceTree;</span> - } - - /** {@inheritDoc} */ - public BSPTree<S> fixNode(final BSPTree<S> node) { - // get a representative point in the degenerate cell -<span class="fc" id="L324"> final BSPTree<S> cell = node.pruneAroundConvexCell(Boolean.TRUE, Boolean.FALSE, null);</span> -<span class="fc" id="L325"> final Region<S> r = region1.buildNew(cell);</span> -<span class="fc" id="L326"> final Point<S> p = r.getBarycenter();</span> -<span class="pc bpc" id="L327" title="3 of 4 branches missed."> return new BSPTree<S>(region1.checkPoint(p) == Location.INSIDE &&</span> - region2.checkPoint(p) == Location.OUTSIDE); - } - - } - - /** Visitor removing internal nodes attributes. */ -<span class="fc" id="L334"> private class NodesCleaner implements BSPTreeVisitor<S> {</span> - - /** {@inheritDoc} */ - public Order visitOrder(final BSPTree<S> node) { -<span class="fc" id="L338"> return Order.PLUS_SUB_MINUS;</span> - } - - /** {@inheritDoc} */ - public void visitInternalNode(final BSPTree<S> node) { -<span class="fc" id="L343"> node.setAttribute(null);</span> -<span class="fc" id="L344"> }</span> - - /** {@inheritDoc} */ - public void visitLeafNode(final BSPTree<S> node) { -<span class="fc" id="L348"> }</span> - - } - - /** Handler replacing nodes with vanishing cuts with leaf nodes. */ - private class VanishingToLeaf implements VanishingCutHandler<S> { - - /** Inside/outside indocator to use for ambiguous nodes. */ - private final boolean inside; - - /** Simple constructor. - * @param inside inside/outside indicator to use for ambiguous nodes - */ -<span class="fc" id="L361"> VanishingToLeaf(final boolean inside) {</span> -<span class="fc" id="L362"> this.inside = inside;</span> -<span class="fc" id="L363"> }</span> - - /** {@inheritDoc} */ - public BSPTree<S> fixNode(final BSPTree<S> node) { -<span class="nc bnc" id="L367" title="All 2 branches missed."> if (node.getPlus().getAttribute().equals(node.getMinus().getAttribute())) {</span> - // no ambiguity -<span class="nc" id="L369"> return new BSPTree<S>(node.getPlus().getAttribute());</span> - } else { - // ambiguous node -<span class="nc" id="L372"> return new BSPTree<S>(inside);</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 http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/01/018eec2b19174362ea8ab1c13d682727c9422167.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/018eec2b19174362ea8ab1c13d682727c9422167.svn-base b/site-content/.svn/pristine/01/018eec2b19174362ea8ab1c13d682727c9422167.svn-base deleted file mode 100644 index 4e51483..0000000 --- a/site-content/.svn/pristine/01/018eec2b19174362ea8ab1c13d682727c9422167.svn-base +++ /dev/null @@ -1,246 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!-- NewPage --> -<html lang="en"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>Uses of Class org.apache.commons.math3.stat.interval.ConfidenceInterval (Apache Commons Math 3.6.1 API)</title> -<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> -</head> -<body> -<script type="text/javascript"><!-- - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Uses of Class org.apache.commons.math3.stat.interval.ConfidenceInterval (Apache Commons Math 3.6.1 API)"; - } -//--> -</script> -<noscript> -<div>JavaScript is disabled on your browser.</div> -</noscript> -<!-- ========= START OF TOP NAVBAR ======= --> -<div class="topNav"><a name="navbar_top"> -<!-- --> -</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> -<!-- --> -</a> -<ul class="navList" title="Navigation"> -<li><a href="../../../../../../../overview-summary.html">Overview</a></li> -<li><a href="../package-summary.html">Package</a></li> -<li><a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">Class</a></li> -<li class="navBarCell1Rev">Use</li> -<li><a href="../package-tree.html">Tree</a></li> -<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> -<li><a href="../../../../../../../index-all.html">Index</a></li> -<li><a href="../../../../../../../help-doc.html">Help</a></li> -</ul> -<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> -</div> -<div class="subNav"> -<ul class="navList"> -<li>Prev</li> -<li>Next</li> -</ul> -<ul class="navList"> -<li><a href="../../../../../../../index.html?org/apache/commons/math3/stat/interval/class-use/ConfidenceInterval.html" target="_top">Frames</a></li> -<li><a href="ConfidenceInterval.html" target="_top">No Frames</a></li> -</ul> -<ul class="navList" id="allclasses_navbar_top"> -<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> -</ul> -<div> -<script type="text/javascript"><!-- - allClassesLink = document.getElementById("allclasses_navbar_top"); - if(window==top) { - allClassesLink.style.display = "block"; - } - else { - allClassesLink.style.display = "none"; - } - //--> -</script> -</div> -<a name="skip-navbar_top"> -<!-- --> -</a></div> -<!-- ========= END OF TOP NAVBAR ========= --> -<div class="header"> -<h2 title="Uses of Class org.apache.commons.math3.stat.interval.ConfidenceInterval" class="title">Uses of Class<br>org.apache.commons.math3.stat.interval.ConfidenceInterval</h2> -</div> -<div class="classUseContainer"> -<ul class="blockList"> -<li class="blockList"> -<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> -<caption><span>Packages that use <a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></span><span class="tabEnd"> </span></caption> -<tr> -<th class="colFirst" scope="col">Package</th> -<th class="colLast" scope="col">Description</th> -</tr> -<tbody> -<tr class="altColor"> -<td class="colFirst"><a href="#org.apache.commons.math3.stat.interval">org.apache.commons.math3.stat.interval</a></td> -<td class="colLast"> -<div class="block">Classes providing binomial proportion confidence interval construction.</div> -</td> -</tr> -</tbody> -</table> -</li> -<li class="blockList"> -<ul class="blockList"> -<li class="blockList"><a name="org.apache.commons.math3.stat.interval"> -<!-- --> -</a> -<h3>Uses of <a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a> in <a href="../../../../../../../org/apache/commons/math3/stat/interval/package-summary.html">org.apache.commons.math3.stat.interval</a></h3> -<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> -<caption><span>Methods in <a href="../../../../../../../org/apache/commons/math3/stat/interval/package-summary.html">org.apache.commons.math3.stat.interval</a> that return <a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></span><span class="tabEnd"> </span></caption> -<tr> -<th class="colFirst" scope="col">Modifier and Type</th> -<th class="colLast" scope="col">Method and Description</th> -</tr> -<tbody> -<tr class="altColor"> -<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></code></td> -<td class="colLast"><span class="strong">WilsonScoreInterval.</span><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/interval/WilsonScoreInterval.html#createInterval(int,%20int,%20double)">createInterval</a></strong>(int numberOfTrials, - int numberOfSuccesses, - double confidenceLevel)</code> -<div class="block">Create a confidence interval for the true probability of success - of an unknown binomial distribution with the given observed number - of trials, successes and confidence level.</div> -</td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></code></td> -<td class="colLast"><span class="strong">ClopperPearsonInterval.</span><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/interval/ClopperPearsonInterval.html#createInterval(int,%20int,%20double)">createInterval</a></strong>(int numberOfTrials, - int numberOfSuccesses, - double confidenceLevel)</code> -<div class="block">Create a confidence interval for the true probability of success - of an unknown binomial distribution with the given observed number - of trials, successes and confidence level.</div> -</td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></code></td> -<td class="colLast"><span class="strong">NormalApproximationInterval.</span><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/interval/NormalApproximationInterval.html#createInterval(int,%20int,%20double)">createInterval</a></strong>(int numberOfTrials, - int numberOfSuccesses, - double confidenceLevel)</code> -<div class="block">Create a confidence interval for the true probability of success - of an unknown binomial distribution with the given observed number - of trials, successes and confidence level.</div> -</td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></code></td> -<td class="colLast"><span class="strong">AgrestiCoullInterval.</span><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/interval/AgrestiCoullInterval.html#createInterval(int,%20int,%20double)">createInterval</a></strong>(int numberOfTrials, - int numberOfSuccesses, - double confidenceLevel)</code> -<div class="block">Create a confidence interval for the true probability of success - of an unknown binomial distribution with the given observed number - of trials, successes and confidence level.</div> -</td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code><a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></code></td> -<td class="colLast"><span class="strong">BinomialConfidenceInterval.</span><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/interval/BinomialConfidenceInterval.html#createInterval(int,%20int,%20double)">createInterval</a></strong>(int numberOfTrials, - int numberOfSuccesses, - double confidenceLevel)</code> -<div class="block">Create a confidence interval for the true probability of success - of an unknown binomial distribution with the given observed number - of trials, successes and confidence level.</div> -</td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></code></td> -<td class="colLast"><span class="strong">IntervalUtils.</span><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/interval/IntervalUtils.html#getAgrestiCoullInterval(int,%20int,%20double)">getAgrestiCoullInterval</a></strong>(int numberOfTrials, - int numberOfSuccesses, - double confidenceLevel)</code> -<div class="block">Create an Agresti-Coull binomial confidence interval for the true - probability of success of an unknown binomial distribution with the given - observed number of trials, successes and confidence level.</div> -</td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></code></td> -<td class="colLast"><span class="strong">IntervalUtils.</span><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/interval/IntervalUtils.html#getClopperPearsonInterval(int,%20int,%20double)">getClopperPearsonInterval</a></strong>(int numberOfTrials, - int numberOfSuccesses, - double confidenceLevel)</code> -<div class="block">Create a Clopper-Pearson binomial confidence interval for the true - probability of success of an unknown binomial distribution with the given - observed number of trials, successes and confidence level.</div> -</td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></code></td> -<td class="colLast"><span class="strong">IntervalUtils.</span><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/interval/IntervalUtils.html#getNormalApproximationInterval(int,%20int,%20double)">getNormalApproximationInterval</a></strong>(int numberOfTrials, - int numberOfSuccesses, - double confidenceLevel)</code> -<div class="block">Create a binomial confidence interval for the true probability of success - of an unknown binomial distribution with the given observed number of - trials, successes and confidence level using the Normal approximation to - the binomial distribution.</div> -</td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>static <a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">ConfidenceInterval</a></code></td> -<td class="colLast"><span class="strong">IntervalUtils.</span><code><strong><a href="../../../../../../../org/apache/commons/math3/stat/interval/IntervalUtils.html#getWilsonScoreInterval(int,%20int,%20double)">getWilsonScoreInterval</a></strong>(int numberOfTrials, - int numberOfSuccesses, - double confidenceLevel)</code> -<div class="block">Create a Wilson score binomial confidence interval for the true - probability of success of an unknown binomial distribution with the given - observed number of trials, successes and confidence level.</div> -</td> -</tr> -</tbody> -</table> -</li> -</ul> -</li> -</ul> -</div> -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<div class="bottomNav"><a name="navbar_bottom"> -<!-- --> -</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> -<!-- --> -</a> -<ul class="navList" title="Navigation"> -<li><a href="../../../../../../../overview-summary.html">Overview</a></li> -<li><a href="../package-summary.html">Package</a></li> -<li><a href="../../../../../../../org/apache/commons/math3/stat/interval/ConfidenceInterval.html" title="class in org.apache.commons.math3.stat.interval">Class</a></li> -<li class="navBarCell1Rev">Use</li> -<li><a href="../package-tree.html">Tree</a></li> -<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> -<li><a href="../../../../../../../index-all.html">Index</a></li> -<li><a href="../../../../../../../help-doc.html">Help</a></li> -</ul> -<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> -</div> -<div class="subNav"> -<ul class="navList"> -<li>Prev</li> -<li>Next</li> -</ul> -<ul class="navList"> -<li><a href="../../../../../../../index.html?org/apache/commons/math3/stat/interval/class-use/ConfidenceInterval.html" target="_top">Frames</a></li> -<li><a href="ConfidenceInterval.html" target="_top">No Frames</a></li> -</ul> -<ul class="navList" id="allclasses_navbar_bottom"> -<li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> -</ul> -<div> -<script type="text/javascript"><!-- - allClassesLink = document.getElementById("allclasses_navbar_bottom"); - if(window==top) { - allClassesLink.style.display = "block"; - } - else { - allClassesLink.style.display = "none"; - } - //--> -</script> -</div> -<a name="skip-navbar_bottom"> -<!-- --> -</a></div> -<!-- ======== END OF BOTTOM NAVBAR ======= --> -<p class="legalCopy"><small>Copyright © 2003–2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> -</body> -</html> http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/01/0195b47df267c2516cc89a22f433228a4d12e3ce.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/0195b47df267c2516cc89a22f433228a4d12e3ce.svn-base b/site-content/.svn/pristine/01/0195b47df267c2516cc89a22f433228a4d12e3ce.svn-base deleted file mode 100644 index 930400c..0000000 --- a/site-content/.svn/pristine/01/0195b47df267c2516cc89a22f433228a4d12e3ce.svn-base +++ /dev/null @@ -1 +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>AklToussaintHeuristic</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><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> > <a href="index.html" class="el_package">org.apache.commons.math3.geometry.euclidean.twod.hull</a> > <span class="el_class">AklToussaintHeuristic</span></div><h1>AklToussaintHeuristic</h1><table class="coverage" cellspacing= "0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">7 of 226</td><td class="ctr2">97%</td><td class="bar">3 of 44</td><td class="ctr2">93%</td><td class="ctr1">4</td ><td class="ctr2">26</td><td class="ctr1">4</td><td class="ctr2">48</td><td >class="ctr1">1</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td >id="a3"><a href="AklToussaintHeuristic.java.html#L56" >class="el_method">reducePoints(Collection)</a></td><td class="bar" >id="b0"><img src="../.resources/redbar.gif" width="4" height="10" title="4" >alt="4"/><img src="../.resources/greenbar.gif" width="115" height="10" >title="115" alt="115"/></td><td class="ctr2" id="c2">97%</td><td class="bar" >id="d0"><img src="../.resources/redbar.gif" width="9" height="10" title="2" >alt="2"/><img src="../.resources/greenbar.gif" width="110" height="10" >title="24" alt="24"/></td><td class="ctr2" id="e2">92%</td><td class="ctr1" >id="f0">2</td><td class="ctr2" id="g0">14</td><td class="ctr1" >id="h0">2</td><td class="ctr2" id="i0">27</td><td class="ctr1" >id="j1">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a >href="AklToussaintHeuristic.java.html#L43" >class="el_method">AklToussaintHeuristic()</a> </td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="3" height="10" title="3" alt="3"/></td><td class="ctr2" id="c3">0%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h1">2</td><td class="ctr2" id="i3">2</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="AklToussaintHeuristic.java.html#L124" class="el_method">insideQuadrilateral(Vector2D, List)</a></td><td class="bar" id="b2"><img src="../.resources/greenbar.gif" width="74" height="10" title="74" alt="74"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="4" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="60" height="10" title="13" alt="13"/></td><td class="ctr2" id="e1">93%</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g1">8</td><td class="ctr1" id="h2">0</td><td class="ctr2" id=" i1">14</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a1"><a href="AklToussaintHeuristic.java.html#L106" class="el_method">buildQuadrilateral(Vector2D[])</a></td><td class="bar" id="b3"><img src="../.resources/greenbar.gif" width="30" height="10" title="30" alt="30"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d2"><img src="../.resources/greenbar.gif" width="18" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g2">3</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i2">5</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr></tbody></table><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 http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/01/019935469ea856554baf2e88654f57e7edecfb36.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/019935469ea856554baf2e88654f57e7edecfb36.svn-base b/site-content/.svn/pristine/01/019935469ea856554baf2e88654f57e7edecfb36.svn-base deleted file mode 100644 index 5e5619a..0000000 --- a/site-content/.svn/pristine/01/019935469ea856554baf2e88654f57e7edecfb36.svn-base +++ /dev/null @@ -1,354 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!-- NewPage --> -<html lang="en"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>DftNormalization (Apache Commons Math 3.6.1 API)</title> -<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> -</head> -<body> -<script type="text/javascript"><!-- - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="DftNormalization (Apache Commons Math 3.6.1 API)"; - } -//--> -</script> -<noscript> -<div>JavaScript is disabled on your browser.</div> -</noscript> -<!-- ========= START OF TOP NAVBAR ======= --> -<div class="topNav"><a name="navbar_top"> -<!-- --> -</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> -<!-- --> -</a> -<ul class="navList" title="Navigation"> -<li><a href="../../../../../overview-summary.html">Overview</a></li> -<li><a href="package-summary.html">Package</a></li> -<li class="navBarCell1Rev">Class</li> -<li><a href="class-use/DftNormalization.html">Use</a></li> -<li><a href="package-tree.html">Tree</a></li> -<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> -<li><a href="../../../../../index-all.html">Index</a></li> -<li><a href="../../../../../help-doc.html">Help</a></li> -</ul> -<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> -</div> -<div class="subNav"> -<ul class="navList"> -<li><a href="../../../../../org/apache/commons/math3/transform/DctNormalization.html" title="enum in org.apache.commons.math3.transform"><span class="strong">Prev Class</span></a></li> -<li><a href="../../../../../org/apache/commons/math3/transform/DstNormalization.html" title="enum in org.apache.commons.math3.transform"><span class="strong">Next Class</span></a></li> -</ul> -<ul class="navList"> -<li><a href="../../../../../index.html?org/apache/commons/math3/transform/DftNormalization.html" target="_top">Frames</a></li> -<li><a href="DftNormalization.html" target="_top">No Frames</a></li> -</ul> -<ul class="navList" id="allclasses_navbar_top"> -<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> -</ul> -<div> -<script type="text/javascript"><!-- - allClassesLink = document.getElementById("allclasses_navbar_top"); - if(window==top) { - allClassesLink.style.display = "block"; - } - else { - allClassesLink.style.display = "none"; - } - //--> -</script> -</div> -<div> -<ul class="subNavList"> -<li>Summary: </li> -<li>Nested | </li> -<li><a href="#enum_constant_summary">Enum Constants</a> | </li> -<li>Field | </li> -<li><a href="#method_summary">Method</a></li> -</ul> -<ul class="subNavList"> -<li>Detail: </li> -<li><a href="#enum_constant_detail">Enum Constants</a> | </li> -<li>Field | </li> -<li><a href="#method_detail">Method</a></li> -</ul> -</div> -<a name="skip-navbar_top"> -<!-- --> -</a></div> -<!-- ========= END OF TOP NAVBAR ========= --> -<!-- ======== START OF CLASS DATA ======== --> -<div class="header"> -<div class="subTitle">org.apache.commons.math3.transform</div> -<h2 title="Enum DftNormalization" class="title">Enum DftNormalization</h2> -</div> -<div class="contentContainer"> -<ul class="inheritance"> -<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> -<li> -<ul class="inheritance"> -<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">java.lang.Enum</a><<a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html" title="enum in org.apache.commons.math3.transform">DftNormalization</a>></li> -<li> -<ul class="inheritance"> -<li>org.apache.commons.math3.transform.DftNormalization</li> -</ul> -</li> -</ul> -</li> -</ul> -<div class="description"> -<ul class="blockList"> -<li class="blockList"> -<dl> -<dt>All Implemented Interfaces:</dt> -<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html" title="enum in org.apache.commons.math3.transform">DftNormalization</a>></dd> -</dl> -<hr> -<br> -<pre>public enum <a href="../../../../../src-html/org/apache/commons/math3/transform/DftNormalization.html#line.27">DftNormalization</a> -extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a><<a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html" title="enum in org.apache.commons.math3.transform">DftNormalization</a>></pre> -<div class="block">This enumeration defines the various types of normalizations that can be - applied to discrete Fourier transforms (DFT). The exact definition of these - normalizations is detailed below.</div> -<dl><dt><span class="strong">Since:</span></dt> - <dd>3.0</dd> -<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/math3/transform/FastFourierTransformer.html" title="class in org.apache.commons.math3.transform"><code>FastFourierTransformer</code></a></dd></dl> -</li> -</ul> -</div> -<div class="summary"> -<ul class="blockList"> -<li class="blockList"> -<!-- =========== ENUM CONSTANT SUMMARY =========== --> -<ul class="blockList"> -<li class="blockList"><a name="enum_constant_summary"> -<!-- --> -</a> -<h3>Enum Constant Summary</h3> -<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation"> -<caption><span>Enum Constants</span><span class="tabEnd"> </span></caption> -<tr> -<th class="colOne" scope="col">Enum Constant and Description</th> -</tr> -<tr class="altColor"> -<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html#STANDARD">STANDARD</a></strong></code> -<div class="block">Should be passed to the constructor of <a href="../../../../../org/apache/commons/math3/transform/FastFourierTransformer.html" title="class in org.apache.commons.math3.transform"><code>FastFourierTransformer</code></a> - to use the <em>standard</em> normalization convention.</div> -</td> -</tr> -<tr class="rowColor"> -<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html#UNITARY">UNITARY</a></strong></code> -<div class="block">Should be passed to the constructor of <a href="../../../../../org/apache/commons/math3/transform/FastFourierTransformer.html" title="class in org.apache.commons.math3.transform"><code>FastFourierTransformer</code></a> - to use the <em>unitary</em> normalization convention.</div> -</td> -</tr> -</table> -</li> -</ul> -<!-- ========== METHOD SUMMARY =========== --> -<ul class="blockList"> -<li class="blockList"><a name="method_summary"> -<!-- --> -</a> -<h3>Method Summary</h3> -<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> -<caption><span>Methods</span><span class="tabEnd"> </span></caption> -<tr> -<th class="colFirst" scope="col">Modifier and Type</th> -<th class="colLast" scope="col">Method and Description</th> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html" title="enum in org.apache.commons.math3.transform">DftNormalization</a></code></td> -<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html#valueOf(java.lang.String)">valueOf</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> -<div class="block">Returns the enum constant of this type with the specified name.</div> -</td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code>static <a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html" title="enum in org.apache.commons.math3.transform">DftNormalization</a>[]</code></td> -<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html#values()">values</a></strong>()</code> -<div class="block">Returns an array containing the constants of this enum type, in -the order they are declared.</div> -</td> -</tr> -</table> -<ul class="blockList"> -<li class="blockList"><a name="methods_inherited_from_class_java.lang.Enum"> -<!-- --> -</a> -<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a></h3> -<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#compareTo(E)" title="class or interface in java.lang">compareTo</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#getDeclaringClass()" title="class or interface in java.lang">getDeclaringClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/ api/java/lang/Enum.html?is-external=true#name()" title="class or interface in java.lang">name</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#ordinal()" title="class or interface in java.lang">ordinal</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#valueOf(java.lang.Class,%20java.lang.String)" title="class or interface in java.lang">valueOf</a></code></li> -</ul> -<ul class="blockList"> -<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> -<!-- --> -</a> -<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> -<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li> -</ul> -</li> -</ul> -</li> -</ul> -</div> -<div class="details"> -<ul class="blockList"> -<li class="blockList"> -<!-- ============ ENUM CONSTANT DETAIL =========== --> -<ul class="blockList"> -<li class="blockList"><a name="enum_constant_detail"> -<!-- --> -</a> -<h3>Enum Constant Detail</h3> -<a name="STANDARD"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>STANDARD</h4> -<pre>public static final <a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html" title="enum in org.apache.commons.math3.transform">DftNormalization</a> <a href="../../../../../src-html/org/apache/commons/math3/transform/DftNormalization.html#line.40">STANDARD</a></pre> -<div class="block">Should be passed to the constructor of <a href="../../../../../org/apache/commons/math3/transform/FastFourierTransformer.html" title="class in org.apache.commons.math3.transform"><code>FastFourierTransformer</code></a> - to use the <em>standard</em> normalization convention. This normalization - convention is defined as follows - <ul> - <li>forward transform: y<sub>n</sub> = ∑<sub>k=0</sub><sup>N-1</sup> - x<sub>k</sub> exp(-2πi n k / N),</li> - <li>inverse transform: x<sub>k</sub> = N<sup>-1</sup> - ∑<sub>n=0</sub><sup>N-1</sup> y<sub>n</sub> exp(2πi n k / N),</li> - </ul> - where N is the size of the data sample.</div> -</li> -</ul> -<a name="UNITARY"> -<!-- --> -</a> -<ul class="blockListLast"> -<li class="blockList"> -<h4>UNITARY</h4> -<pre>public static final <a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html" title="enum in org.apache.commons.math3.transform">DftNormalization</a> <a href="../../../../../src-html/org/apache/commons/math3/transform/DftNormalization.html#line.55">UNITARY</a></pre> -<div class="block">Should be passed to the constructor of <a href="../../../../../org/apache/commons/math3/transform/FastFourierTransformer.html" title="class in org.apache.commons.math3.transform"><code>FastFourierTransformer</code></a> - to use the <em>unitary</em> normalization convention. This normalization - convention is defined as follows - <ul> - <li>forward transform: y<sub>n</sub> = (1 / √N) - ∑<sub>k=0</sub><sup>N-1</sup> x<sub>k</sub> - exp(-2πi n k / N),</li> - <li>inverse transform: x<sub>k</sub> = (1 / √N) - ∑<sub>n=0</sub><sup>N-1</sup> y<sub>n</sub> exp(2πi n k / N),</li> - </ul> - which makes the transform unitary. N is the size of the data sample.</div> -</li> -</ul> -</li> -</ul> -<!-- ============ METHOD DETAIL ========== --> -<ul class="blockList"> -<li class="blockList"><a name="method_detail"> -<!-- --> -</a> -<h3>Method Detail</h3> -<a name="values()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>values</h4> -<pre>public static <a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html" title="enum in org.apache.commons.math3.transform">DftNormalization</a>[] <a href="../../../../../src-html/org/apache/commons/math3/transform/DftNormalization.html#line.27">values</a>()</pre> -<div class="block">Returns an array containing the constants of this enum type, in -the order they are declared. This method may be used to iterate -over the constants as follows: -<pre> -for (DftNormalization c : DftNormalization.values()) - System.out.println(c); -</pre></div> -<dl><dt><span class="strong">Returns:</span></dt><dd>an array containing the constants of this enum type, in the order they are declared</dd></dl> -</li> -</ul> -<a name="valueOf(java.lang.String)"> -<!-- --> -</a> -<ul class="blockListLast"> -<li class="blockList"> -<h4>valueOf</h4> -<pre>public static <a href="../../../../../org/apache/commons/math3/transform/DftNormalization.html" title="enum in org.apache.commons.math3.transform">DftNormalization</a> <a href="../../../../../src-html/org/apache/commons/math3/transform/DftNormalization.html#line.27">valueOf</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> -<div class="block">Returns the enum constant of this type with the specified name. -The string must match <i>exactly</i> an identifier used to declare an -enum constant in this type. (Extraneous whitespace characters are -not permitted.)</div> -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the name of the enum constant to be returned.</dd> -<dt><span class="strong">Returns:</span></dt><dd>the enum constant with the specified name</dd> -<dt><span class="strong">Throws:</span></dt> -<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if this enum type has no constant with the specified name</dd> -<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the argument is null</dd></dl> -</li> -</ul> -</li> -</ul> -</li> -</ul> -</div> -</div> -<!-- ========= END OF CLASS DATA ========= --> -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<div class="bottomNav"><a name="navbar_bottom"> -<!-- --> -</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> -<!-- --> -</a> -<ul class="navList" title="Navigation"> -<li><a href="../../../../../overview-summary.html">Overview</a></li> -<li><a href="package-summary.html">Package</a></li> -<li class="navBarCell1Rev">Class</li> -<li><a href="class-use/DftNormalization.html">Use</a></li> -<li><a href="package-tree.html">Tree</a></li> -<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> -<li><a href="../../../../../index-all.html">Index</a></li> -<li><a href="../../../../../help-doc.html">Help</a></li> -</ul> -<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> -</div> -<div class="subNav"> -<ul class="navList"> -<li><a href="../../../../../org/apache/commons/math3/transform/DctNormalization.html" title="enum in org.apache.commons.math3.transform"><span class="strong">Prev Class</span></a></li> -<li><a href="../../../../../org/apache/commons/math3/transform/DstNormalization.html" title="enum in org.apache.commons.math3.transform"><span class="strong">Next Class</span></a></li> -</ul> -<ul class="navList"> -<li><a href="../../../../../index.html?org/apache/commons/math3/transform/DftNormalization.html" target="_top">Frames</a></li> -<li><a href="DftNormalization.html" target="_top">No Frames</a></li> -</ul> -<ul class="navList" id="allclasses_navbar_bottom"> -<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> -</ul> -<div> -<script type="text/javascript"><!-- - allClassesLink = document.getElementById("allclasses_navbar_bottom"); - if(window==top) { - allClassesLink.style.display = "block"; - } - else { - allClassesLink.style.display = "none"; - } - //--> -</script> -</div> -<div> -<ul class="subNavList"> -<li>Summary: </li> -<li>Nested | </li> -<li><a href="#enum_constant_summary">Enum Constants</a> | </li> -<li>Field | </li> -<li><a href="#method_summary">Method</a></li> -</ul> -<ul class="subNavList"> -<li>Detail: </li> -<li><a href="#enum_constant_detail">Enum Constants</a> | </li> -<li>Field | </li> -<li><a href="#method_detail">Method</a></li> -</ul> -</div> -<a name="skip-navbar_bottom"> -<!-- --> -</a></div> -<!-- ======== END OF BOTTOM NAVBAR ======= --> -<p class="legalCopy"><small>Copyright © 2003–2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> -</body> -</html>
