svn commit: r1485009 - /commons/proper/io/trunk/pom.xml
Author: sebb Date: Tue May 21 23:09:25 2013 New Revision: 1485009 URL: http://svn.apache.org/r1485009 Log: Suppress JaCoCo now IO uses Cobertura Modified: commons/proper/io/trunk/pom.xml Modified: commons/proper/io/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/pom.xml?rev=1485009&r1=1485008&r2=1485009&view=diff == --- commons/proper/io/trunk/pom.xml (original) +++ commons/proper/io/trunk/pom.xml Tue May 21 23:09:25 2013 @@ -251,6 +251,8 @@ file comparators, endian transformation site-content + +true
svn commit: r1484954 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java
Author: tn Date: Tue May 21 20:55:58 2013 New Revision: 1484954 URL: http://svn.apache.org/r1484954 Log: small fixes Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java?rev=1484954&r1=1484953&r2=1484954&view=diff == --- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java Tue May 21 20:55:58 2013 @@ -126,7 +126,7 @@ public class ClusteringExamples { } int[] nSamplesPerCenter = new int[centers]; -int count = (samples / centers) * centers; +int count = samples / centers; Arrays.fill(nSamplesPerCenter, count); for (int i = 0; i < samples % centers; i++) { @@ -288,7 +288,7 @@ public class ClusteringExamples { } g2.setPaint(Color.black); -g2.drawString(String.format("%.2f s", duration / 1e3), w - 30, h - 5); +g2.drawString(String.format("%.2f s", duration / 1e3), w - 40, h - 5); } @Override
svn commit: r1484885 - in /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide: ./ ClusteringExamples.java
Author: tn Date: Tue May 21 17:34:50 2013 New Revision: 1484885 URL: http://svn.apache.org/r1484885 Log: Added first sample code to be included in the userguide. Added: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java (with props) Added: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java?rev=1484885&view=auto == --- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java (added) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/userguide/ClusteringExamples.java Tue May 21 17:34:50 2013 @@ -0,0 +1,314 @@ +/* + * 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.userguide; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Insets; +import java.awt.RenderingHints; +import java.awt.Shape; +import java.awt.geom.Ellipse2D; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import javax.swing.JComponent; +import javax.swing.JFrame; +import javax.swing.JTextArea; +import javax.swing.SwingUtilities; + +import org.apache.commons.math3.distribution.NormalDistribution; +import org.apache.commons.math3.geometry.euclidean.twod.Vector2D; +import org.apache.commons.math3.ml.clustering.CentroidCluster; +import org.apache.commons.math3.ml.clustering.Cluster; +import org.apache.commons.math3.ml.clustering.Clusterable; +import org.apache.commons.math3.ml.clustering.Clusterer; +import org.apache.commons.math3.ml.clustering.DBSCANClusterer; +import org.apache.commons.math3.ml.clustering.DoublePoint; +import org.apache.commons.math3.ml.clustering.FuzzyKMeansClusterer; +import org.apache.commons.math3.ml.clustering.KMeansPlusPlusClusterer; +import org.apache.commons.math3.random.RandomAdaptor; +import org.apache.commons.math3.random.RandomGenerator; +import org.apache.commons.math3.random.SobolSequenceGenerator; +import org.apache.commons.math3.random.Well19937c; +import org.apache.commons.math3.util.FastMath; +import org.apache.commons.math3.util.Pair; + +/** + * Plots clustering results for various algorithms and datasets. + * Based on + * http://scikit-learn.org/stable/auto_examples/cluster/plot_cluster_comparison.html";>scikit learn. + */ +public class ClusteringExamples { + +public static List makeCircles(int samples, boolean shuffle, double noise, double factor, final RandomGenerator random) { +if (factor < 0 || factor > 1) { +throw new IllegalArgumentException(); +} + +NormalDistribution dist = new NormalDistribution(random, 0.0, noise, 1e-9); + +List points = new ArrayList(); +double range = 2.0 * FastMath.PI; +double step = range / (samples / 2.0 + 1); +for (double angle = 0; angle < range; angle += step) { +Vector2D outerCircle = new Vector2D(FastMath.cos(angle), FastMath.sin(angle)); +Vector2D innerCircle = outerCircle.scalarMultiply(factor); + +points.add(outerCircle.add(generateNoiseVector(dist))); +points.add(innerCircle.add(generateNoiseVector(dist))); +} + +if (shuffle) { +Collections.shuffle(points, new RandomAdaptor(random)); +} + +return points; +} + +public static List makeMoons(int samples, boolean shuffle, double noise, RandomGenerator random) { +NormalDistribution dist = new NormalDistribution(random, 0.0, noise, 1e-9); + +int nSamplesOut = samples / 2; +int nSamplesIn = samples - nSamplesOut; + +List points = new ArrayList(); +double range = FastMath.PI; +double step = range / (nSamplesOut / 2.0); +for
svn commit: r1484850 - /commons/proper/io/trunk/pom.xml
Author: ggregory Date: Tue May 21 16:02:42 2013 New Revision: 1484850 URL: http://svn.apache.org/r1484850 Log: Update to commons-parent 29 but add back Cobertura code coverage as JaCoCo results are not acceptable for commons-io. Modified: commons/proper/io/trunk/pom.xml Modified: commons/proper/io/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/pom.xml?rev=1484850&r1=1484849&r2=1484850&view=diff == --- commons/proper/io/trunk/pom.xml (original) +++ commons/proper/io/trunk/pom.xml Tue May 21 16:02:42 2013 @@ -19,7 +19,7 @@ org.apache.commons commons-parent -28 +29 4.0.0 commons-io @@ -318,6 +318,12 @@ file comparators, endian transformation + + +org.codehaus.mojo +cobertura-maven-plugin +2.5.2 + org.apache.maven.plugins maven-checkstyle-plugin
svn commit: r1484749 - /commons/proper/jcs/trunk/pom.xml
Author: tv Date: Tue May 21 10:53:42 2013 New Revision: 1484749 URL: http://svn.apache.org/r1484749 Log: Inherit more information from the parent POM Modified: commons/proper/jcs/trunk/pom.xml Modified: commons/proper/jcs/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/pom.xml?rev=1484749&r1=1484748&r2=1484749&view=diff == --- commons/proper/jcs/trunk/pom.xml (original) +++ commons/proper/jcs/trunk/pom.xml Tue May 21 10:53:42 2013 @@ -230,7 +230,6 @@ --> - stagingSite Apache Staging Website @@ -336,18 +335,8 @@ org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - -${maven.compile.sourceEncoding} -${maven.compile.source} -${maven.compile.target} - - - - org.apache.maven.plugins maven-surefire-plugin - 2.11 + ${commons.surefire.version} -Xmx256m -Djava.security.manager -Djava.security.policy=${basedir}/src/conf/cache.policy pertest @@ -374,41 +363,6 @@ - org.apache.maven.plugins - maven-jar-plugin - 2.3.2 - - - -${project.name} - ${project.version} - ${project.organization.name} -${project.name} - ${project.version} - ${project.organization.name} -org.apache - ${project.build.source} - ${project.build.target} - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.1.2 - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.8 - - - org.apache.maven.plugins - maven-gpg-plugin - 1.4 - - org.codehaus.mojo rmic-maven-plugin 1.1 @@ -443,42 +397,6 @@ org.apache.maven.plugins -maven-javadoc-plugin -2.8 - - true - - - -org.apache.maven.plugins -maven-jxr-plugin -2.3 - - true - - - -org.apache.maven.plugins -maven-site-plugin -3.0 - - -org.apache.maven.plugins -maven-surefire-report-plugin -2.11 - - -org.codehaus.mojo -jdepend-maven-plugin -2.0-beta-2 - - -org.codehaus.mojo -rat-maven-plugin -1.0-alpha-3 - - -org.apache.maven.plugins maven-pmd-plugin 2.5 @@ -490,207 +408,39 @@ findbugs-maven-plugin 2.3.2 - -org.apache.maven.plugins -maven-changes-plugin -2.4 - - ${basedir}/src/changes/changes.xml - %URL%/%ISSUE% - - - - - - changes-report - jira-report - - - - - release - - - apache.releases - Apache Release Distribution Repository - ${jcs.deployment.protocol}://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository - - + apache-release + org.apache.maven.plugins -maven-surefire-plugin - - pertest - -Djava.security.manager -Djava.security.policy=${basedir}/src/conf/cache.policy -Xms256m -Xmx256m - - **/*${test.type}Test.java - - - - - - - **/BlockDiskElementDescriptorUnitTest.java - **/HSQLDiskCacheConcurrentUnitTest.java - **/HSQLDiskCacheUnitTest.java - **/IndexedDiskCacheOptimizationUnitTest.java - **/TestTCPLateralUnitTest.java - **/UDPDiscoveryUnitTest.java - - - - - - -org.apache.maven.plugins -maven-gpg-plugin - - ${gpg.passphrase} - - - -sign-artifacts -verify - - sign - - - - - -org.apache.maven.plugins -maven-source-plugin - - -create-source-jar - - jar - - - - - -org.apache.maven.plugins
svn commit: r1484710 - /commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java
Author: bodewig Date: Tue May 21 09:22:04 2013 New Revision: 1484710 URL: http://svn.apache.org/r1484710 Log: COMPRESS-227 forgot to enable now-passing test Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java?rev=1484710&r1=1484709&r2=1484710&view=diff == --- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java (original) +++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java Tue May 21 09:22:04 2013 @@ -204,7 +204,7 @@ public class ZipFileTest extends TestCas } } -public void XtestDuplicateEntry() throws Exception { +public void testDuplicateEntry() throws Exception { File f = File.createTempFile("commons-compress-zipfiletest", ".zip"); f.deleteOnExit(); File f2 = File.createTempFile("commons-compress-zipfiletest", ".txt");