svn commit: r1673049 - in /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time: FastDateParserTest.java FastDateParser_TimeZoneStrategyTest.java

2015-04-12 Thread djones
Author: djones
Date: Sun Apr 12 19:59:04 2015
New Revision: 1673049

URL: http://svn.apache.org/r1673049
Log:
Refactored test into separate class, to avoid needless repeated execution by 
subclasses of the original test.

Added:

commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java
   (with props)
Modified:

commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java

Modified: 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java?rev=1673049&r1=1673048&r2=1673049&view=diff
==
--- 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
 (original)
+++ 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
 Sun Apr 12 19:59:04 2015
@@ -21,7 +21,6 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 
 import java.io.Serializable;
-import java.text.DateFormatSymbols;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
@@ -31,7 +30,6 @@ import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
 import java.util.TimeZone;
-import java.util.regex.Pattern;
 
 import org.apache.commons.lang3.SerializationUtils;
 import org.junit.Assert;
@@ -641,20 +639,4 @@ public class FastDateParserTest {
 assertEquals(message+trial.three, cal.getTime(), 
parser.parse(dateStub+trial.three));
 }
 }
-
-@Test
-public void testTimeZoneStrategyPattern() {
-Pattern tz = 
Pattern.compile(FastDateParser.TimeZoneStrategy.TZ_DATABASE);
-Assert.assertFalse(tz.matcher("GMT-1234").matches());
-
-for (Locale locale : Locale.getAvailableLocales()) {
-final String[][] zones = 
DateFormatSymbols.getInstance(locale).getZoneStrings();
-for (final String[] zone : zones) {
-for (String zoneExpr : zone) {
-Assert.assertTrue(locale.getDisplayName() + ":" + 
zoneExpr, tz.matcher(zoneExpr).matches());
-}
-}
-}
-}
-
 }

Added: 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java?rev=1673049&view=auto
==
--- 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java
 (added)
+++ 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java
 Sun Apr 12 19:59:04 2015
