http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/01/01b1c8e58b8edaf62207fec2a0f4e0c3fd53d82b.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/01b1c8e58b8edaf62207fec2a0f4e0c3fd53d82b.svn-base b/site-content/.svn/pristine/01/01b1c8e58b8edaf62207fec2a0f4e0c3fd53d82b.svn-base deleted file mode 100644 index 2303c85..0000000 --- a/site-content/.svn/pristine/01/01b1c8e58b8edaf62207fec2a0f4e0c3fd53d82b.svn-base +++ /dev/null @@ -1,179 +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>NPointCrossover.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.genetics</a> > <span class="el_source">NPointCrossover.java</sp an></div><h1>NPointCrossover.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.genetics; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.math3.exception.DimensionMismatchException; -import org.apache.commons.math3.exception.MathIllegalArgumentException; -import org.apache.commons.math3.exception.NotStrictlyPositiveException; -import org.apache.commons.math3.exception.NumberIsTooLargeException; -import org.apache.commons.math3.exception.util.LocalizedFormats; -import org.apache.commons.math3.random.RandomGenerator; - -/** - * N-point crossover policy. For each iteration a random crossover point is - * selected and the first part from each parent is copied to the corresponding - * child, and the second parts are copied crosswise. - * - * Example (2-point crossover): - * <pre> - * -C- denotes a crossover point - * -C- -C- -C- -C- - * p1 = (1 0 | 1 0 0 1 | 0 1 1) X p2 = (0 1 | 1 0 1 0 | 1 1 1) - * \----/ \-------/ \-----/ \----/ \--------/ \-----/ - * || (*) || || (**) || - * VV (**) VV VV (*) VV - * /----\ /--------\ /-----\ /----\ /--------\ /-----\ - * c1 = (1 0 | 1 0 1 0 | 0 1 1) X c2 = (0 1 | 1 0 0 1 | 0 1 1) - * </pre> - * - * This policy works only on {@link AbstractListChromosome}, and therefore it - * is parameterized by T. Moreover, the chromosomes must have same lengths. - * - * @param <T> generic type of the {@link AbstractListChromosome}s for crossover - * @since 3.1 - */ -public class NPointCrossover<T> implements CrossoverPolicy { - - /** The number of crossover points. */ - private final int crossoverPoints; - - /** - * Creates a new {@link NPointCrossover} policy using the given number of points. - * <p> - * <b>Note</b>: the number of crossover points must be &lt; <code>chromosome length - 1</code>. - * This condition can only be checked at runtime, as the chromosome length is not known in advance. - * - * @param crossoverPoints the number of crossover points - * @throws NotStrictlyPositiveException if the number of {@code crossoverPoints} is not strictly positive - */ -<span class="fc" id="L66"> public NPointCrossover(final int crossoverPoints) throws NotStrictlyPositiveException {</span> -<span class="pc bpc" id="L67" title="1 of 2 branches missed."> if (crossoverPoints <= 0) {</span> -<span class="nc" id="L68"> throw new NotStrictlyPositiveException(crossoverPoints);</span> - } -<span class="fc" id="L70"> this.crossoverPoints = crossoverPoints;</span> -<span class="fc" id="L71"> }</span> - - /** - * Returns the number of crossover points used by this {@link CrossoverPolicy}. - * - * @return the number of crossover points - */ - public int getCrossoverPoints() { -<span class="nc" id="L79"> return crossoverPoints;</span> - } - - /** - * Performs a N-point crossover. N random crossover points are selected and are used - * to divide the parent chromosomes into segments. The segments are copied in alternate - * order from the two parents to the corresponding child chromosomes. - * - * Example (2-point crossover): - * <pre> - * -C- denotes a crossover point - * -C- -C- -C- -C- - * p1 = (1 0 | 1 0 0 1 | 0 1 1) X p2 = (0 1 | 1 0 1 0 | 1 1 1) - * \----/ \-------/ \-----/ \----/ \--------/ \-----/ - * || (*) || || (**) || - * VV (**) VV VV (*) VV - * /----\ /--------\ /-----\ /----\ /--------\ /-----\ - * c1 = (1 0 | 1 0 1 0 | 0 1 1) X c2 = (0 1 | 1 0 0 1 | 0 1 1) - * </pre> - * - * @param first first parent (p1) - * @param second second parent (p2) - * @return pair of two children (c1,c2) - * @throws MathIllegalArgumentException iff one of the chromosomes is - * not an instance of {@link AbstractListChromosome} - * @throws DimensionMismatchException if the length of the two chromosomes is different - */ - @SuppressWarnings("unchecked") // OK because of instanceof checks - public ChromosomePair crossover(final Chromosome first, final Chromosome second) - throws DimensionMismatchException, MathIllegalArgumentException { - -<span class="fc bfc" id="L110" title="All 4 branches covered."> if (!(first instanceof AbstractListChromosome<?> && second instanceof AbstractListChromosome<?>)) {</span> -<span class="fc" id="L111"> throw new MathIllegalArgumentException(LocalizedFormats.INVALID_FIXED_LENGTH_CHROMOSOME);</span> - } -<span class="fc" id="L113"> return mate((AbstractListChromosome<T>) first, (AbstractListChromosome<T>) second);</span> - } - - /** - * Helper for {@link #crossover(Chromosome, Chromosome)}. Performs the actual crossover. - * - * @param first the first chromosome - * @param second the second chromosome - * @return the pair of new chromosomes that resulted from the crossover - * @throws DimensionMismatchException if the length of the two chromosomes is different - * @throws NumberIsTooLargeException if the number of crossoverPoints is too large for the actual chromosomes - */ - private ChromosomePair mate(final AbstractListChromosome<T> first, - final AbstractListChromosome<T> second) - throws DimensionMismatchException, NumberIsTooLargeException { - -<span class="fc" id="L129"> final int length = first.getLength();</span> -<span class="fc bfc" id="L130" title="All 2 branches covered."> if (length != second.getLength()) {</span> -<span class="fc" id="L131"> throw new DimensionMismatchException(second.getLength(), length);</span> - } -<span class="fc bfc" id="L133" title="All 2 branches covered."> if (crossoverPoints >= length) {</span> -<span class="fc" id="L134"> throw new NumberIsTooLargeException(crossoverPoints, length, false);</span> - } - - // array representations of the parents -<span class="fc" id="L138"> final List<T> parent1Rep = first.getRepresentation();</span> -<span class="fc" id="L139"> final List<T> parent2Rep = second.getRepresentation();</span> - // and of the children -<span class="fc" id="L141"> final List<T> child1Rep = new ArrayList<T>(length);</span> -<span class="fc" id="L142"> final List<T> child2Rep = new ArrayList<T>(length);</span> - -<span class="fc" id="L144"> final RandomGenerator random = GeneticAlgorithm.getRandomGenerator();</span> - -<span class="fc" id="L146"> List<T> c1 = child1Rep;</span> -<span class="fc" id="L147"> List<T> c2 = child2Rep;</span> - -<span class="fc" id="L149"> int remainingPoints = crossoverPoints;</span> -<span class="fc" id="L150"> int lastIndex = 0;</span> -<span class="fc bfc" id="L151" title="All 2 branches covered."> for (int i = 0; i < crossoverPoints; i++, remainingPoints--) {</span> - // select the next crossover point at random -<span class="fc" id="L153"> final int crossoverIndex = 1 + lastIndex + random.nextInt(length - lastIndex - remainingPoints);</span> - - // copy the current segment -<span class="fc bfc" id="L156" title="All 2 branches covered."> for (int j = lastIndex; j < crossoverIndex; j++) {</span> -<span class="fc" id="L157"> c1.add(parent1Rep.get(j));</span> -<span class="fc" id="L158"> c2.add(parent2Rep.get(j));</span> - } - - // swap the children for the next segment -<span class="fc" id="L162"> List<T> tmp = c1;</span> -<span class="fc" id="L163"> c1 = c2;</span> -<span class="fc" id="L164"> c2 = tmp;</span> - -<span class="fc" id="L166"> lastIndex = crossoverIndex;</span> - } - - // copy the last segment -<span class="fc bfc" id="L170" title="All 2 branches covered."> for (int j = lastIndex; j < length; j++) {</span> -<span class="fc" id="L171"> c1.add(parent1Rep.get(j));</span> -<span class="fc" id="L172"> c2.add(parent2Rep.get(j));</span> - } - -<span class="fc" id="L175"> return new ChromosomePair(first.newFixedLengthChromosome(child1Rep),</span> - second.newFixedLengthChromosome(child2Rep)); - } -} -</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/01b308ff3db47a0404363acdcccadd471dab93fe.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/01b308ff3db47a0404363acdcccadd471dab93fe.svn-base b/site-content/.svn/pristine/01/01b308ff3db47a0404363acdcccadd471dab93fe.svn-base deleted file mode 100644 index 01df6cc..0000000 --- a/site-content/.svn/pristine/01/01b308ff3db47a0404363acdcccadd471dab93fe.svn-base +++ /dev/null @@ -1,24 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xml:lang="en" lang="en"> - <head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <title>Apache Commons Math 3.6.1 Reference Package org.apache.commons.math3.ml.clustering.evaluation</title> - <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="style" /> - </head> - <body> - - <h3> - <a href="package-summary.html" target="classFrame">org.apache.commons.math3.ml.clustering.evaluation</a> - </h3> - - <h3>Classes</h3> - - <ul> - <li> - <a href="SumOfClusterVariancesTest.html" target="classFrame">SumOfClusterVariancesTest</a> - </li> - </ul> - - </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/01bd7b0c2d4d795a10d660496202021513fb2d34.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/01bd7b0c2d4d795a10d660496202021513fb2d34.svn-base b/site-content/.svn/pristine/01/01bd7b0c2d4d795a10d660496202021513fb2d34.svn-base deleted file mode 100644 index 5e8b80f..0000000 --- a/site-content/.svn/pristine/01/01bd7b0c2d4d795a10d660496202021513fb2d34.svn-base +++ /dev/null @@ -1,295 +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>MultivariateFunctionMappingAdapter.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.optim.nonlinear.scalar</a> > <span class="el _source">MultivariateFunctionMappingAdapter.java</span></div><h1>MultivariateFunctionMappingAdapter.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.optim.nonlinear.scalar; - -import org.apache.commons.math3.analysis.MultivariateFunction; -import org.apache.commons.math3.analysis.UnivariateFunction; -import org.apache.commons.math3.analysis.function.Logit; -import org.apache.commons.math3.analysis.function.Sigmoid; -import org.apache.commons.math3.exception.DimensionMismatchException; -import org.apache.commons.math3.exception.NumberIsTooSmallException; -import org.apache.commons.math3.util.FastMath; -import org.apache.commons.math3.util.MathUtils; - -/** - * <p>Adapter for mapping bounded {@link MultivariateFunction} to unbounded ones.</p> - * - * <p> - * This adapter can be used to wrap functions subject to simple bounds on - * parameters so they can be used by optimizers that do <em>not</em> directly - * support simple bounds. - * </p> - * <p> - * The principle is that the user function that will be wrapped will see its - * parameters bounded as required, i.e when its {@code value} method is called - * with argument array {@code point}, the elements array will fulfill requirement - * {@code lower[i] <= point[i] <= upper[i]} for all i. Some of the components - * may be unbounded or bounded only on one side if the corresponding bound is - * set to an infinite value. The optimizer will not manage the user function by - * itself, but it will handle this adapter and it is this adapter that will take - * care the bounds are fulfilled. The adapter {@link #value(double[])} method will - * be called by the optimizer with unbound parameters, and the adapter will map - * the unbounded value to the bounded range using appropriate functions like - * {@link Sigmoid} for double bounded elements for example. - * </p> - * <p> - * As the optimizer sees only unbounded parameters, it should be noted that the - * start point or simplex expected by the optimizer should be unbounded, so the - * user is responsible for converting his bounded point to unbounded by calling - * {@link #boundedToUnbounded(double[])} before providing them to the optimizer. - * For the same reason, the point returned by the {@link - * org.apache.commons.math3.optimization.BaseMultivariateOptimizer#optimize(int, - * MultivariateFunction, org.apache.commons.math3.optimization.GoalType, double[])} - * method is unbounded. So to convert this point to bounded, users must call - * {@link #unboundedToBounded(double[])} by themselves!</p> - * <p> - * This adapter is only a poor man solution to simple bounds optimization constraints - * that can be used with simple optimizers like - * {@link org.apache.commons.math3.optim.nonlinear.scalar.noderiv.SimplexOptimizer - * SimplexOptimizer}. - * A better solution is to use an optimizer that directly supports simple bounds like - * {@link org.apache.commons.math3.optim.nonlinear.scalar.noderiv.CMAESOptimizer - * CMAESOptimizer} or - * {@link org.apache.commons.math3.optim.nonlinear.scalar.noderiv.BOBYQAOptimizer - * BOBYQAOptimizer}. - * One caveat of this poor-man's solution is that behavior near the bounds may be - * numerically unstable as bounds are mapped from infinite values. - * Another caveat is that convergence values are evaluated by the optimizer with - * respect to unbounded variables, so there will be scales differences when - * converted to bounded variables. - * </p> - * - * @see MultivariateFunctionPenaltyAdapter - * - * @since 3.0 - */ -public class MultivariateFunctionMappingAdapter - implements MultivariateFunction { - /** Underlying bounded function. */ - private final MultivariateFunction bounded; - /** Mapping functions. */ - private final Mapper[] mappers; - - /** Simple constructor. - * @param bounded bounded function - * @param lower lower bounds for each element of the input parameters array - * (some elements may be set to {@code Double.NEGATIVE_INFINITY} for - * unbounded values) - * @param upper upper bounds for each element of the input parameters array - * (some elements may be set to {@code Double.POSITIVE_INFINITY} for - * unbounded values) - * @exception DimensionMismatchException if lower and upper bounds are not - * consistent, either according to dimension or to values - */ - public MultivariateFunctionMappingAdapter(final MultivariateFunction bounded, -<span class="fc" id="L99"> final double[] lower, final double[] upper) {</span> - // safety checks -<span class="fc" id="L101"> MathUtils.checkNotNull(lower);</span> -<span class="fc" id="L102"> MathUtils.checkNotNull(upper);</span> -<span class="pc bpc" id="L103" title="1 of 2 branches missed."> if (lower.length != upper.length) {</span> -<span class="nc" id="L104"> throw new DimensionMismatchException(lower.length, upper.length);</span> - } -<span class="fc bfc" id="L106" title="All 2 branches covered."> for (int i = 0; i < lower.length; ++i) {</span> - // note the following test is written in such a way it also fails for NaN -<span class="pc bpc" id="L108" title="1 of 2 branches missed."> if (!(upper[i] >= lower[i])) {</span> -<span class="nc" id="L109"> throw new NumberIsTooSmallException(upper[i], lower[i], true);</span> - } - } - -<span class="fc" id="L113"> this.bounded = bounded;</span> -<span class="fc" id="L114"> this.mappers = new Mapper[lower.length];</span> -<span class="fc bfc" id="L115" title="All 2 branches covered."> for (int i = 0; i < mappers.length; ++i) {</span> -<span class="fc bfc" id="L116" title="All 2 branches covered."> if (Double.isInfinite(lower[i])) {</span> -<span class="fc bfc" id="L117" title="All 2 branches covered."> if (Double.isInfinite(upper[i])) {</span> - // element is unbounded, no transformation is needed -<span class="fc" id="L119"> mappers[i] = new NoBoundsMapper();</span> - } else { - // element is simple-bounded on the upper side -<span class="fc" id="L122"> mappers[i] = new UpperBoundMapper(upper[i]);</span> - } - } else { -<span class="fc bfc" id="L125" title="All 2 branches covered."> if (Double.isInfinite(upper[i])) {</span> - // element is simple-bounded on the lower side -<span class="fc" id="L127"> mappers[i] = new LowerBoundMapper(lower[i]);</span> - } else { - // element is double-bounded -<span class="fc" id="L130"> mappers[i] = new LowerUpperBoundMapper(lower[i], upper[i]);</span> - } - } - } -<span class="fc" id="L134"> }</span> - - /** - * Maps an array from unbounded to bounded. - * - * @param point Unbounded values. - * @return the bounded values. - */ - public double[] unboundedToBounded(double[] point) { - // Map unbounded input point to bounded point. -<span class="fc" id="L144"> final double[] mapped = new double[mappers.length];</span> -<span class="fc bfc" id="L145" title="All 2 branches covered."> for (int i = 0; i < mappers.length; ++i) {</span> -<span class="fc" id="L146"> mapped[i] = mappers[i].unboundedToBounded(point[i]);</span> - } - -<span class="fc" id="L149"> return mapped;</span> - } - - /** - * Maps an array from bounded to unbounded. - * - * @param point Bounded values. - * @return the unbounded values. - */ - public double[] boundedToUnbounded(double[] point) { - // Map bounded input point to unbounded point. -<span class="fc" id="L160"> final double[] mapped = new double[mappers.length];</span> -<span class="fc bfc" id="L161" title="All 2 branches covered."> for (int i = 0; i < mappers.length; ++i) {</span> -<span class="fc" id="L162"> mapped[i] = mappers[i].boundedToUnbounded(point[i]);</span> - } - -<span class="fc" id="L165"> return mapped;</span> - } - - /** - * Compute the underlying function value from an unbounded point. - * <p> - * This method simply bounds the unbounded point using the mappings - * set up at construction and calls the underlying function using - * the bounded point. - * </p> - * @param point unbounded value - * @return underlying function value - * @see #unboundedToBounded(double[]) - */ - public double value(double[] point) { -<span class="fc" id="L180"> return bounded.value(unboundedToBounded(point));</span> - } - - /** Mapping interface. */ - private interface Mapper { - /** - * Maps a value from unbounded to bounded. - * - * @param y Unbounded value. - * @return the bounded value. - */ - double unboundedToBounded(double y); - - /** - * Maps a value from bounded to unbounded. - * - * @param x Bounded value. - * @return the unbounded value. - */ - double boundedToUnbounded(double x); - } - - /** Local class for no bounds mapping. */ -<span class="fc" id="L203"> private static class NoBoundsMapper implements Mapper {</span> - /** {@inheritDoc} */ - public double unboundedToBounded(final double y) { -<span class="fc" id="L206"> return y;</span> - } - - /** {@inheritDoc} */ - public double boundedToUnbounded(final double x) { -<span class="fc" id="L211"> return x;</span> - } - } - - /** Local class for lower bounds mapping. */ - private static class LowerBoundMapper implements Mapper { - /** Low bound. */ - private final double lower; - - /** - * Simple constructor. - * - * @param lower lower bound - */ -<span class="fc" id="L225"> LowerBoundMapper(final double lower) {</span> -<span class="fc" id="L226"> this.lower = lower;</span> -<span class="fc" id="L227"> }</span> - - /** {@inheritDoc} */ - public double unboundedToBounded(final double y) { -<span class="fc" id="L231"> return lower + FastMath.exp(y);</span> - } - - /** {@inheritDoc} */ - public double boundedToUnbounded(final double x) { -<span class="fc" id="L236"> return FastMath.log(x - lower);</span> - } - - } - - /** Local class for upper bounds mapping. */ - private static class UpperBoundMapper implements Mapper { - - /** Upper bound. */ - private final double upper; - - /** Simple constructor. - * @param upper upper bound - */ -<span class="fc" id="L250"> UpperBoundMapper(final double upper) {</span> -<span class="fc" id="L251"> this.upper = upper;</span> -<span class="fc" id="L252"> }</span> - - /** {@inheritDoc} */ - public double unboundedToBounded(final double y) { -<span class="fc" id="L256"> return upper - FastMath.exp(-y);</span> - } - - /** {@inheritDoc} */ - public double boundedToUnbounded(final double x) { -<span class="fc" id="L261"> return -FastMath.log(upper - x);</span> - } - - } - - /** Local class for lower and bounds mapping. */ - private static class LowerUpperBoundMapper implements Mapper { - /** Function from unbounded to bounded. */ - private final UnivariateFunction boundingFunction; - /** Function from bounded to unbounded. */ - private final UnivariateFunction unboundingFunction; - - /** - * Simple constructor. - * - * @param lower lower bound - * @param upper upper bound - */ -<span class="fc" id="L279"> LowerUpperBoundMapper(final double lower, final double upper) {</span> -<span class="fc" id="L280"> boundingFunction = new Sigmoid(lower, upper);</span> -<span class="fc" id="L281"> unboundingFunction = new Logit(lower, upper);</span> -<span class="fc" id="L282"> }</span> - - /** {@inheritDoc} */ - public double unboundedToBounded(final double y) { -<span class="fc" id="L286"> return boundingFunction.value(y);</span> - } - - /** {@inheritDoc} */ - public double boundedToUnbounded(final double x) { -<span class="fc" id="L291"> return unboundingFunction.value(x);</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/01bdd85a5975d46e61e375217850a716db1fc4cb.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/01bdd85a5975d46e61e375217850a716db1fc4cb.svn-base b/site-content/.svn/pristine/01/01bdd85a5975d46e61e375217850a716db1fc4cb.svn-base deleted file mode 100644 index 6b186b0..0000000 --- a/site-content/.svn/pristine/01/01bdd85a5975d46e61e375217850a716db1fc4cb.svn-base +++ /dev/null @@ -1,137 +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>ClassicalRungeKuttaFieldStepInterpolator.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.ode.nonstiff</a> > <span class="el_sou rce">ClassicalRungeKuttaFieldStepInterpolator.java</span></div><h1>ClassicalRungeKuttaFieldStepInterpolator.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.ode.nonstiff; - -import org.apache.commons.math3.Field; -import org.apache.commons.math3.RealFieldElement; -import org.apache.commons.math3.ode.FieldEquationsMapper; -import org.apache.commons.math3.ode.FieldODEStateAndDerivative; - -/** - * This class implements a step interpolator for the classical fourth - * order Runge-Kutta integrator. - * - * <p>This interpolator allows to compute dense output inside the last - * step computed. The interpolation equation is consistent with the - * integration scheme : - * <ul> - * <li>Using reference point at step start:<br> - * y(t<sub>n</sub> + &theta; h) = y (t<sub>n</sub>) - * + &theta; (h/6) [ (6 - 9 &theta; + 4 &theta;<sup>2</sup>) y'<sub>1</sub> - * + ( 6 &theta; - 4 &theta;<sup>2</sup>) (y'<sub>2</sub> + y'<sub>3</sub>) - * + ( -3 &theta; + 4 &theta;<sup>2</sup>) y'<sub>4</sub> - * ] - * </li> - * <li>Using reference point at step end:<br> - * y(t<sub>n</sub> + &theta; h) = y (t<sub>n</sub> + h) - * + (1 - &theta;) (h/6) [ (-4 &theta;^2 + 5 &theta; - 1) y'<sub>1</sub> - * +(4 &theta;^2 - 2 &theta; - 2) (y'<sub>2</sub> + y'<sub>3</sub>) - * -(4 &theta;^2 + &theta; + 1) y'<sub>4</sub> - * ] - * </li> - * </ul> - * </p> - * - * where &theta; belongs to [0 ; 1] and where y'<sub>1</sub> to y'<sub>4</sub> are the four - * evaluations of the derivatives already computed during the - * step.</p> - * - * @see ClassicalRungeKuttaFieldIntegrator - * @param <T> the type of the field elements - * @since 3.6 - */ - -class ClassicalRungeKuttaFieldStepInterpolator<T extends RealFieldElement<T>> - extends RungeKuttaFieldStepInterpolator<T> { - - /** Simple constructor. - * @param field field to which the time and state vector elements belong - * @param forward integration direction indicator - * @param yDotK slopes at the intermediate points - * @param globalPreviousState start of the global step - * @param globalCurrentState end of the global step - * @param softPreviousState start of the restricted step - * @param softCurrentState end of the restricted step - * @param mapper equations mapper for the all equations - */ - ClassicalRungeKuttaFieldStepInterpolator(final Field<T> field, final boolean forward, - final T[][] yDotK, - final FieldODEStateAndDerivative<T> globalPreviousState, - final FieldODEStateAndDerivative<T> globalCurrentState, - final FieldODEStateAndDerivative<T> softPreviousState, - final FieldODEStateAndDerivative<T> softCurrentState, - final FieldEquationsMapper<T> mapper) { -<span class="fc" id="L79"> super(field, forward, yDotK,</span> - globalPreviousState, globalCurrentState, softPreviousState, softCurrentState, - mapper); -<span class="fc" id="L82"> }</span> - - /** {@inheritDoc} */ - @Override - protected ClassicalRungeKuttaFieldStepInterpolator<T> create(final Field<T> newField, final boolean newForward, final T[][] newYDotK, - final FieldODEStateAndDerivative<T> newGlobalPreviousState, - final FieldODEStateAndDerivative<T> newGlobalCurrentState, - final FieldODEStateAndDerivative<T> newSoftPreviousState, - final FieldODEStateAndDerivative<T> newSoftCurrentState, - final FieldEquationsMapper<T> newMapper) { -<span class="fc" id="L92"> return new ClassicalRungeKuttaFieldStepInterpolator<T>(newField, newForward, newYDotK,</span> - newGlobalPreviousState, newGlobalCurrentState, - newSoftPreviousState, newSoftCurrentState, - newMapper); - } - - /** {@inheritDoc} */ - @SuppressWarnings("unchecked") - @Override - protected FieldODEStateAndDerivative<T> computeInterpolatedStateAndDerivatives(final FieldEquationsMapper<T> mapper, - final T time, final T theta, - final T thetaH, final T oneMinusThetaH) { - -<span class="fc" id="L105"> final T one = time.getField().getOne();</span> -<span class="fc" id="L106"> final T oneMinusTheta = one.subtract(theta);</span> -<span class="fc" id="L107"> final T oneMinus2Theta = one.subtract(theta.multiply(2));</span> -<span class="fc" id="L108"> final T coeffDot1 = oneMinusTheta.multiply(oneMinus2Theta);</span> -<span class="fc" id="L109"> final T coeffDot23 = theta.multiply(oneMinusTheta).multiply(2);</span> -<span class="fc" id="L110"> final T coeffDot4 = theta.multiply(oneMinus2Theta).negate();</span> - final T[] interpolatedState; - final T[] interpolatedDerivatives; - -<span class="pc bpc" id="L114" title="1 of 4 branches missed."> if (getGlobalPreviousState() != null && theta.getReal() <= 0.5) {</span> -<span class="fc" id="L115"> final T fourTheta2 = theta.multiply(theta).multiply(4);</span> -<span class="fc" id="L116"> final T s = thetaH.divide(6.0);</span> -<span class="fc" id="L117"> final T coeff1 = s.multiply(fourTheta2.subtract(theta.multiply(9)).add(6));</span> -<span class="fc" id="L118"> final T coeff23 = s.multiply(theta.multiply(6).subtract(fourTheta2));</span> -<span class="fc" id="L119"> final T coeff4 = s.multiply(fourTheta2.subtract(theta.multiply(3)));</span> -<span class="fc" id="L120"> interpolatedState = previousStateLinearCombination(coeff1, coeff23, coeff23, coeff4);</span> -<span class="fc" id="L121"> interpolatedDerivatives = derivativeLinearCombination(coeffDot1, coeffDot23, coeffDot23, coeffDot4);</span> -<span class="fc" id="L122"> } else {</span> -<span class="fc" id="L123"> final T fourTheta = theta.multiply(4);</span> -<span class="fc" id="L124"> final T s = oneMinusThetaH.divide(6);</span> -<span class="fc" id="L125"> final T coeff1 = s.multiply(theta.multiply(fourTheta.negate().add(5)).subtract(1));</span> -<span class="fc" id="L126"> final T coeff23 = s.multiply(theta.multiply(fourTheta.subtract(2)).subtract(2));</span> -<span class="fc" id="L127"> final T coeff4 = s.multiply(theta.multiply(fourTheta.negate().subtract(1)).subtract(1));</span> -<span class="fc" id="L128"> interpolatedState = currentStateLinearCombination(coeff1, coeff23, coeff23, coeff4);</span> -<span class="fc" id="L129"> interpolatedDerivatives = derivativeLinearCombination(coeffDot1, coeffDot23, coeffDot23, coeffDot4);</span> - } - -<span class="fc" id="L132"> return new FieldODEStateAndDerivative<T>(time, interpolatedState, interpolatedDerivatives);</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/01bf880dd62361d32e359737d6964ca4de5d8057.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/01bf880dd62361d32e359737d6964ca4de5d8057.svn-base b/site-content/.svn/pristine/01/01bf880dd62361d32e359737d6964ca4de5d8057.svn-base deleted file mode 100644 index b55feff..0000000 --- a/site-content/.svn/pristine/01/01bf880dd62361d32e359737d6964ca4de5d8057.svn-base +++ /dev/null @@ -1,411 +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>TestProblem4 (Apache Commons Math 3.5 Test 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="TestProblem4 (Apache Commons Math 3.5 Test 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/TestProblem4.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/ode/TestProblem3.html" title="class in org.apache.commons.math3.ode"><span class="strong">PREV CLASS</span></a></li> -<li><a href="../../../../../org/apache/commons/math3/ode/TestProblem5.html" title="class in org.apache.commons.math3.ode"><span class="strong">NEXT CLASS</span></a></li> -</ul> -<ul class="navList"> -<li><a href="../../../../../index.html?org/apache/commons/math3/ode/TestProblem4.html" target="_top">FRAMES</a></li> -<li><a href="TestProblem4.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="#fields_inherited_from_class_org.apache.commons.math3.ode.TestProblemAbstract">FIELD</a> | </li> -<li><a href="#constructor_summary">CONSTR</a> | </li> -<li><a href="#method_summary">METHOD</a></li> -</ul> -<ul class="subNavList"> -<li>DETAIL: </li> -<li>FIELD | </li> -<li><a href="#constructor_detail">CONSTR</a> | </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"> -<p class="subTitle">org.apache.commons.math3.ode</p> -<h2 title="Class TestProblem4" class="title">Class TestProblem4</h2> -</div> -<div class="contentContainer"> -<ul class="inheritance"> -<li><a href="http://docs.oracle.com/javase/6/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="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html" title="class in org.apache.commons.math3.ode">org.apache.commons.math3.ode.TestProblemAbstract</a></li> -<li> -<ul class="inheritance"> -<li>org.apache.commons.math3.ode.TestProblem4</li> -</ul> -</li> -</ul> -</li> -</ul> -<div class="description"> -<ul class="blockList"> -<li class="blockList"> -<dl> -<dt>All Implemented Interfaces:</dt> -<dd><a href="../../../../../../apidocs/org/apache/commons/math3/ode/FirstOrderDifferentialEquations.html?is-external=true" title="class or interface in org.apache.commons.math3.ode">FirstOrderDifferentialEquations</a></dd> -</dl> -<hr> -<br> -<pre>public class <a href="../../../../../src-html/org/apache/commons/math3/ode/TestProblem4.html#line.38">TestProblem4</a> -extends <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html" title="class in org.apache.commons.math3.ode">TestProblemAbstract</a></pre> -<div class="block">This class is used in the junit tests for the ODE integrators. - - <p>This specific problem is the following differential equation : - <pre> - x'' = -x - </pre> - And when x decreases down to 0, the state should be changed as follows : - <pre> - x' -> -x' - </pre> - The theoretical solution of this problem is x = |sin(t+a)| - </p></div> -</li> -</ul> -</div> -<div class="summary"> -<ul class="blockList"> -<li class="blockList"> -<!-- =========== FIELD SUMMARY =========== --> -<ul class="blockList"> -<li class="blockList"><a name="field_summary"> -<!-- --> -</a> -<h3>Field Summary</h3> -<ul class="blockList"> -<li class="blockList"><a name="fields_inherited_from_class_org.apache.commons.math3.ode.TestProblemAbstract"> -<!-- --> -</a> -<h3>Fields inherited from class org.apache.commons.math3.ode.<a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html" title="class in org.apache.commons.math3.ode">TestProblemAbstract</a></h3> -<code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#calls">calls</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#errorScale">errorScale</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#n">n</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#t0">t0</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#t1">t1</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#y0">y0</a></code></li> -</ul> -</li> -</ul> -<!-- ======== CONSTRUCTOR SUMMARY ======== --> -<ul class="blockList"> -<li class="blockList"><a name="constructor_summary"> -<!-- --> -</a> -<h3>Constructor Summary</h3> -<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> -<caption><span>Constructors</span><span class="tabEnd"> </span></caption> -<tr> -<th class="colOne" scope="col">Constructor and Description</th> -</tr> -<tr class="altColor"> -<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html#TestProblem4()">TestProblem4</a></strong>()</code> -<div class="block">Simple constructor.</div> -</td> -</tr> -<tr class="rowColor"> -<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html#TestProblem4(org.apache.commons.math3.ode.TestProblem4)">TestProblem4</a></strong>(<a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html" title="class in org.apache.commons.math3.ode">TestProblem4</a> problem)</code> -<div class="block">Copy constructor.</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>double[]</code></td> -<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html#computeTheoreticalState(double)">computeTheoreticalState</a></strong>(double t)</code> -<div class="block">Compute the theoretical state at the specified time.</div> -</td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code><a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html" title="class in org.apache.commons.math3.ode">TestProblem4</a></code></td> -<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html#copy()">copy</a></strong>()</code> -<div class="block">Copy operation.</div> -</td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html#doComputeDerivatives(double, double[], double[])">doComputeDerivatives</a></strong>(double t, - double[] y, - double[] yDot)</code> </td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code><a href="../../../../../../apidocs/org/apache/commons/math3/ode/events/EventHandler.html?is-external=true" title="class or interface in org.apache.commons.math3.ode.events">EventHandler</a>[]</code></td> -<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html#getEventsHandlers()">getEventsHandlers</a></strong>()</code> -<div class="block">Get the events handlers.</div> -</td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>double[]</code></td> -<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html#getTheoreticalEventsTimes()">getTheoreticalEventsTimes</a></strong>()</code> -<div class="block">Get the theoretical events times.</div> -</td> -</tr> -</table> -<ul class="blockList"> -<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.ode.TestProblemAbstract"> -<!-- --> -</a> -<h3>Methods inherited from class org.apache.commons.math3.ode.<a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html" title="class in org.apache.commons.math3.ode">TestProblemAbstract</a></h3> -<code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#computeDerivatives(double, double[], double[])">computeDerivatives</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#getCalls()">getCalls</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#getDimension()">getDimension</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#getErrorScale()">getErrorScale</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#getFinalTime()">getFinalTime</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#getInitialState()">getInitialState</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#getInitialTime()">getInitialTime</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#setErrorScale(double[])">setErrorScale</a>, <a href="../../../../../org/apache/commons/ math3/ode/TestProblemAbstract.html#setFinalConditions(double)">setFinalConditions</a>, <a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#setInitialConditions(double, double[])">setInitialConditions</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/6/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/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/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/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/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/6/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/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/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/6/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/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" 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"> -<!-- ========= CONSTRUCTOR DETAIL ======== --> -<ul class="blockList"> -<li class="blockList"><a name="constructor_detail"> -<!-- --> -</a> -<h3>Constructor Detail</h3> -<a name="TestProblem4()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>TestProblem4</h4> -<pre>public <a href="../../../../../src-html/org/apache/commons/math3/ode/TestProblem4.html#line.48">TestProblem4</a>()</pre> -<div class="block">Simple constructor.</div> -</li> -</ul> -<a name="TestProblem4(org.apache.commons.math3.ode.TestProblem4)"> -<!-- --> -</a> -<ul class="blockListLast"> -<li class="blockList"> -<h4>TestProblem4</h4> -<pre>public <a href="../../../../../src-html/org/apache/commons/math3/ode/TestProblem4.html#line.63">TestProblem4</a>(<a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html" title="class in org.apache.commons.math3.ode">TestProblem4</a> problem)</pre> -<div class="block">Copy constructor.</div> -<dl><dt><span class="strong">Parameters:</span></dt><dd><code>problem</code> - problem to copy</dd></dl> -</li> -</ul> -</li> -</ul> -<!-- ============ METHOD DETAIL ========== --> -<ul class="blockList"> -<li class="blockList"><a name="method_detail"> -<!-- --> -</a> -<h3>Method Detail</h3> -<a name="copy()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>copy</h4> -<pre>public <a href="../../../../../org/apache/commons/math3/ode/TestProblem4.html" title="class in org.apache.commons.math3.ode">TestProblem4</a> <a href="../../../../../src-html/org/apache/commons/math3/ode/TestProblem4.html#line.71">copy</a>()</pre> -<div class="block">Copy operation.</div> -<dl> -<dt><strong>Specified by:</strong></dt> -<dd><code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#copy()">copy</a></code> in class <code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html" title="class in org.apache.commons.math3.ode">TestProblemAbstract</a></code></dd> -<dt><span class="strong">Returns:</span></dt><dd>a copy of the instance</dd></dl> -</li> -</ul> -<a name="getEventsHandlers()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>getEventsHandlers</h4> -<pre>public <a href="../../../../../../apidocs/org/apache/commons/math3/ode/events/EventHandler.html?is-external=true" title="class or interface in org.apache.commons.math3.ode.events">EventHandler</a>[] <a href="../../../../../src-html/org/apache/commons/math3/ode/TestProblem4.html#line.76">getEventsHandlers</a>()</pre> -<div class="block"><strong>Description copied from class: <code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#getEventsHandlers()">TestProblemAbstract</a></code></strong></div> -<div class="block">Get the events handlers.</div> -<dl> -<dt><strong>Overrides:</strong></dt> -<dd><code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#getEventsHandlers()">getEventsHandlers</a></code> in class <code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html" title="class in org.apache.commons.math3.ode">TestProblemAbstract</a></code></dd> -<dt><span class="strong">Returns:</span></dt><dd>events handlers</dd></dl> -</li> -</ul> -<a name="getTheoreticalEventsTimes()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>getTheoreticalEventsTimes</h4> -<pre>public double[] <a href="../../../../../src-html/org/apache/commons/math3/ode/TestProblem4.html#line.85">getTheoreticalEventsTimes</a>()</pre> -<div class="block">Get the theoretical events times.</div> -<dl> -<dt><strong>Overrides:</strong></dt> -<dd><code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#getTheoreticalEventsTimes()">getTheoreticalEventsTimes</a></code> in class <code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html" title="class in org.apache.commons.math3.ode">TestProblemAbstract</a></code></dd> -<dt><span class="strong">Returns:</span></dt><dd>theoretical events times</dd></dl> -</li> -</ul> -<a name="doComputeDerivatives(double, double[], double[])"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>doComputeDerivatives</h4> -<pre>public void <a href="../../../../../src-html/org/apache/commons/math3/ode/TestProblem4.html#line.96">doComputeDerivatives</a>(double t, - double[] y, - double[] yDot)</pre> -<dl> -<dt><strong>Specified by:</strong></dt> -<dd><code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#doComputeDerivatives(double, double[], double[])">doComputeDerivatives</a></code> in class <code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html" title="class in org.apache.commons.math3.ode">TestProblemAbstract</a></code></dd> -</dl> -</li> -</ul> -<a name="computeTheoreticalState(double)"> -<!-- --> -</a> -<ul class="blockListLast"> -<li class="blockList"> -<h4>computeTheoreticalState</h4> -<pre>public double[] <a href="../../../../../src-html/org/apache/commons/math3/ode/TestProblem4.html#line.102">computeTheoreticalState</a>(double t)</pre> -<div class="block"><strong>Description copied from class: <code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#computeTheoreticalState(double)">TestProblemAbstract</a></code></strong></div> -<div class="block">Compute the theoretical state at the specified time.</div> -<dl> -<dt><strong>Specified by:</strong></dt> -<dd><code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html#computeTheoreticalState(double)">computeTheoreticalState</a></code> in class <code><a href="../../../../../org/apache/commons/math3/ode/TestProblemAbstract.html" title="class in org.apache.commons.math3.ode">TestProblemAbstract</a></code></dd> -<dt><span class="strong">Parameters:</span></dt><dd><code>t</code> - time at which the state is required</dd> -<dt><span class="strong">Returns:</span></dt><dd>state vector at time t</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/TestProblem4.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/ode/TestProblem3.html" title="class in org.apache.commons.math3.ode"><span class="strong">PREV CLASS</span></a></li> -<li><a href="../../../../../org/apache/commons/math3/ode/TestProblem5.html" title="class in org.apache.commons.math3.ode"><span class="strong">NEXT CLASS</span></a></li> -</ul> -<ul class="navList"> -<li><a href="../../../../../index.html?org/apache/commons/math3/ode/TestProblem4.html" target="_top">FRAMES</a></li> -<li><a href="TestProblem4.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="#fields_inherited_from_class_org.apache.commons.math3.ode.TestProblemAbstract">FIELD</a> | </li> -<li><a href="#constructor_summary">CONSTR</a> | </li> -<li><a href="#method_summary">METHOD</a></li> -</ul> -<ul class="subNavList"> -<li>DETAIL: </li> -<li>FIELD | </li> -<li><a href="#constructor_detail">CONSTR</a> | </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–2015 <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/01c0af4f8fce9b0c40c2a5cad184c5aade2184f6.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/01c0af4f8fce9b0c40c2a5cad184c5aade2184f6.svn-base b/site-content/.svn/pristine/01/01c0af4f8fce9b0c40c2a5cad184c5aade2184f6.svn-base deleted file mode 100644 index a1c1c4d..0000000 --- a/site-content/.svn/pristine/01/01c0af4f8fce9b0c40c2a5cad184c5aade2184f6.svn-base +++ /dev/null @@ -1,169 +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>org.apache.commons.math3.ml.neuralnet.twod (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="org.apache.commons.math3.ml.neuralnet.twod (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 class="navBarCell1Rev">Package</li> -<li>Class</li> -<li><a href="package-use.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/ml/neuralnet/sofm/util/package-summary.html">Prev Package</a></li> -<li><a href="../../../../../../../org/apache/commons/math3/ml/neuralnet/twod/util/package-summary.html">Next Package</a></li> -</ul> -<ul class="navList"> -<li><a href="../../../../../../../index.html?org/apache/commons/math3/ml/neuralnet/twod/package-summary.html" target="_top">Frames</a></li> -<li><a href="package-summary.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"> -<h1 title="Package" class="title">Package org.apache.commons.math3.ml.neuralnet.twod</h1> -<div class="docSummary"> -<div class="block">Two-dimensional neural networks.</div> -</div> -<p>See: <a href="#package_description">Description</a></p> -</div> -<div class="contentContainer"> -<ul class="blockList"> -<li class="blockList"> -<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> -<caption><span>Class Summary</span><span class="tabEnd"> </span></caption> -<tr> -<th class="colFirst" scope="col">Class</th> -<th class="colLast" scope="col">Description</th> -</tr> -<tbody> -<tr class="altColor"> -<td class="colFirst"><a href="../../../../../../../org/apache/commons/math3/ml/neuralnet/twod/NeuronSquareMesh2D.html" title="class in org.apache.commons.math3.ml.neuralnet.twod">NeuronSquareMesh2D</a></td> -<td class="colLast"> -<div class="block">Neural network with the topology of a two-dimensional surface.</div> -</td> -</tr> -</tbody> -</table> -</li> -<li class="blockList"> -<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Summary table, listing enums, and an explanation"> -<caption><span>Enum Summary</span><span class="tabEnd"> </span></caption> -<tr> -<th class="colFirst" scope="col">Enum</th> -<th class="colLast" scope="col">Description</th> -</tr> -<tbody> -<tr class="altColor"> -<td class="colFirst"><a href="../../../../../../../org/apache/commons/math3/ml/neuralnet/twod/NeuronSquareMesh2D.HorizontalDirection.html" title="enum in org.apache.commons.math3.ml.neuralnet.twod">NeuronSquareMesh2D.HorizontalDirection</a></td> -<td class="colLast"> -<div class="block">Horizontal (along row) direction.</div> -</td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><a href="../../../../../../../org/apache/commons/math3/ml/neuralnet/twod/NeuronSquareMesh2D.VerticalDirection.html" title="enum in org.apache.commons.math3.ml.neuralnet.twod">NeuronSquareMesh2D.VerticalDirection</a></td> -<td class="colLast"> -<div class="block">Vertical (along column) direction.</div> -</td> -</tr> -</tbody> -</table> -</li> -</ul> -<a name="package_description"> -<!-- --> -</a> -<h2 title="Package org.apache.commons.math3.ml.neuralnet.twod Description">Package org.apache.commons.math3.ml.neuralnet.twod Description</h2> -<div class="block">Two-dimensional neural networks.</div> -</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 class="navBarCell1Rev">Package</li> -<li>Class</li> -<li><a href="package-use.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/ml/neuralnet/sofm/util/package-summary.html">Prev Package</a></li> -<li><a href="../../../../../../../org/apache/commons/math3/ml/neuralnet/twod/util/package-summary.html">Next Package</a></li> -</ul> -<ul class="navList"> -<li><a href="../../../../../../../index.html?org/apache/commons/math3/ml/neuralnet/twod/package-summary.html" target="_top">Frames</a></li> -<li><a href="package-summary.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/01c41f02a73de5bf01d35dc9bb44fe132f85e708.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/01/01c41f02a73de5bf01d35dc9bb44fe132f85e708.svn-base b/site-content/.svn/pristine/01/01c41f02a73de5bf01d35dc9bb44fe132f85e708.svn-base deleted file mode 100644 index 4506bc6..0000000 --- a/site-content/.svn/pristine/01/01c41f02a73de5bf01d35dc9bb44fe132f85e708.svn-base +++ /dev/null @@ -1,79 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xml:lang="en" lang="en"> - <head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <title>Apache Commons Math 3.6.1 Reference Package org.apache.commons.math3.optim.nonlinear.scalar.gradient</title> - <link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="style" /> - </head> - <body> - <div class="overview"> - <ul> - <li> - <a href="../../../../../../../../overview-summary.html">Overview</a> - </li> - <li class="selected">Package</li> - </ul> - </div> - <div class="framenoframe"> - <ul> - <li> - <a href="../../../../../../../../index.html" target="_top">FRAMES</a> - </li> - <li> - <a href="package-summary.html" target="_top">NO FRAMES</a> - </li> - </ul> - </div> - - <h2>Package org.apache.commons.math3.optim.nonlinear.scalar.gradient</h2> - - <table class="summary"> - <thead> - <tr> - <th>Class Summary</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <a href="CircleScalar.html" target="classFrame">CircleScalar</a> - </td> - </tr> - <tr> - <td> - <a href="NonLinearConjugateGradientOptimizerTest.html" target="classFrame">LinearProblem</a> - </td> - </tr> - <tr> - <td> - <a href="NonLinearConjugateGradientOptimizerTest.html" target="classFrame">NonLinearConjugateGradientOptimizerTest</a> - </td> - </tr> - </tbody> - </table> - - <div class="overview"> - <ul> - <li> - <a href="../../../../../../../../overview-summary.html">Overview</a> - </li> - <li class="selected">Package</li> - </ul> - </div> - <div class="framenoframe"> - <ul> - <li> - <a href="../../../../../../../../index.html" target="_top">FRAMES</a> - </li> - <li> - <a href="package-summary.html" target="_top">NO FRAMES</a> - </li> - </ul> - </div> - <hr /> - <div id="footer"> - Copyright © 2003–2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - </div> - </body> -</html> \ No newline at end of file
