You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2019/02/15 23:07:45 UTC

[commons-rng] branch master updated (56f7770 -> 485961a)

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git.


    from 56f7770  Fix MathJax javadoc setting in reports section.
     new bd7db46  Fix checkstyle and javadoc in examples sampling ProbabilityDensityApproximation
     new 3298d4d  Disable checkstyle to allow System.out
     new 201b3fb  Fix 1.2-SNAPSHOT to 1.3-SNAPSHOT in JPMS runApp.sh
     new 485961a  The --allow-script-in-comments option is specific to java8.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 commons-rng-examples/examples-jpms/runApp.sh               |  2 +-
 .../examples/sampling/ProbabilityDensityApproximation.java |  7 +++++--
 .../rng/examples/sampling/UniformSamplingVisualCheck.java  |  3 +++
 pom.xml                                                    | 14 ++++++++++++--
 4 files changed, 21 insertions(+), 5 deletions(-)


[commons-rng] 02/04: Disable checkstyle to allow System.out

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit 3298d4db2d7e94e3e64b57da81b7fa8d76a67db2
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Fri Feb 15 22:36:27 2019 +0000

    Disable checkstyle to allow System.out
---
 .../commons/rng/examples/sampling/UniformSamplingVisualCheck.java      | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/commons-rng-examples/examples-sampling/src/main/java/org/apache/commons/rng/examples/sampling/UniformSamplingVisualCheck.java b/commons-rng-examples/examples-sampling/src/main/java/org/apache/commons/rng/examples/sampling/UniformSamplingVisualCheck.java
index e102221..8875934 100644
--- a/commons-rng-examples/examples-sampling/src/main/java/org/apache/commons/rng/examples/sampling/UniformSamplingVisualCheck.java
+++ b/commons-rng-examples/examples-sampling/src/main/java/org/apache/commons/rng/examples/sampling/UniformSamplingVisualCheck.java
@@ -41,6 +41,9 @@ public class UniformSamplingVisualCheck {
         new BoxMullerNormalizedGaussianSampler(rng),
     };
 
+    // Allow System.out
+    // CHECKSTYLE: stop RegexpCheck
+
     /**
      * Program entry point.
      *


[commons-rng] 03/04: Fix 1.2-SNAPSHOT to 1.3-SNAPSHOT in JPMS runApp.sh

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit 201b3fbab85b870a540c5a4e0bef97232ee9fba2
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Fri Feb 15 22:39:31 2019 +0000

    Fix 1.2-SNAPSHOT to 1.3-SNAPSHOT in JPMS runApp.sh
---
 commons-rng-examples/examples-jpms/runApp.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commons-rng-examples/examples-jpms/runApp.sh b/commons-rng-examples/examples-jpms/runApp.sh
index c90f6e8..53070fd 100755
--- a/commons-rng-examples/examples-jpms/runApp.sh
+++ b/commons-rng-examples/examples-jpms/runApp.sh
@@ -19,7 +19,7 @@
 # "mvn package" from the top level project directory).
 
 TOPDIR=../..
-RNGVERSION=1.2-SNAPSHOT
+RNGVERSION=1.3-SNAPSHOT
 TARGETDIR=target
 
 # Module path.


[commons-rng] 04/04: The --allow-script-in-comments option is specific to java8.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit 485961aa6321e1b3ac2b7968b16a68e36ff882ba
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Fri Feb 15 23:07:43 2019 +0000

    The --allow-script-in-comments option is specific to java8.
---
 pom.xml | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5b1164b..3dfd486 100644
--- a/pom.xml
+++ b/pom.xml
@@ -518,6 +518,18 @@
         </plugins>
       </build>
     </profile>
+    <!-- profile for MathJax in Java 8 -->
+    <profile>
+      <id>jdk8-javadoc</id>
+      <activation>
+        <jdk>1.8</jdk>
+      </activation>
+      <properties>
+        <!-- MathJax requires additional Javadoc qualifier for Java8 as of 8u121 -->
+        <!-- Note that this option is not in Java9 -->
+        <allowscript.javadoc.qualifier>--allow-script-in-comments</allowscript.javadoc.qualifier>
+      </properties>
+    </profile>
     <!-- profile to allow the use of plugin versions that require Java 8+ -->
     <profile>
       <id>jdk8-plugins</id>
@@ -527,8 +539,6 @@
       <properties>
         <!-- Check for all javadoc errors -->
         <doclint.javadoc.qualifier>-Xdoclint:all</doclint.javadoc.qualifier>
-        <!-- MathJax requires additional Javadoc qualifier for Java8+ -->
-        <allowscript.javadoc.qualifier>--allow-script-in-comments</allowscript.javadoc.qualifier>
       </properties>
       <build>
         <plugins>


[commons-rng] 01/04: Fix checkstyle and javadoc in examples sampling ProbabilityDensityApproximation

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit bd7db4673ec0ed1f41c2db7274344c8bad061117
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Fri Feb 15 22:12:52 2019 +0000

    Fix checkstyle and javadoc in examples sampling
    ProbabilityDensityApproximation
    
    This requires suppression of MultipleStringLiteralsCheck to ignore the
    use of "# " and " ".
---
 .../rng/examples/sampling/ProbabilityDensityApproximation.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/commons-rng-examples/examples-sampling/src/main/java/org/apache/commons/rng/examples/sampling/ProbabilityDensityApproximation.java b/commons-rng-examples/examples-sampling/src/main/java/org/apache/commons/rng/examples/sampling/ProbabilityDensityApproximation.java
index 3fa5ace..be5fb59 100644
--- a/commons-rng-examples/examples-sampling/src/main/java/org/apache/commons/rng/examples/sampling/ProbabilityDensityApproximation.java
+++ b/commons-rng-examples/examples-sampling/src/main/java/org/apache/commons/rng/examples/sampling/ProbabilityDensityApproximation.java
@@ -59,10 +59,11 @@ public class ProbabilityDensityApproximation {
      * @param min Right abscissa of the first bin: every sample smaller
      * than that value will increment an additional bin (of infinite width)
      * placed before the first "equal-width" bin.
-     * @param Left abscissa of the last bin: every sample larger than or
+     * @param max abscissa of the last bin: every sample larger than or
      * equal to that value will increment an additional bin (of infinite
      * width) placed after the last "equal-width" bin.
-     * @param output Filename.
+     * @param outputFile Filename.
+     * @throws IOException Signals that an I/O exception has occurred.
      */
     private void createDensity(ContinuousSampler sampler,
                                double min,
@@ -96,6 +97,7 @@ public class ProbabilityDensityApproximation {
         final double norm = 1 / (binSize * numSamples);
 
         final PrintWriter out = new PrintWriter(outputFile);
+        // CHECKSTYLE: stop MultipleStringLiteralsCheck
         out.println("# Sampler: " + sampler);
         out.println("# Number of bins: " + numBins);
         out.println("# Min: " + min + " (fraction of samples below: " + (belowMin / (double) numSamples) + ")");
@@ -109,6 +111,7 @@ public class ProbabilityDensityApproximation {
         }
         out.println("# " + (max + binHalfSize) + " " + (aboveMax * norm));
         out.close();
+        // CHECKSTYLE: resume MultipleStringLiteralsCheck
     }
 
     /**