Merge branch 'add-md-files'
diff --git a/NOTICE.txt b/NOTICE.txt
index 494fd0f..ce791e4 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,5 +1,5 @@
Apache Commons Math
-Copyright 2001-2014 The Apache Software Foundation
+Copyright 2001-2015 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/src/main/java/org/apache/commons/math3/special/BesselJ.java b/src/main/java/org/apache/commons/math3/special/BesselJ.java
index f1e6999..a2897a5 100644
--- a/src/main/java/org/apache/commons/math3/special/BesselJ.java
+++ b/src/main/java/org/apache/commons/math3/special/BesselJ.java
@@ -17,14 +17,13 @@
package org.apache.commons.math3.special;
-import java.util.Arrays;
-
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.exception.ConvergenceException;
import org.apache.commons.math3.exception.MathIllegalArgumentException;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.special.Gamma;
import org.apache.commons.math3.util.FastMath;
+import org.apache.commons.math3.util.MathArrays;
/**
* This class provides computation methods related to Bessel
@@ -206,7 +205,7 @@
* @param n count of valid values
*/
public BesselJResult(double[] b, int n) {
- vals = Arrays.copyOf(b, b.length);
+ vals = MathArrays.copyOf(b, b.length);
nVals = n;
}
@@ -214,7 +213,7 @@
* @return the computed function values
*/
public double[] getVals() {
- return Arrays.copyOf(vals, vals.length);
+ return MathArrays.copyOf(vals, vals.length);
}
/**
@@ -374,7 +373,7 @@
capq = (capq + 1) * ((gnu * gnu) - 1) * (0.125 / x);
b[i - 1] = xc * (capp * vcos - capq * vsin);
if (nb == 1) {
- return new BesselJResult(Arrays.copyOf(b, b.length),
+ return new BesselJResult(MathArrays.copyOf(b, b.length),
ncalc);
}
t = vsin;
@@ -645,6 +644,6 @@
}
ncalc = FastMath.min(nb, 0) - 1;
}
- return new BesselJResult(Arrays.copyOf(b, b.length), ncalc);
+ return new BesselJResult(MathArrays.copyOf(b, b.length), ncalc);
}
}
diff --git a/src/userguide/README b/src/userguide/README
new file mode 100644
index 0000000..2bf7766
--- /dev/null
+++ b/src/userguide/README
@@ -0,0 +1,8 @@
+This directory contains source code that is not part of the Apache
+Commons Math library. It contains syntaxically correct and working
+examples of use.
+
+In order to run one of the applications (a class that must contain a
+"main" method), you would type (in a shell console) a command similar
+to the following:
+ $ mvn -q exec:java -Dexec.mainClass=org.apache.commons.math3.userguide.sofm.ChineseRingsClassifier
diff --git a/src/userguide/java/org/apache/commons/math3/userguide/genetics/HelloWorldExample.java b/src/userguide/java/org/apache/commons/math3/userguide/genetics/HelloWorldExample.java
index c95ae28..00c40e8 100644
--- a/src/userguide/java/org/apache/commons/math3/userguide/genetics/HelloWorldExample.java
+++ b/src/userguide/java/org/apache/commons/math3/userguide/genetics/HelloWorldExample.java
@@ -63,7 +63,7 @@
int generation = 0;
- @Override
+// @Override
public boolean isSatisfied(Population population) {
Chromosome fittestChromosome = population.getFittestChromosome();
diff --git a/src/userguide/java/org/apache/commons/math3/userguide/geometry/GeometryExample.java b/src/userguide/java/org/apache/commons/math3/userguide/geometry/GeometryExample.java
index 9b7cb08..ea3ea3f 100644
--- a/src/userguide/java/org/apache/commons/math3/userguide/geometry/GeometryExample.java
+++ b/src/userguide/java/org/apache/commons/math3/userguide/geometry/GeometryExample.java
@@ -169,7 +169,7 @@
random.addActionListener(new ActionListener() {
- @Override
+// @Override
public void actionPerformed(ActionEvent e) {
canvas.getLayer().removeAllChildren();
@@ -183,7 +183,7 @@
circle.addActionListener(new ActionListener() {
- @Override
+// @Override
public void actionPerformed(ActionEvent e) {
canvas.getLayer().removeAllChildren();
@@ -197,7 +197,7 @@
cross.addActionListener(new ActionListener() {
- @Override
+// @Override
public void actionPerformed(ActionEvent e) {
canvas.getLayer().removeAllChildren();
diff --git a/src/userguide/pom.xml b/src/userguide/pom.xml
index b645649..1daa91f 100644
--- a/src/userguide/pom.xml
+++ b/src/userguide/pom.xml
@@ -22,7 +22,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3-examples</artifactId>
- <version>3.4-SNAPSHOT</version>
+ <version>3.5-SNAPSHOT</version>
<name>Commons Math User Guide</name>
<inceptionYear>2003</inceptionYear>
<description>Examples</description>
@@ -39,10 +39,30 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <maven.compiler.source>1.5</maven.compiler.source>
+ <maven.compiler.target>1.5</maven.compiler.target>
</properties>
<build>
<sourceDirectory>java</sourceDirectory>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <finalName>${artifactId}-uber-${version}</finalName>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
<reporting>
</reporting>
@@ -51,7 +71,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
- <version>3.4-SNAPSHOT</version>
+ <version>3.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.xeiam.xchart</groupId>