@@ -0,0 +1,44 @@
+/*
+ * 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.lang3.time;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.text.DateFormatSymbols;
+import java.util.Locale;
+import java.util.regex.Pattern;
+
+import org.junit.Test;
+
+public class FastDateParser_TimeZoneStrategyTest {
+
+@Test
+public void testTimeZoneStrategyPattern() {
+Pattern tz = 
Pattern.compile(FastDateParser.TimeZoneStrategy.TZ_DATABASE);
+assertFalse(tz.matcher("GMT-1234").matches());
+
+for (Locale locale : Locale.getAvailableLocales()) {
+final String[][] zones = 
DateFormatSymbols.getInstance(locale).getZoneStrings();
+for (final String[] zone : zones) {
+for (String zoneExpr : zone) {
+assertTrue(locale.getDisplayName() + ":" + zoneExpr, 
tz.matcher(zoneExpr).matches());
+}
+}
+}
+}
+}

Propchange: 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java
--
svn:eol-st

Git Push Summary

2015-04-12 Thread luc
Repository: commons-math
Updated Tags:  refs/tags/MATH_3_5_RC1 [created] f9242e6fb


[math] Preparing 3.5 release.

2015-04-12 Thread luc
Repository: commons-math
Updated Branches:
  refs/heads/release [created] 7efda3f0a


Preparing 3.5 release.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/7efda3f0
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/7efda3f0
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/7efda3f0

Branch: refs/heads/release
Commit: 7efda3f0a0941362e9e4152d0e0e92872a8ce8d3
Parents: 884524a
Author: Luc Maisonobe 
Authored: Sun Apr 12 18:19:17 2015 +0200
Committer: Luc Maisonobe 
Committed: Sun Apr 12 19:04:59 2015 +0200

--
 RELEASE-NOTES.txt   | 40 ++--
 build.xml   |  2 +-
 pom.xml |  6 +++---
 src/changes/changes.xml | 27 +++-
 src/site/xdoc/download_math.xml | 26 +++
 src/userguide/pom.xml   |  2 +-
 6 files changed, 69 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/7efda3f0/RELEASE-NOTES.txt
--
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 94e476f..6a6ac4e 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,25 +1,35 @@
-
-  Apache Commons Math 3.4.1 RELEASE NOTES
-
-The Apache Commons Math team is pleased to announce the release of 
commons-math3-3.4.1
+The Apache Commons Math team is pleased to announce the commons-math3-3.5 
release!
 
 The Apache Commons Math project is a library of lightweight, self-contained 
mathematics
 and statistics components addressing the most common practical problems not 
immediately
 available in the Java programming language or commons-lang.
 
-This is a maintenance release: It fixes issue MATH-1188.
-
 Changes in this version include:
 
+New features:
+o Added a way to build polyhedrons sets from a list of vertices and
+facets specified using vertices indices. 
+o Simplified "FastMath#exp(double)" in order to avoid a potential
+Java 1.5 JIT bug when calling with negative infinity as argument.  
Issue: MATH-1198. 
+o Added method "getQuadraticMean()" to "DescriptiveStatistics"
+and "SummaryStatistics" which calculates the root mean square.  Issue: 
MATH-1199. 
 
 Fixed Bugs:
-o MATH-1188:  Fixed non-Java1.5 code in BesselJ. 
-
-
-
-For complete information on Apache Commons Math, including instructions on how 
to submit bug reports,
-patches, or suggestions for improvement, see the Apache Commons Math website:
-
-http://commons.apache.org/proper/commons-math/
-
+o Moved FastMathTestPerformance out of the main test tree, as is is
+a benchmark rather than a test.  Issue: MATH-1195. 
+o Fixed ignored method parameters in QRDecomposition protected methods.  
Issue: MATH-1191. 
+o Fixed wrong selection of line/polyhedron intersection point.  Issue: 
MATH-1211. Thanks to Mike Zimmerman. 
+o Improved fix for corner cases in BSP-tree merging, when cut sub-hyperplanes 
vanish.  Issue: MATH-1162. 
+o Fixed link to algorithm description in "PoissonDistribution#sample()".  
Issue: MATH-1209. Thanks to Jonathan Ogilvie. 
+o EmpiricalDistribution cumulativeProbability can return NaN when evaluated 
within a constant bin.  Issue: MATH-1208. 
+o EmpiricalDistribution getKernel fails for buckets with only multiple 
instances of the same value.  Issue: MATH-1203. 
+o "UnivariateSolverUtils#bracket(...)" sometimes failed to bracket
+if a reached the lower bound.  Issue: MATH-1204. 
+
+Changes:
+o Added Laguerre complex solve methods taking maxEval parameters.  Issue: 
MATH-1213. 
+
+
+Have fun!
+-Apache Commons Math team
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/7efda3f0/build.xml
--
diff --git a/build.xml b/build.xml
index 09177b0..d205c29 100644
--- a/build.xml
+++ b/build.xml
@@ -50,7 +50,7 @@
   
 
   
-  
+  
 
   
   

http://git-wip-us.apache.org/repos/asf/commons-math/blob/7efda3f0/pom.xml
--
diff --git a/pom.xml b/pom.xml
index b0e266b..9c100e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
   4.0.0
   org.apache.commons
   commons-math3
-  3.5-SNAPSHOT
+  3.5
   Apache Commons Math
 
   2003
@@ -363,9 +363,9 @@
 
 
org.apache.commons.math3
 
-3.4.1
+3.5
 (requires Java 1.5+)
-
+RC1
 -bin
 
 2.2

http://git-wip-us.apache.org/repos/asf/commons-math/blob/7efda3f0/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index cd1f930..2be9918 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -50,7 +50,32 @@ If the o

svn commit: r8586 - in /dev/commons/math: ./ binaries/ source/

2015-04-12 Thread luc
Author: luc
Date: Sun Apr 12 18:16:53 2015
New Revision: 8586

Log:
creating Apache artifacts for Apache Commons Math 3.5, RC1

Added:
dev/commons/math/RELEASE-NOTES.txt   (with props)
dev/commons/math/binaries/commons-math3-3.5-bin.tar.gz   (with props)
dev/commons/math/binaries/commons-math3-3.5-bin.tar.gz.asc
dev/commons/math/binaries/commons-math3-3.5-bin.tar.gz.md5
dev/commons/math/binaries/commons-math3-3.5-bin.tar.gz.sha1
dev/commons/math/binaries/commons-math3-3.5-bin.zip   (with props)
dev/commons/math/binaries/commons-math3-3.5-bin.zip.asc
dev/commons/math/binaries/commons-math3-3.5-bin.zip.md5
dev/commons/math/binaries/commons-math3-3.5-bin.zip.sha1
dev/commons/math/source/commons-math3-3.5-src.tar.gz   (with props)
dev/commons/math/source/commons-math3-3.5-src.tar.gz.asc
dev/commons/math/source/commons-math3-3.5-src.tar.gz.md5
dev/commons/math/source/commons-math3-3.5-src.tar.gz.sha1
dev/commons/math/source/commons-math3-3.5-src.zip   (with props)
dev/commons/math/source/commons-math3-3.5-src.zip.asc
dev/commons/math/source/commons-math3-3.5-src.zip.md5
dev/commons/math/source/commons-math3-3.5-src.zip.sha1

Added: dev/commons/math/RELEASE-NOTES.txt
==
--- dev/commons/math/RELEASE-NOTES.txt (added)
+++ dev/commons/math/RELEASE-NOTES.txt Sun Apr 12 18:16:53 2015
@@ -0,0 +1,35 @@
+The Apache Commons Math team is pleased to announce the commons-math3-3.5 
release!
+
+The Apache Commons Math project is a library of lightweight, self-contained 
mathematics
+and statistics components addressing the most common practical problems not 
immediately
+available in the Java programming language or commons-lang.
+
+Changes in this version include:
+
+New features:
+o Added a way to build polyhedrons sets from a list of vertices and
+facets specified using vertices indices. 
+o Simplified "FastMath#exp(double)" in order to avoid a potential
+Java 1.5 JIT bug when calling with negative infinity as argument.  
Issue: MATH-1198. 
+o Added method "getQuadraticMean()" to "DescriptiveStatistics"
+and "SummaryStatistics" which calculates the root mean square.  Issue: 
MATH-1199. 
+
+Fixed Bugs:
+o Moved FastMathTestPerformance out of the main test tree, as is is
+a benchmark rather than a test.  Issue: MATH-1195. 
+o Fixed ignored method parameters in QRDecomposition protected methods.  
Issue: MATH-1191. 
+o Fixed wrong selection of line/polyhedron intersection point.  Issue: 
MATH-1211. Thanks to Mike Zimmerman. 
+o Improved fix for corner cases in BSP-tree merging, when cut sub-hyperplanes 
vanish.  Issue: MATH-1162. 
+o Fixed link to algorithm description in "PoissonDistribution#sample()".  
Issue: MATH-1209. Thanks to Jonathan Ogilvie. 
+o EmpiricalDistribution cumulativeProbability can return NaN when evaluated 
within a constant bin.  Issue: MATH-1208. 
+o EmpiricalDistribution getKernel fails for buckets with only multiple 
instances of the same value.  Issue: MATH-1203. 
+o "UnivariateSolverUtils#bracket(...)" sometimes failed to bracket
+if a reached the lower bound.  Issue: MATH-1204. 
+
+Changes:
+o Added Laguerre complex solve methods taking maxEval parameters.  Issue: 
MATH-1213. 
+
+
+Have fun!
+-Apache Commons Math team
+

Propchange: dev/commons/math/RELEASE-NOTES.txt
--
svn:eol-style = native

Propchange: dev/commons/math/RELEASE-NOTES.txt
--
svn:keywords = Author Date Id Revision

Added: dev/commons/math/binaries/commons-math3-3.5-bin.tar.gz
==
Binary file - no diff available.

Propchange: dev/commons/math/binaries/commons-math3-3.5-bin.tar.gz
--
svn:mime-type = application/octet-stream

Added: dev/commons/math/binaries/commons-math3-3.5-bin.tar.gz.asc
==
--- dev/commons/math/binaries/commons-math3-3.5-bin.tar.gz.asc (added)
+++ dev/commons/math/binaries/commons-math3-3.5-bin.tar.gz.asc Sun Apr 12 
18:16:53 2015
@@ -0,0 +1,17 @@
+-BEGIN PGP SIGNATURE-
+Version: GnuPG v1
+
+iQIcBAABCgAGBQJVKq/IAAoJEJrilv0C6fZbzuUP/Aw7yw1LMwIFOJOmW99K9vFl
+HNfNkBdLK6cla3gj26Zfzk0XGTwhPseeM1FBiHgmfqPRRLkK3zq8QRUTgjuZinDa
+9Ut2S4XJZuA+WWn0rk2TeHaj7R3OWy5Q06Rgzm/gif15ZYFXd+JQ8uePtRPas79s
+5AoZBywgA03U36bZRPwMO1lAfZQiFC5E4CnhbUv6YfmIJn68Cxq5lNK9tAmoBzG4
+oo7Knw0OJI5SuHNynCF2SZ0fXyEiWIQFrTJz+LR5wpBNeemFSuuK+ZzmKLLpMOv1
+BNV3GPQWkxGd0VV6bwtF/+HJYuho78+oRJJDztTIGrgv5zLP362npXBpnF7HIAz3
+Lp30lAZgTvUKrIfi+FuO0jISyEbyJzPM5jOCoCjRbusrm/fNv7m3lUjbrqacRQ43
+cg+a0IstkeMMeD4n5HqMcYa+ojJkJxKYSWXvGJZ/rfy8V6xBqWkoguBNBNdcj+SG
+Os49XzKlM+A1xOXhzjxTKcrHrzgmvZ14T

Nexus: Staging Completed

2015-04-12 Thread Nexus Repository Manager
Message from: https://repository.apache.orgDescription:Preparing vote for Apache Commons Math 3.5 release, RC1Deployer properties:"userAgent" = "Apache-Maven/3.0.5 (Java 1.6.0_31; Linux 3.16.0-4-amd64), Apache-Maven/3.0.5 (Java 1.6.0_31; Linux 3.16.0-4-amd64)""userId" = "luc""ip" = "80.67.176.229"Details:The following artifacts have been staged/org/apache/commons/commons-math3/3.5/commons-math3-3.5-test-sources.jar(SHA1: 38f9b5f793535ab0a0c263f200ea086082b8736a)/org/apache/commons/commons-math3/3.5/commons-math3-3.5-test-sources.jar.asc(SHA1: 2cb45b91a0db6f015055118d5faef621be55)/org/apache/commons/commons-math3/3.5/commons-math3-3.5-tests.jar.asc(SHA1: bebcd7e31974894b24d4c40437bc03f721ce2be5)/org/apache/commons/commons-math3/3.5/commons-math3-3.5-tests.jar(SHA1: 758139ce3c8bc16c568d254298db80db7dcbd078)/org/apache/commons/commons-math3/3.5/commons-math3-3.5-tools.jar.asc(SHA1: 3014f34add590f379dc60f589a7d67849c4a2b78)/org/apache/commons/commons-math3/3.5/commons-math3-3.5.jar.asc(SHA1: 34aa8b22d3acd9d17ba4d51dcf7ea0c144936e48)/org/apache/commons/commons-math3/3.5/commons-math3-3.5-javadoc.jar(SHA1: eb0d4a9c1cc9022f8388e105ff1a13a7fc448439)/org/apache/commons/commons-math3/3.5/commons-math3-3.5-tools.jar(SHA1: 2183025660dcdd3f3f02eba24cad8f342ade5ee3)/org/apache/commons/commons-math3/3.5/commons-math3-3.5.pom(SHA1: ee6c1a9d84ff03e968a9c676b77dc8cedbd866cc)/org/apache/commons/commons-math3/3.5/commons-math3-3.5-sources.jar.asc(SHA1: a01697ef45b354517df6e082506b5436ea7c712e)/org/apache/commons/commons-math3/3.5/commons-math3-3.5-sources.jar(SHA1: 8fddcd295ee233d01442d9d1812d5ccd2d9e23bf)/org/apache/commons/commons-math3/3.5/commons-math3-3.5.pom.asc(SHA1: 1ecd6a912e9f7b9c25edce23c4563be50ec68d46)/org/apache/commons/commons-math3/3.5/commons-math3-3.5-javadoc.jar.asc(SHA1: 20c10aa017ef2c605ede63bcadbf1dec8ac2e2bc)/org/apache/commons/commons-math3/3.5/commons-math3-3.5.jar(SHA1: 2ae09ce3e7d795dbef41b789fd39b5e84d848798)Action performed by Luc Maisonobe (luc)

svn commit: r1673034 - in /commons/proper/vfs/trunk: sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileObject.java src/changes/changes.xml

2015-04-12 Thread ecki
Author: ecki
Date: Sun Apr 12 17:44:07 2015
New Revision: 1673034

URL: http://svn.apache.org/r1673034
Log:
[VFS-236][smb] Allow SMB to be used with empty authentication.

Modified:

commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileObject.java
commons/proper/vfs/trunk/src/changes/changes.xml

Modified: 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileObject.java
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileObject.java?rev=1673034&r1=1673033&r2=1673034&view=diff
==
--- 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileObject.java
 (original)
+++ 
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileObject.java
 Sun Apr 12 17:44:07 2015
@@ -84,43 +84,43 @@ public class SmbFileObject
 
 UserAuthenticationData authData = null;
 SmbFile file;
-NtlmPasswordAuthentication auth;
 try
 {
 authData = UserAuthenticatorUtils.authenticate(
getFileSystem().getFileSystemOptions(),
SmbFileProvider.AUTHENTICATOR_TYPES);
 
-auth = new NtlmPasswordAuthentication(
-UserAuthenticatorUtils.toString(
-UserAuthenticatorUtils.getData(
-authData,
-UserAuthenticationData.DOMAIN,
-
UserAuthenticatorUtils.toChar(smbFileName.getDomain(,
-UserAuthenticatorUtils.toString(
-UserAuthenticatorUtils.getData(
-authData,
-UserAuthenticationData.USERNAME,
-
UserAuthenticatorUtils.toChar(smbFileName.getUserName(,
-UserAuthenticatorUtils.toString(
-UserAuthenticatorUtils.getData(
-authData,
-UserAuthenticationData.PASSWORD,
-
UserAuthenticatorUtils.toChar(smbFileName.getPassword();
-
+NtlmPasswordAuthentication auth = null;
+if (authData != null)
+{
+auth = new NtlmPasswordAuthentication(
+UserAuthenticatorUtils.toString(
+UserAuthenticatorUtils.getData(authData, 
UserAuthenticationData.DOMAIN,
+
UserAuthenticatorUtils.toChar(smbFileName.getDomain(,
+UserAuthenticatorUtils.toString(
+UserAuthenticatorUtils.getData(authData, 
UserAuthenticationData.USERNAME,
+
UserAuthenticatorUtils.toChar(smbFileName.getUserName(,
+UserAuthenticatorUtils.toString(
+UserAuthenticatorUtils.getData(authData, 
UserAuthenticationData.PASSWORD,
+
UserAuthenticatorUtils.toChar(smbFileName.getPassword();
+}
+
+// if auth == null SmbFile uses default credentials
+// ("jcifs.smb.client.domain", "?"), ("jcifs.smb.client.username", 
"GUEST"),
+// ("jcifs.smb.client.password", BLANK);
+// ANONYMOUS=("","","")
 file = new SmbFile(path, auth);
+
+if (file.isDirectory() && !file.toString().endsWith("/"))
+{
+file = new SmbFile(path + "/", auth);
+}
+return file;
 }
 finally
 {
-UserAuthenticatorUtils.cleanup(authData);
-}
-
-if (file.isDirectory() && !file.toString().endsWith("/"))
-{
-file = new SmbFile(path + "/", auth);
+UserAuthenticatorUtils.cleanup(authData); // might be null
 }
-
-return file;
 }
 
 /**

Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1673034&r1=1673033&r2=1673034&view=diff
==
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Sun Apr 12 17:44:07 2015
@@ -26,6 +26,9 @@
 
 
 
+  
+[smb] Allow SMB to be used with no authentication.
+  
   
 Make some loggers static.
   




Jenkins build is back to stable : Commons Math #168

2015-04-12 Thread Apache Jenkins Server
See 



[1/2] [math] Updated site menu for upcoming 3.5 release.

2015-04-12 Thread luc
Repository: commons-math
Updated Branches:
  refs/heads/master a6ed07c55 -> e588c8f2e


Updated site menu for upcoming 3.5 release.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/c02d6761
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/c02d6761
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/c02d6761

Branch: refs/heads/master
Commit: c02d676118241dff740124c4dde7fa0ca00a6b9e
Parents: a6ed07c
Author: Luc Maisonobe 
Authored: Sun Apr 12 19:02:10 2015 +0200
Committer: Luc Maisonobe 
Committed: Sun Apr 12 19:02:10 2015 +0200

--
 src/site/site.xml | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/c02d6761/src/site/site.xml
--
diff --git a/src/site/site.xml b/src/site/site.xml
index 62c1ad9..6f45d47 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -27,6 +27,8 @@
   
   http://commons.apache.org/math/download_math.cgi"/>
   
+  http://commons.apache.org/math/javadocs/api-3.5/index.html"/>
   http://commons.apache.org/math/javadocs/api-3.4.1/index.html"/>
   

[2/2] [math] Fixed wrong file name.

2015-04-12 Thread luc
Fixed wrong file name.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/e588c8f2
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/e588c8f2
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/e588c8f2

Branch: refs/heads/master
Commit: e588c8f2e94ec422042c3c2ac27088e558a635b0
Parents: c02d676
Author: Luc Maisonobe 
Authored: Sun Apr 12 19:02:38 2015 +0200
Committer: Luc Maisonobe 
Committed: Sun Apr 12 19:02:38 2015 +0200

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/e588c8f2/pom.xml
--
diff --git a/pom.xml b/pom.xml
index ad8578d..4dc0622 100644
--- a/pom.xml
+++ b/pom.xml
@@ -607,7 +607,7 @@
 
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/pentomino-N-hole.ply
 
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/pentomino-N-out-of-plane.ply
 
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/pentomino-N-too-close.ply
-
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/pentomino-N-.ply
+
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/pentomino-N.ply
 
 



[2/2] [math] Fixed wrong file name.

2015-04-12 Thread luc
Fixed wrong file name.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/884524ae
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/884524ae
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/884524ae

Branch: refs/heads/MATH_3_X
Commit: 884524ae6ef7a3c93bdef50a9a1a5148508ec191
Parents: bf2e22a
Author: Luc Maisonobe 
Authored: Sun Apr 12 19:00:53 2015 +0200
Committer: Luc Maisonobe 
Committed: Sun Apr 12 19:00:53 2015 +0200

--
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/884524ae/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 07a3a14..b0e266b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -605,7 +605,7 @@
 
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/pentomino-N-hole.ply
 
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/pentomino-N-out-of-plane.ply
 
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/pentomino-N-too-close.ply
-
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/pentomino-N-.ply
+
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/pentomino-N.ply
 
 



[1/2] [math] Updating site menu for next version.

2015-04-12 Thread luc
Repository: commons-math
Updated Branches:
  refs/heads/MATH_3_X ecd900729 -> 884524ae6


Updating site menu for next version.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/bf2e22ad
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/bf2e22ad
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/bf2e22ad

Branch: refs/heads/MATH_3_X
Commit: bf2e22ad8ab98e153321efd924817e2b7cd91c61
Parents: ecd9007
Author: Luc Maisonobe 
Authored: Sun Apr 12 19:00:00 2015 +0200
Committer: Luc Maisonobe 
Committed: Sun Apr 12 19:00:00 2015 +0200

--
 src/site/site.xml | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/bf2e22ad/src/site/site.xml
--
diff --git a/src/site/site.xml b/src/site/site.xml
index 62c1ad9..6f45d47 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -27,6 +27,8 @@
   
   http://commons.apache.org/math/download_math.cgi"/>
   
+  http://commons.apache.org/math/javadocs/api-3.5/index.html"/>
   http://commons.apache.org/math/javadocs/api-3.4.1/index.html"/>
   

Jenkins build became unstable: Commons Math #167

2015-04-12 Thread Apache Jenkins Server
See 



[1/2] [math] Moved FastMathTestPerformance out of the main test tree.

2015-04-12 Thread luc
Repository: commons-math
Updated Branches:
  refs/heads/master fa6fcf208 -> a6ed07c55


http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6ed07c5/src/userguide/java/org/apache/commons/math4/userguide/FastMathTestPerformance.java
--
diff --git 
a/src/userguide/java/org/apache/commons/math4/userguide/FastMathTestPerformance.java
 
b/src/userguide/java/org/apache/commons/math4/userguide/FastMathTestPerformance.java
new file mode 100644
index 000..8af6fca
--- /dev/null
+++ 
b/src/userguide/java/org/apache/commons/math4/userguide/FastMathTestPerformance.java
@@ -0,0 +1,1087 @@
+/*
+ * 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.math4.userguide;
+
+import org.apache.commons.math4.PerfTestUtils;
+import org.apache.commons.math4.util.FastMath;
+
+/**
+ * Performance benchmark for FastMath.
+ * 
+ */
+public class FastMathTestPerformance {
+private static final int RUNS = 
Integer.parseInt(System.getProperty("testRuns","1000"));
+private static final double F1 = 1d / RUNS;
+
+// Header format
+private static final String FMT_HDR = "%-5s %13s %13s %13s Runs=%d Java %s 
(%s) %s (%s)";
+// Detail format
+private static final String FMT_DTL = "%-5s %6d %6.1f %6d %6.4f %6d %6.4f";
+
+public static void main(String[] args) {
+System.out.println(String.format(FMT_HDR,
+ 
"Name","StrictMath","FastMath","Math",RUNS,
+ System.getProperty("java.version"),
+ 
System.getProperty("java.runtime.version","?"),
+ System.getProperty("java.vm.name"),
+ System.getProperty("java.vm.version")
+ ));
+testAbs();
+testAcos();
+testAsin();
+testAtan();
+testAtan2();
+testCbrt();
+testCos();
+testCosh();
+testExp();
+testExpm1();
+testHypot();
+testLog();
+testLog10();
+testLog1p();
+testPow();
+testSin();
+testSinh();
+testSqrt();
+testTan();
+testTanh();
+
+}
+
+@SuppressWarnings("boxing")
+private static void report(String name, long strictMathTime, long 
fastMathTime, long mathTime) {
+long unitTime = strictMathTime;
+System.out.println(String.format(FMT_DTL,
+name,
+strictMathTime / RUNS, (double) strictMathTime / unitTime,
+fastMathTime / RUNS, (double) fastMathTime / unitTime,
+mathTime / RUNS, (double) mathTime / unitTime
+));
+}
+
+private static void assertTrue(boolean condition) {
+if (!condition) {
+System.err.println("assertion failed!");
+System.exit(1);
+}
+}
+private static void testLog() {
+double x = 0;
+long time = System.nanoTime();
+for (int i = 0; i < RUNS; i++) {
+x += StrictMath.log(0.01 + i);
+}
+long strictMath = System.nanoTime() - time;
+
+x = 0;
+time = System.nanoTime();
+for (int i = 0; i < RUNS; i++) {
+x += FastMath.log(0.01 + i);
+}
+long fastTime = System.nanoTime() - time;
+
+x = 0;
+time = System.nanoTime();
+for (int i = 0; i < RUNS; i++) {
+x += Math.log(0.01 + i);
+}
+long mathTime = System.nanoTime() - time;
+
+report("log",strictMath,fastTime,mathTime);
+assertTrue(!Double.isNaN(x));
+}
+
+private static void testLog10() {
+double x = 0;
+long time = System.nanoTime();
+for (int i = 0; i < RUNS; i++) {
+x += StrictMath.log10(0.01 + i);
+}
+long strictMath = System.nanoTime() - time;
+
+x = 0;
+time = System.nanoTime();
+for (int i = 0; i < RUNS; i++) {
+x += FastMath.log10(0.01 + i);
+}
+long fastTime = System.nanoTime() - time;
+
+x = 0;
+time = System.na

[2/2] [math] Moved FastMathTestPerformance out of the main test tree.

2015-04-12 Thread luc
Moved FastMathTestPerformance out of the main test tree.

Is is a benchmark rather than a test.

JIRA: MATH-1195


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/a6ed07c5
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/a6ed07c5
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/a6ed07c5

Branch: refs/heads/master
Commit: a6ed07c55cf8c42e196dd6e6e1bf0a38f0f7b754
Parents: fa6fcf2
Author: Luc Maisonobe 
Authored: Sun Apr 12 17:54:36 2015 +0200
Committer: Luc Maisonobe 
Committed: Sun Apr 12 17:54:36 2015 +0200

--
 src/changes/changes.xml |4 +
 .../math4/util/FastMathTestPerformance.java | 1091 --
 .../userguide/FastMathTestPerformance.java  | 1087 +
 3 files changed, 1091 insertions(+), 1091 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6ed07c5/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 0bd49c4..3dada49 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -54,6 +54,10 @@ If the output is not quite correct, check for invisible 
trailing spaces!
 
 
 
+  
+Moved FastMathTestPerformance out of the main test tree, as is is
+a benchmark rather than a test.
+  
   
 Added a way to build polyhedrons sets from a list of vertices and
 facets specified using vertices indices.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6ed07c5/src/test/java/org/apache/commons/math4/util/FastMathTestPerformance.java
--
diff --git 
a/src/test/java/org/apache/commons/math4/util/FastMathTestPerformance.java 
b/src/test/java/org/apache/commons/math4/util/FastMathTestPerformance.java
deleted file mode 100644
index eb09f68..000
--- a/src/test/java/org/apache/commons/math4/util/FastMathTestPerformance.java
+++ /dev/null
@@ -1,1091 +0,0 @@
-/*
- * 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.math4.util;
-
-import org.apache.commons.math4.PerfTestUtils;
-import org.apache.commons.math4.util.FastMath;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.Assert;
-
-/**
- * Performance tests for FastMath.
- * Not enabled by default, as the class does not end in Test.
- * 
- * Invoke by running
- * {@code mvn test -Dtest=FastMathTestPerformance}
- * or by running
- * {@code mvn test -Dtest=FastMathTestPerformance -DargLine="-DtestRuns=1234 
-server"}
- */
-public class FastMathTestPerformance {
-private static final int RUNS = 
Integer.parseInt(System.getProperty("testRuns","1000"));
-private static final double F1 = 1d / RUNS;
-
-// Header format
-private static final String FMT_HDR = "%-5s %13s %13s %13s Runs=%d Java %s 
(%s) %s (%s)";
-// Detail format
-private static final String FMT_DTL = "%-5s %6d %6.1f %6d %6.4f %6d %6.4f";
-
-@SuppressWarnings("boxing")
-@BeforeClass
-public static void header() {
-System.out.println(String.format(FMT_HDR,
-"Name","StrictMath","FastMath","Math",RUNS,
-System.getProperty("java.version"),
-System.getProperty("java.runtime.version","?"),
-System.getProperty("java.vm.name"),
-System.getProperty("java.vm.version")
-));
-}
-
-@SuppressWarnings("boxing")
-private static void report(String name, long strictMathTime, long 
fastMathTime, long mathTime) {
-long unitTime = strictMathTime;
-System.out.println(String.format(FMT_DTL,
-name,
-strictMathTime / RUNS, (double) strictMathTime / unitTime,
-fastMathTime / RUNS, (double) fastMathTime / unitTime,
-mathTime / RUNS, (double) mathTime / unitTime
-));
-}
-
-@Test
-public void testLog() {
-  

[1/2] [math] Moved FastMathTestPerformance out of the main test tree.

2015-04-12 Thread luc
Repository: commons-math
Updated Branches:
  refs/heads/MATH_3_X 962a367a5 -> ecd900729


http://git-wip-us.apache.org/repos/asf/commons-math/blob/ecd90072/src/userguide/java/org/apache/commons/math3/userguide/FastMathTestPerformance.java
--
diff --git 
a/src/userguide/java/org/apache/commons/math3/userguide/FastMathTestPerformance.java
 
b/src/userguide/java/org/apache/commons/math3/userguide/FastMathTestPerformance.java
new file mode 100644
index 000..52c1354
--- /dev/null
+++ 
b/src/userguide/java/org/apache/commons/math3/userguide/FastMathTestPerformance.java
@@ -0,0 +1,1087 @@
+/*
+ * 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 org.apache.commons.math3.PerfTestUtils;
+import org.apache.commons.math3.util.FastMath;
+
+/**
+ * Performance benchmark for FastMath.
+ * 
+ */
+public class FastMathTestPerformance {
+private static final int RUNS = 
Integer.parseInt(System.getProperty("testRuns","1000"));
+private static final double F1 = 1d / RUNS;
+
+// Header format
+private static final String FMT_HDR = "%-5s %13s %13s %13s Runs=%d Java %s 
(%s) %s (%s)";
+// Detail format
+private static final String FMT_DTL = "%-5s %6d %6.1f %6d %6.4f %6d %6.4f";
+
+public static void main(String[] args) {
+System.out.println(String.format(FMT_HDR,
+ 
"Name","StrictMath","FastMath","Math",RUNS,
+ System.getProperty("java.version"),
+ 
System.getProperty("java.runtime.version","?"),
+ System.getProperty("java.vm.name"),
+ System.getProperty("java.vm.version")
+ ));
+testAbs();
+testAcos();
+testAsin();
+testAtan();
+testAtan2();
+testCbrt();
+testCos();
+testCosh();
+testExp();
+testExpm1();
+testHypot();
+testLog();
+testLog10();
+testLog1p();
+testPow();
+testSin();
+testSinh();
+testSqrt();
+testTan();
+testTanh();
+
+}
+
+@SuppressWarnings("boxing")
+private static void report(String name, long strictMathTime, long 
fastMathTime, long mathTime) {
+long unitTime = strictMathTime;
+System.out.println(String.format(FMT_DTL,
+name,
+strictMathTime / RUNS, (double) strictMathTime / unitTime,
+fastMathTime / RUNS, (double) fastMathTime / unitTime,
+mathTime / RUNS, (double) mathTime / unitTime
+));
+}
+
+private static void assertTrue(boolean condition) {
+if (!condition) {
+System.err.println("assertion failed!");
+System.exit(1);
+}
+}
+private static void testLog() {
+double x = 0;
+long time = System.nanoTime();
+for (int i = 0; i < RUNS; i++) {
+x += StrictMath.log(0.01 + i);
+}
+long strictMath = System.nanoTime() - time;
+
+x = 0;
+time = System.nanoTime();
+for (int i = 0; i < RUNS; i++) {
+x += FastMath.log(0.01 + i);
+}
+long fastTime = System.nanoTime() - time;
+
+x = 0;
+time = System.nanoTime();
+for (int i = 0; i < RUNS; i++) {
+x += Math.log(0.01 + i);
+}
+long mathTime = System.nanoTime() - time;
+
+report("log",strictMath,fastTime,mathTime);
+assertTrue(!Double.isNaN(x));
+}
+
+private static void testLog10() {
+double x = 0;
+long time = System.nanoTime();
+for (int i = 0; i < RUNS; i++) {
+x += StrictMath.log10(0.01 + i);
+}
+long strictMath = System.nanoTime() - time;
+
+x = 0;
+time = System.nanoTime();
+for (int i = 0; i < RUNS; i++) {
+x += FastMath.log10(0.01 + i);
+}
+long fastTime = System.nanoTime() - time;
+
+x = 0;
+time = System.

[2/2] [math] Moved FastMathTestPerformance out of the main test tree.

2015-04-12 Thread luc
Moved FastMathTestPerformance out of the main test tree.

Is is a benchmark rather than a test.

JIRA: MATH-1195


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/ecd90072
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/ecd90072
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/ecd90072

Branch: refs/heads/MATH_3_X
Commit: ecd900729c22267a57b28ef5e7e543ad7a03bfd2
Parents: 962a367
Author: Luc Maisonobe 
Authored: Sun Apr 12 17:40:34 2015 +0200
Committer: Luc Maisonobe 
Committed: Sun Apr 12 17:40:34 2015 +0200

--
 src/changes/changes.xml |4 +
 .../math3/util/FastMathTestPerformance.java | 1090 --
 .../userguide/FastMathTestPerformance.java  | 1087 +
 3 files changed, 1091 insertions(+), 1090 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/ecd90072/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index e1ca5ec..cd1f930 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -51,6 +51,10 @@ If the output is not quite correct, check for invisible 
trailing spaces!
   
   
 
+  
+Moved FastMathTestPerformance out of the main test tree, as is is
+a benchmark rather than a test.
+  
   
 Added a way to build polyhedrons sets from a list of vertices and
 facets specified using vertices indices.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/ecd90072/src/test/java/org/apache/commons/math3/util/FastMathTestPerformance.java
--
diff --git 
a/src/test/java/org/apache/commons/math3/util/FastMathTestPerformance.java 
b/src/test/java/org/apache/commons/math3/util/FastMathTestPerformance.java
deleted file mode 100644
index 849e458..000
--- a/src/test/java/org/apache/commons/math3/util/FastMathTestPerformance.java
+++ /dev/null
@@ -1,1090 +0,0 @@
-/*
- * 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.util;
-
-import org.apache.commons.math3.PerfTestUtils;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.Assert;
-
-/**
- * Performance tests for FastMath.
- * Not enabled by default, as the class does not end in Test.
- * 
- * Invoke by running
- * {@code mvn test -Dtest=FastMathTestPerformance}
- * or by running
- * {@code mvn test -Dtest=FastMathTestPerformance -DargLine="-DtestRuns=1234 
-server"}
- */
-public class FastMathTestPerformance {
-private static final int RUNS = 
Integer.parseInt(System.getProperty("testRuns","1000"));
-private static final double F1 = 1d / RUNS;
-
-// Header format
-private static final String FMT_HDR = "%-5s %13s %13s %13s Runs=%d Java %s 
(%s) %s (%s)";
-// Detail format
-private static final String FMT_DTL = "%-5s %6d %6.1f %6d %6.4f %6d %6.4f";
-
-@SuppressWarnings("boxing")
-@BeforeClass
-public static void header() {
-System.out.println(String.format(FMT_HDR,
-"Name","StrictMath","FastMath","Math",RUNS,
-System.getProperty("java.version"),
-System.getProperty("java.runtime.version","?"),
-System.getProperty("java.vm.name"),
-System.getProperty("java.vm.version")
-));
-}
-
-@SuppressWarnings("boxing")
-private static void report(String name, long strictMathTime, long 
fastMathTime, long mathTime) {
-long unitTime = strictMathTime;
-System.out.println(String.format(FMT_DTL,
-name,
-strictMathTime / RUNS, (double) strictMathTime / unitTime,
-fastMathTime / RUNS, (double) fastMathTime / unitTime,
-mathTime / RUNS, (double) mathTime / unitTime
-));
-}
-
-@Test
-public void testLog() {
-double x = 0;
-long time = System.na

[math] Added a way to build polyhedrons sets from vertices and facets.

2015-04-12 Thread luc
Repository: commons-math
Updated Branches:
  refs/heads/master 4aa1d98ad -> fa6fcf208


Added a way to build polyhedrons sets from vertices and facets.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/fa6fcf20
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/fa6fcf20
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/fa6fcf20

Branch: refs/heads/master
Commit: fa6fcf2080a7d2a2202713035d887d80e8a9400d
Parents: 4aa1d98
Author: Luc Maisonobe 
Authored: Sun Apr 12 17:15:55 2015 +0200
Committer: Luc Maisonobe 
Committed: Sun Apr 12 17:15:55 2015 +0200

--
 pom.xml |   8 +-
 src/changes/changes.xml |   4 +
 .../math4/exception/util/LocalizedFormats.java  |   4 +
 .../math4/geometry/euclidean/threed/Plane.java  |   8 +-
 .../euclidean/threed/PolyhedronsSet.java| 201 -
 .../util/LocalizedFormats_fr.properties |   4 +
 .../exception/util/LocalizedFormatsTest.java|   2 +-
 .../geometry/euclidean/threed/PLYParser.java| 290 +++
 .../euclidean/threed/PolyhedronsSetTest.java|  91 +-
 .../threed/pentomino-N-bad-orientation.ply  |  40 +++
 .../euclidean/threed/pentomino-N-hole.ply   |  39 +++
 .../threed/pentomino-N-out-of-plane.ply |  40 +++
 .../euclidean/threed/pentomino-N-too-close.ply  |  86 ++
 .../geometry/euclidean/threed/pentomino-N.ply   |  39 +++
 14 files changed, 835 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/fa6fcf20/pom.xml
--
diff --git a/pom.xml b/pom.xml
index f9712b6..ad8578d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -602,9 +602,15 @@
 
src/test/resources/org/apache/commons/math4/stat/data/NumAcc4.txt
 
src/test/resources/org/apache/commons/math4/stat/data/Michelso.txt
 
src/test/resources/org/apache/commons/math4/stat/data/Mavro.txt
+
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/issue-1211.bsp
+
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/pentomino-N-bad-orientation.ply
+
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/pentomino-N-hole.ply
+
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/pentomino-N-out-of-plane.ply
+
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/pentomino-N-too-close.ply
+
src/test/resources/org/apache/commons/math4/geometry/euclidean/threed/pentomino-N-.ply
 
 
+ available under a BSD-style license (see LICENSE.txt) -->
 
src/main/resources/assets/org/apache/commons/math4/random/new-joe-kuo-6.1000
 
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fa6fcf20/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 39fe6fe..0bd49c4 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -54,6 +54,10 @@ If the output is not quite correct, check for invisible 
trailing spaces!
 
 
 
+  
+Added a way to build polyhedrons sets from a list of vertices and
+facets specified using vertices indices.
+  
   
 Fixed ignored method parameters in QRDecomposition protected methods.
   

http://git-wip-us.apache.org/repos/asf/commons-math/blob/fa6fcf20/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java
--
diff --git 
a/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java 
b/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java
index 547bfe3..699a0cc 100644
--- 
a/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java
+++ 
b/src/main/java/org/apache/commons/math4/exception/util/LocalizedFormats.java
@@ -70,6 +70,7 @@ public enum LocalizedFormats implements Localizable {
 CANNOT_TRANSFORM_TO_DOUBLE("Conversion Exception in Transformation: {0}"),
 CARDAN_ANGLES_SINGULARITY("Cardan angles singularity"),
 CLASS_DOESNT_IMPLEMENT_COMPARABLE("class ({0}) does not implement 
Comparable"),
+CLOSE_VERTICES("too close vertices near point ({0}, {1}, {2})"),
 CLOSEST_ORTHOGONAL_MATRIX_HAS_NEGATIVE_DETERMINANT("the closest orthogonal 
matrix has a negative determinant {0}"),
 COLUMN_INDEX_OUT_OF_RANGE("column index {0} out of allowed range [{1}, 
{2}]"),
 COLUMN_INDEX("column index ({0})"), /* keep */
@@ -91,6 +92,7 @@ public enum LocalizedFormats implements Localizable {

[math] Added a way to build polyhedrons sets from a vertices and facets.

2015-04-12 Thread luc
Repository: commons-math
Updated Branches:
  refs/heads/MATH_3_X 412eed93d -> 962a367a5


Added a way to build polyhedrons sets from a vertices and facets.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/962a367a
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/962a367a
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/962a367a

Branch: refs/heads/MATH_3_X
Commit: 962a367a54f258f344976bf7b93bce155d52e04f
Parents: 412eed9
Author: Luc Maisonobe 
Authored: Sun Apr 12 16:57:31 2015 +0200
Committer: Luc Maisonobe 
Committed: Sun Apr 12 16:59:49 2015 +0200

--
 pom.xml |   8 +-
 src/changes/changes.xml |   4 +
 .../math3/exception/util/LocalizedFormats.java  |   4 +
 .../math3/geometry/euclidean/threed/Plane.java  |   8 +-
 .../euclidean/threed/PolyhedronsSet.java| 201 -
 .../util/LocalizedFormats_fr.properties |   4 +
 .../exception/util/LocalizedFormatsTest.java|   2 +-
 .../geometry/euclidean/threed/PLYParser.java| 290 +++
 .../euclidean/threed/PolyhedronsSetTest.java|  91 +-
 .../threed/pentomino-N-bad-orientation.ply  |  40 +++
 .../euclidean/threed/pentomino-N-hole.ply   |  39 +++
 .../threed/pentomino-N-out-of-plane.ply |  40 +++
 .../euclidean/threed/pentomino-N-too-close.ply  |  86 ++
 .../geometry/euclidean/threed/pentomino-N.ply   |  39 +++
 14 files changed, 835 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-math/blob/962a367a/pom.xml
--
diff --git a/pom.xml b/pom.xml
index fbc5508..07a3a14 100644
--- a/pom.xml
+++ b/pom.xml
@@ -600,9 +600,15 @@
 
src/test/resources/org/apache/commons/math3/stat/data/NumAcc4.txt
 
src/test/resources/org/apache/commons/math3/stat/data/Michelso.txt
 
src/test/resources/org/apache/commons/math3/stat/data/Mavro.txt
+
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/issue-1211.bsp
+
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/pentomino-N-bad-orientation.ply
+
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/pentomino-N-hole.ply
+
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/pentomino-N-out-of-plane.ply
+
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/pentomino-N-too-close.ply
+
src/test/resources/org/apache/commons/math3/geometry/euclidean/threed/pentomino-N-.ply
 
 
+ available under a BSD-style license (see LICENSE.txt) -->
 
src/main/resources/assets/org/apache/commons/math3/random/new-joe-kuo-6.1000
 
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/962a367a/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 561be34..e1ca5ec 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -51,6 +51,10 @@ If the output is not quite correct, check for invisible 
trailing spaces!
   
   
 
+  
+Added a way to build polyhedrons sets from a list of vertices and
+facets specified using vertices indices.
+  
   
 Added Laguerre complex solve methods taking maxEval parameters.
   

http://git-wip-us.apache.org/repos/asf/commons-math/blob/962a367a/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java
--
diff --git 
a/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java 
b/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java
index 0f3848f..8fe4dc9 100644
--- 
a/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java
+++ 
b/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java
@@ -70,6 +70,7 @@ public enum LocalizedFormats implements Localizable {
 CANNOT_TRANSFORM_TO_DOUBLE("Conversion Exception in Transformation: {0}"),
 CARDAN_ANGLES_SINGULARITY("Cardan angles singularity"),
 CLASS_DOESNT_IMPLEMENT_COMPARABLE("class ({0}) does not implement 
Comparable"),
+CLOSE_VERTICES("too close vertices near point ({0}, {1}, {2})"),
 CLOSEST_ORTHOGONAL_MATRIX_HAS_NEGATIVE_DETERMINANT("the closest orthogonal 
matrix has a negative determinant {0}"),
 COLUMN_INDEX_OUT_OF_RANGE("column index {0} out of allowed range [{1}, 
{2}]"),
 COLUMN_INDEX("column index ({0})"), /* keep */
@@ -91,6 +92,7 @@ public enum LocalizedFormats implements Localizable {
 DIS

[text] [SANDBOX-492] Create StringDistanceFrom class that contains a StringMetric and the "left" side string. This would have a method that accepts the "right" side string to test.

2015-04-12 Thread kinow
Repository: commons-text
Updated Branches:
  refs/heads/master a5ac07106 -> 6280d46c5


[SANDBOX-492] Create StringDistanceFrom class that contains a StringMetric and 
the "left" side string.
This would have a method that accepts the "right" side string to test.

This fixes #3 from GitHub. Thanks to Jonathan Baker.


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/6280d46c
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/6280d46c
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/6280d46c

Branch: refs/heads/master
Commit: 6280d46c5d5e87e0491573efa969fcf4a6397cd7
Parents: a5ac071
Author: j--baker 
Authored: Wed Mar 4 15:20:18 2015 -0500
Committer: Bruno P. Kinoshita 
Committed: Mon Apr 13 00:48:45 2015 +1200

--
 src/changes/changes.xml |   1 +
 .../text/similarity/StringMetricFrom.java   | 111 +++
 .../ParameterizedStringMetricFromTest.java  |  92 +++
 .../text/similarity/StringMetricFromTest.java   |  71 
 4 files changed, 275 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/6280d46c/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 4ac588a..45ac073 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -22,6 +22,7 @@
   
 
   
+Create StringDistanceFrom class that contains a StringMetric and the 
"left" side string.  This would have a method that accepts the "right" side 
string to test.
 Add Cosine Similarity 
and Cosine Distance
 Change (R) StringMetric.compare(CS left, CS right) to "apply" so that it 
is consistent with BiFunction.
 Allow extra information (e.g. Levenshtein threshold) to be stored as 
(final) fields in the StringMetric instance.

http://git-wip-us.apache.org/repos/asf/commons-text/blob/6280d46c/src/main/java/org/apache/commons/text/similarity/StringMetricFrom.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/StringMetricFrom.java 
b/src/main/java/org/apache/commons/text/similarity/StringMetricFrom.java
new file mode 100644
index 000..3b2a871
--- /dev/null
+++ b/src/main/java/org/apache/commons/text/similarity/StringMetricFrom.java
@@ -0,0 +1,111 @@
+/*
+ * 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.text.similarity;
+
+/**
+ * 
+ * This stores a {@link StringMetric} implementation and a {@link 
CharSequence} "left" string.
+ * The {@link #apply(CharSequence right)} method accepts the "right" string 
and invokes the
+ * comparison function for the pair of strings.
+ * 
+ *
+ * 
+ * The following is an example which finds the most similar string:
+ * 
+ * 
+ * StringMetric metric = new LevenshteinDistance();
+ * String target = "Apache";
+ * StringMetricFrom metricFrom =
+ * new StringMetricFrom(metric, target);
+ * String mostSimilar = null;
+ * Integer shortestDistance = null;
+ *
+ * for (String test : new String[] { "Appaloosa", "a patchy", "apple" }) {
+ * Integer distance = metricFrom.apply(test);
+ * if (shortestDistance == null || distance < shortestDistance) {
+ * shortestDistance = distance;
+ * mostSimilar = test;
+ * }
+ * }
+ *
+ * System.out.println("The string most similar to \"" + target + "\" "
+ * + "is \"" + mostSimilar + "\" because "
+ * + "its distance is only " + shortestDistance + ".");
+ * 
+ *
+ * @param  This is the type of similarity score used by the StringMetric 
function.
+ */
+public class StringMetricFrom {
+
+/**
+ * String metric.
+ */
+private final StringMetric metric;
+/**
+ * Left parameter used in distance function.
+ */
+private final CharSequence left;
+
+/**
+ * This accepts the metric implementation and the "left" string.
+ *
+ * @param metric This may not be null.
+ * @par

[text] Fix checkstyle errors

2015-04-12 Thread kinow
Repository: commons-text
Updated Branches:
  refs/heads/master 376c7c4d8 -> a5ac07106


Fix checkstyle errors


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/a5ac0710
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/a5ac0710
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/a5ac0710

Branch: refs/heads/master
Commit: a5ac07106f25c0e359bb5782cf8eb16ce15aa0b8
Parents: 376c7c4
Author: Bruno P. Kinoshita 
Authored: Mon Apr 13 00:17:25 2015 +1200
Committer: Bruno P. Kinoshita 
Committed: Mon Apr 13 00:17:25 2015 +1200

--
 .../commons/text/diff/CommandVisitor.java   |  1 +
 .../apache/commons/text/diff/DeleteCommand.java |  1 +
 .../apache/commons/text/diff/EditCommand.java   |  1 +
 .../apache/commons/text/diff/EditScript.java|  1 +
 .../apache/commons/text/diff/InsertCommand.java |  1 +
 .../apache/commons/text/diff/KeepCommand.java   |  1 +
 .../commons/text/diff/ReplacementsFinder.java   | 10 +
 .../commons/text/diff/ReplacementsHandler.java  |  1 +
 .../commons/text/diff/StringsComparator.java| 32 +++---
 .../commons/text/similarity/FuzzyScore.java |  8 
 .../text/similarity/JaroWrinklerDistance.java   | 17 +---
 .../text/similarity/LevenshteinDistance.java| 44 +---
 12 files changed, 85 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/a5ac0710/src/main/java/org/apache/commons/text/diff/CommandVisitor.java
--
diff --git a/src/main/java/org/apache/commons/text/diff/CommandVisitor.java 
b/src/main/java/org/apache/commons/text/diff/CommandVisitor.java
index d73dde8..7e5f40f 100644
--- a/src/main/java/org/apache/commons/text/diff/CommandVisitor.java
+++ b/src/main/java/org/apache/commons/text/diff/CommandVisitor.java
@@ -117,6 +117,7 @@ package org.apache.commons.text.diff;
  * }
  * 
  *
+ * @param  object type
  * @since 1.0
  */
 public interface CommandVisitor {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/a5ac0710/src/main/java/org/apache/commons/text/diff/DeleteCommand.java
--
diff --git a/src/main/java/org/apache/commons/text/diff/DeleteCommand.java 
b/src/main/java/org/apache/commons/text/diff/DeleteCommand.java
index 7494002..8173718 100644
--- a/src/main/java/org/apache/commons/text/diff/DeleteCommand.java
+++ b/src/main/java/org/apache/commons/text/diff/DeleteCommand.java
@@ -29,6 +29,7 @@ package org.apache.commons.text.diff;
  * @see StringsComparator
  * @see EditScript
  *
+ * @param  object type
  * @since 1.0
  */
 public class DeleteCommand extends EditCommand {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/a5ac0710/src/main/java/org/apache/commons/text/diff/EditCommand.java
--
diff --git a/src/main/java/org/apache/commons/text/diff/EditCommand.java 
b/src/main/java/org/apache/commons/text/diff/EditCommand.java
index 972cebb..7920206 100644
--- a/src/main/java/org/apache/commons/text/diff/EditCommand.java
+++ b/src/main/java/org/apache/commons/text/diff/EditCommand.java
@@ -48,6 +48,7 @@ package org.apache.commons.text.diff;
  * @see StringsComparator
  * @see EditScript
  *
+ * @param  object type
  * @since 1.0
  */
 public abstract class EditCommand {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/a5ac0710/src/main/java/org/apache/commons/text/diff/EditScript.java
--
diff --git a/src/main/java/org/apache/commons/text/diff/EditScript.java 
b/src/main/java/org/apache/commons/text/diff/EditScript.java
index 641d60b..8891044 100644
--- a/src/main/java/org/apache/commons/text/diff/EditScript.java
+++ b/src/main/java/org/apache/commons/text/diff/EditScript.java
@@ -40,6 +40,7 @@ import java.util.List;
  * @see CommandVisitor
  * @see ReplacementsHandler
  *
+ * @param  object type
  * @since 1.0
  */
 public class EditScript {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/a5ac0710/src/main/java/org/apache/commons/text/diff/InsertCommand.java
--
diff --git a/src/main/java/org/apache/commons/text/diff/InsertCommand.java 
b/src/main/java/org/apache/commons/text/diff/InsertCommand.java
index 9a365d0..f0337dc 100644
--- a/src/main/java/org/apache/commons/text/diff/InsertCommand.java
+++ b/src/main/java/org/apache/commons/text/diff/InsertCommand.java
@@ -29,6 +29,7 @@ package org.apache.commons.text.diff;
  * @see StringsComparator
  * @see EditScript
  *
+ * @param  object type
  * @since 1.0
  */
 public class InsertCommand extends EditCommand {

http://git-wip-us.apache.org/

Git Push Summary

2015-04-12 Thread kinow
Repository: commons-text
Updated Branches:
  refs/heads/NEW-METRICS [deleted] e99b839ad


[2/2] [text] Add changes to SANDBOX-490

2015-04-12 Thread kinow
Add changes to SANDBOX-490


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/376c7c4d
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/376c7c4d
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/376c7c4d

Branch: refs/heads/master
Commit: 376c7c4d86d5c0e899da67d4ed81b7dc456fdd58
Parents: 548a791
Author: Bruno P. Kinoshita 
Authored: Sun Apr 12 23:30:58 2015 +1200
Committer: Bruno P. Kinoshita 
Committed: Sun Apr 12 23:30:58 2015 +1200

--
 src/changes/changes.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/376c7c4d/src/changes/changes.xml
--
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 553d55b..4ac588a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -22,6 +22,7 @@
   
 
   
+Add Cosine Similarity 
and Cosine Distance
 Change (R) StringMetric.compare(CS left, CS right) to "apply" so that it 
is consistent with BiFunction.
 Allow extra information (e.g. Levenshtein threshold) to be stored as 
(final) fields in the StringMetric instance.
 Port Myers algorithm 
from [collections]



[1/2] [text] Remove unused and empty Jaccard files and update distance method name

2015-04-12 Thread kinow
Repository: commons-text
Updated Branches:
  refs/heads/master 3ccdabb1e -> 376c7c4d8


Remove unused and empty Jaccard files and update distance method name


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/548a7918
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/548a7918
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/548a7918

Branch: refs/heads/master
Commit: 548a7918ef57e2591c3d6aaa9bb3e42e17fa6cbe
Parents: 3ccdabb
Author: Bruno P. Kinoshita 
Authored: Sun Apr 12 23:30:02 2015 +1200
Committer: Bruno P. Kinoshita 
Committed: Sun Apr 12 23:30:02 2015 +1200

--
 .../commons/text/similarity/CosineDistance.java |  2 +-
 .../text/similarity/JaccardDistance.java| 21 
 .../commons/text/similarity/JaccardIndex.java   | 21 
 .../text/similarity/CosineDistanceTest.java |  8 
 4 files changed, 5 insertions(+), 47 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/548a7918/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/CosineDistance.java 
b/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
index 69cfad7..f9fcf39 100644
--- a/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
+++ b/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
@@ -41,7 +41,7 @@ public class CosineDistance implements StringMetric {
 private final CosineSimilarity cosineSimilarity = new CosineSimilarity();
 
 @Override
-public Double compare(CharSequence left, CharSequence right) {
+public Double apply(CharSequence left, CharSequence right) {
 CharSequence[] leftTokens = tokenizer.tokenize(left);
 CharSequence[] rightTokens = tokenizer.tokenize(right);
 

http://git-wip-us.apache.org/repos/asf/commons-text/blob/548a7918/src/main/java/org/apache/commons/text/similarity/JaccardDistance.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/JaccardDistance.java 
b/src/main/java/org/apache/commons/text/similarity/JaccardDistance.java
deleted file mode 100644
index 7237244..000
--- a/src/main/java/org/apache/commons/text/similarity/JaccardDistance.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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.text.similarity;
-
-public class JaccardDistance {
-
-}

http://git-wip-us.apache.org/repos/asf/commons-text/blob/548a7918/src/main/java/org/apache/commons/text/similarity/JaccardIndex.java
--
diff --git a/src/main/java/org/apache/commons/text/similarity/JaccardIndex.java 
b/src/main/java/org/apache/commons/text/similarity/JaccardIndex.java
deleted file mode 100644
index ceaa468..000
--- a/src/main/java/org/apache/commons/text/similarity/JaccardIndex.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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.text.similarity;
-
-public class JaccardIndex {
-
-}

http://git-wip-us.apache.org/repos/asf/commons-t

[text] [SANDBOX-490] Add cosine similarity and cosine distance. Strings are converted into vectors using a simple regex tokenizer. Vectors are used to get the cosine similarity and, finally, the dista

2015-04-12 Thread kinow
Repository: commons-text
Updated Branches:
  refs/heads/master 980791b69 -> 3ccdabb1e


[SANDBOX-490] Add cosine similarity and cosine distance. Strings are converted 
into vectors using
a simple regex tokenizer. Vectors are used to get the cosine similarity and, 
finally, the
distance is equal to 1.0 - the distance.

New classes used by the cosine distance and the cosine similarity had to be 
created (including
the tokenizers). These classes were put in a new internal package, annotated 
accordingly.


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/3ccdabb1
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/3ccdabb1
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/3ccdabb1

Branch: refs/heads/master
Commit: 3ccdabb1e27bd41bf88e5b623136481d989b2b0e
Parents: 980791b
Author: Bruno P. Kinoshita 
Authored: Sat Feb 14 14:23:42 2015 -0200
Committer: Bruno P. Kinoshita 
Committed: Sun Apr 12 23:25:06 2015 +1200

--
 pom.xml |   4 +
 .../commons/text/similarity/CosineDistance.java |  54 +
 .../text/similarity/CosineSimilarity.java   | 101 +
 .../text/similarity/JaccardDistance.java|  21 ++
 .../commons/text/similarity/JaccardIndex.java   |  21 ++
 .../text/similarity/internal/Counter.java   |  61 ++
 .../similarity/internal/RegexTokenizer.java |  52 +
 .../text/similarity/internal/Tokenizer.java |  35 
 .../text/similarity/internal/package-info.java  |  23 +++
 .../commons/text/checkstyle-suppressions.xml|  28 +++
 .../org/apache/commons/text/checkstyle.xml  | 206 +++
 .../org/apache/commons/text/fb-excludes.xml |  19 ++
 .../org/apache/commons/text/license-header.txt  |  16 ++
 .../text/similarity/CosineDistanceTest.java |  72 +++
 14 files changed, 713 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/3ccdabb1/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 2f46e9a..6b2a50f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -150,6 +150,10 @@
 2.13
 
   false
+  
${basedir}/src/main/resources/org/apache/commons/text/checkstyle.xml
+  
${basedir}/src/main/resources/org/apache/commons/text/license-header.txt
+  
${basedir}/src/main/resources/org/apache/commons/text/checkstyle-suppressions.xml
+  
${basedir}/src/main/resources/org/apache/commons/text/checkstyle-suppressions.xml
 
 
   

http://git-wip-us.apache.org/repos/asf/commons-text/blob/3ccdabb1/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/CosineDistance.java 
b/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
new file mode 100644
index 000..69cfad7
--- /dev/null
+++ b/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
@@ -0,0 +1,54 @@
+/*
+ * 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.text.similarity;
+
+import java.util.Map;
+
+import org.apache.commons.text.similarity.internal.Counter;
+import org.apache.commons.text.similarity.internal.RegexTokenizer;
+import org.apache.commons.text.similarity.internal.Tokenizer;
+
+/**
+ * Measures the cosine distance between two character sequences.
+ *
+ * It utilizes the CosineSimilarity to compute the distance. Character 
sequences
+ * are converted into vectors through a simple tokenizer that works with 
+ *
+ * @since 0.1
+ */
+public class CosineDistance implements StringMetric {
+/**
+ * Tokenizer used to convert the character sequence into a vector.
+ */
+private final Tokenizer tokenizer = new RegexTokenizer();
+/**
+ * Cosine similarity.
+ */
+private final CosineSimilarity cosineSimilarity = new CosineSimilarity();
+
+@Override
+public Double compare(CharSequence left, Ch

[2/2] [text] Formatting, code style and comments

2015-04-12 Thread kinow
Formatting, code style and comments


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/e99b839a
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/e99b839a
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/e99b839a

Branch: refs/heads/NEW-METRICS
Commit: e99b839ad6fc023dd57519e07b8a2f36e2b58b39
Parents: e00d85b
Author: Bruno P. Kinoshita 
Authored: Sun Apr 12 21:54:11 2015 +1200
Committer: Bruno P. Kinoshita 
Committed: Sun Apr 12 21:54:11 2015 +1200

--
 .../text/similarity/CosineDistanceTest.java  | 19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/e99b839a/src/test/java/org/apache/commons/text/similarity/CosineDistanceTest.java
--
diff --git 
a/src/test/java/org/apache/commons/text/similarity/CosineDistanceTest.java 
b/src/test/java/org/apache/commons/text/similarity/CosineDistanceTest.java
index ce33572..0d6879a 100644
--- a/src/test/java/org/apache/commons/text/similarity/CosineDistanceTest.java
+++ b/src/test/java/org/apache/commons/text/similarity/CosineDistanceTest.java
@@ -26,18 +26,29 @@ import org.junit.Test;
 
 /**
  * Unit tests for {@link org.apache.commons.text.similarity.CosineSimilarity}.
+ *
+ * @since 0.1
  */
 public class CosineDistanceTest {
 
+/**
+ * Cosine distance under test.
+ */
 private static CosineDistance cosineDistance;
 
+/**
+ * Creates the cosine distance object used throughout the tests.
+ */
 @BeforeClass
 public static void setUp() {
 cosineDistance = new CosineDistance();
 }
 
+/**
+ * Tests the cosine distance with several inputs.
+ */
 @Test
-public void testCosineSimilarity() {
+public void testCosineDistance() {
 assertEquals(Double.valueOf(0.5d), 
roundValue(cosineDistance.compare("the house", "da house")));
 assertEquals(Double.valueOf(0.0d), 
roundValue(cosineDistance.compare("AB", "AB")));
 assertEquals(Double.valueOf(1.0d), 
roundValue(cosineDistance.compare("AB", "BA")));
@@ -48,6 +59,12 @@ public class CosineDistanceTest {
 
 // --- Utility methods
 
+/**
+ * Rounds up a value.
+ *
+ * @param value a value
+ * @return rounded up value
+ */
 private Double roundValue(Double value) {
 return (Double) new BigDecimal(value).setScale(2, 
RoundingMode.HALF_UP).doubleValue();
 }



[1/2] [text] Code style, formatting and removing unused classes

2015-04-12 Thread kinow
Repository: commons-text
Updated Branches:
  refs/heads/NEW-METRICS 81f679dea -> e99b839ad


Code style, formatting and removing unused classes


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/e00d85b3
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/e00d85b3
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/e00d85b3

Branch: refs/heads/NEW-METRICS
Commit: e00d85b38632dce4758f32b3e4af6afcecd66d3c
Parents: 81f679d
Author: Bruno P. Kinoshita 
Authored: Sun Apr 12 21:52:33 2015 +1200
Committer: Bruno P. Kinoshita 
Committed: Sun Apr 12 21:52:33 2015 +1200

--
 .../commons/text/similarity/CosineDistance.java | 33 -
 .../text/similarity/CosineSimilarity.java   | 19 +++
 .../similarity/internal/CharacterTokenizer.java | 43 
 .../text/similarity/internal/Counter.java   | 24 +++--
 .../similarity/internal/RegexTokenizer.java | 52 
 .../similarity/internal/SimpleTokenizer.java| 50 ---
 .../similarity/internal/StringTokenizer.java| 36 --
 .../text/similarity/internal/Tokenizer.java |  5 +-
 .../internal/WhiteSpaceTokenizer.java   | 46 -
 .../text/similarity/internal/package-info.java  |  6 ++-
 10 files changed, 105 insertions(+), 209 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/commons-text/blob/e00d85b3/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/CosineDistance.java 
b/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
index 54970e4..6ed2d69 100644
--- a/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
+++ b/src/main/java/org/apache/commons/text/similarity/CosineDistance.java
@@ -19,27 +19,34 @@ package org.apache.commons.text.similarity;
 import java.util.Map;
 
 import org.apache.commons.text.similarity.internal.Counter;
-import org.apache.commons.text.similarity.internal.SimpleTokenizer;
+import org.apache.commons.text.similarity.internal.RegexTokenizer;
 import org.apache.commons.text.similarity.internal.Tokenizer;
 
 /**
- * 
- * Calcules the cosine distance.
- * 
+ * Measures the cosine distance between two character sequences.
+ *
+ * It utilizes the CosineSimilarity to compute the distance. Character 
sequences
+ * are converted into vectors through a simple tokenizer that works with 
+ *
+ * @since 0.1
  */
 public class CosineDistance implements StringMetric {
-
-private final Tokenizer tokenizer = new SimpleTokenizer();
-
+/**
+ * Tokenizer used to convert the character sequence into a vector.
+ */
+private final Tokenizer tokenizer = new RegexTokenizer();
+/**
+ * Cosine similarity. 
+ */
 private final CosineSimilarity cosineSimilarity = new CosineSimilarity();
-
+
 @Override
 public Double compare(CharSequence left, CharSequence right) {
-String[] leftTokens = tokenizer.tokenize(left);
-String[] rightTokens = tokenizer.tokenize(right);
-
-Map leftVector = Counter.of(leftTokens);
-Map rightVector = Counter.of(rightTokens);
+CharSequence[] leftTokens = tokenizer.tokenize(left);
+CharSequence[] rightTokens = tokenizer.tokenize(right);
+
+Map leftVector = Counter.of(leftTokens);
+Map rightVector = Counter.of(rightTokens);
 double similarity = cosineSimilarity.cosineSimilarity(leftVector, 
rightVector);
 return 1.0 - similarity;
 }

http://git-wip-us.apache.org/repos/asf/commons-text/blob/e00d85b3/src/main/java/org/apache/commons/text/similarity/CosineSimilarity.java
--
diff --git 
a/src/main/java/org/apache/commons/text/similarity/CosineSimilarity.java 
b/src/main/java/org/apache/commons/text/similarity/CosineSimilarity.java
index 992e5e9..096f2aa 100644
--- a/src/main/java/org/apache/commons/text/similarity/CosineSimilarity.java
+++ b/src/main/java/org/apache/commons/text/similarity/CosineSimilarity.java
@@ -20,16 +20,13 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-
 /**
- * 
  * Measures the Cosine similarity of two vectors of an inner product space and
  * compares the angle between them.
- * 
  *
  * 
- * For further explanation about the Cosine Similarity, take a look at its
- * Wikipedia page at http://en.wikipedia.org/wiki/Cosine_similarity.
+ * For further explanation about the Cosine Similarity, refer to
+ * http://en.wikipedia.org/wiki/Cosine_similarity.
  * 
  *
  * @since 0.1
@@ -43,12 +40,12 @@ public class CosineSimilarity {
  * @param rightVector right vector
  *

svn commit: r1672988 - in /commons/proper/lang/trunk/src: main/java/org/apache/commons/lang3/StringUtils.java test/java/org/apache/commons/lang3/StringUtilsTest.java

2015-04-12 Thread djones
Author: djones
Date: Sun Apr 12 07:14:45 2015
New Revision: 1672988

URL: http://svn.apache.org/r1672988
Log:
Corrected Javadoc (mentioned in LANG-1058), added examples to unit test.

Modified:

commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java

commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java

Modified: 
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java?rev=1672988&r1=1672987&r2=1672988&view=diff
==
--- 
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
 (original)
+++ 
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
 Sun Apr 12 07:14:45 2015
@@ -5728,7 +5728,7 @@ public class StringUtils {
 }
 
 /**
- * Uncapitalizes a String changing the first letter to title case as
+ * Uncapitalizes a String, changing the first letter to lower case as
  * per {@link Character#toLowerCase(char)}. No other letters are 
changed.
  *
  * For a word based algorithm, see {@link 
org.apache.commons.lang3.text.WordUtils#uncapitalize(String)}.
@@ -5737,6 +5737,7 @@ public class StringUtils {
  * 
  * StringUtils.uncapitalize(null)  = null
  * StringUtils.uncapitalize("")= ""
+ * StringUtils.uncapitalize("cat") = "cat"
  * StringUtils.uncapitalize("Cat") = "cat"
  * StringUtils.uncapitalize("CAT") = "cAT"
  * 

Modified: 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java?rev=1672988&r1=1672987&r2=1672988&view=diff
==
--- 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
 (original)
+++ 
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
 Sun Apr 12 07:14:45 2015
@@ -267,6 +267,11 @@ public class StringUtilsTest {
  "foo test thing", StringUtils.lowerCase("fOo test THING", 
Locale.ENGLISH) );
 assertEquals("lowerCase(empty-string, Locale) failed",
  "", StringUtils.lowerCase("", Locale.ENGLISH) );
+
+// Examples from uncapitalize Javadoc
+assertEquals("cat", StringUtils.uncapitalize("cat"));
+assertEquals("cat", StringUtils.uncapitalize("Cat")); 
+assertEquals("cAT", StringUtils.uncapitalize("CAT")); 
 }
 
 @Test