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 2026/08/22 12:19:09 UTC
(commons-rng) branch master updated (e0905969 -> 60c4bc78)
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git
from e0905969 Typo
new baba8db4 Change method scope in private class to protected
new 60c4bc78 Update to commons-parent 104
The 2 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:
.../apache/commons/rng/sampling/shape/LineSampler.java | 8 ++++----
.../commons/rng/sampling/shape/TriangleSampler.java | 6 +++---
pom.xml | 2 +-
src/conf/pmd/pmd-ruleset.xml | 17 +++++++++++++++--
4 files changed, 23 insertions(+), 10 deletions(-)
(commons-rng) 02/02: Update to commons-parent 104
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git
commit 60c4bc787290c8a3ea02325a40fc394f5c9c75fd
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Sat Aug 22 13:19:01 2026 +0100
Update to commons-parent 104
Requires changes to PMD rules.
---
pom.xml | 2 +-
src/conf/pmd/pmd-ruleset.xml | 17 +++++++++++++++--
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 358bcfaf..eca0d0ec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.commons</groupId>
<artifactId>commons-parent</artifactId>
- <version>99</version>
+ <version>104</version>
</parent>
<artifactId>commons-rng-parent</artifactId>
diff --git a/src/conf/pmd/pmd-ruleset.xml b/src/conf/pmd/pmd-ruleset.xml
index 1c30be53..854e5110 100644
--- a/src/conf/pmd/pmd-ruleset.xml
+++ b/src/conf/pmd/pmd-ruleset.xml
@@ -121,9 +121,11 @@
or @SimpleName='Conversions' or @SimpleName='MixFunctions' or @SimpleName='LXMSupport'
or @SimpleName='UniformRandomProviderSupport' or @SimpleName='RandomStreams'
or @SimpleName='IntJumpDistances' or @SimpleName='LongJumpDistances'
- or @SimpleName='PhiloxSupport']"/>
+ or @SimpleName='PhiloxSupport' or @SimpleName='NumberFactory'
+ or @SimpleName='InternalGamma'
+ or @SimpleName='Binomial' or @SimpleName='Enumerated' or @SimpleName='Poisson']"/>
<!-- Allow samplers to have only factory constructors -->
- <property name="utilityClassPattern" value="[A-Z][a-zA-Z0-9]+(Utils?|Helper|Sampler)" />
+ <property name="utilityClassPattern" value="[A-Z][a-zA-Z0-9]+(Utils?|Helper|Samplers?)" />
</properties>
</rule>
<rule ref="category/java/codestyle.xml/ShortMethodName">
@@ -150,6 +152,11 @@
value="./ancestor::ClassDeclaration[@SimpleName='SplitMix64']"/>
</properties>
</rule>
+ <rule ref="category/java/codestyle.xml/VariableDeclarationUsageDistance">
+ <properties>
+ <property name="maxDistance" value="10"/>
+ </properties>
+ </rule>
<rule ref="category/java/design.xml/NPathComplexity">
<properties>
@@ -250,6 +257,12 @@
or @SimpleName='FactorialLog']"/>
</properties>
</rule>
+ <rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts">
+ <properties>
+ <property name="violationSuppressXPath"
+ value="./ancestor-or-self::ClassDeclaration[@SimpleName='ZigguratSampler']"/>
+ </properties>
+ </rule>
<rule ref="category/java/documentation.xml/CommentRequired">
<properties>
(commons-rng) 01/02: Change method scope in private class to protected
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git
commit baba8db4e583996bb2d1cda2b8bb9cb8daa5ae18
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Sat Aug 22 13:17:18 2026 +0100
Change method scope in private class to protected
---
.../java/org/apache/commons/rng/sampling/shape/LineSampler.java | 8 ++++----
.../org/apache/commons/rng/sampling/shape/TriangleSampler.java | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/shape/LineSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/shape/LineSampler.java
index 086e5469..830b83ba 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/shape/LineSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/shape/LineSampler.java
@@ -83,7 +83,7 @@ public abstract class LineSampler implements SharedStateObjectSampler<double[]>
}
@Override
- public double[] createSample(double p1mu, double u) {
+ protected double[] createSample(double p1mu, double u) {
return new double[] {p1mu * ax + u * bx};
}
@@ -133,7 +133,7 @@ public abstract class LineSampler implements SharedStateObjectSampler<double[]>
}
@Override
- public double[] createSample(double p1mu, double u) {
+ protected double[] createSample(double p1mu, double u) {
return new double[] {p1mu * ax + u * bx,
p1mu * ay + u * by};
}
@@ -192,7 +192,7 @@ public abstract class LineSampler implements SharedStateObjectSampler<double[]>
}
@Override
- public double[] createSample(double p1mu, double u) {
+ protected double[] createSample(double p1mu, double u) {
return new double[] {p1mu * ax + u * bx,
p1mu * ay + u * by,
p1mu * az + u * bz};
@@ -237,7 +237,7 @@ public abstract class LineSampler implements SharedStateObjectSampler<double[]>
}
@Override
- public double[] createSample(double p1mu, double u) {
+ protected double[] createSample(double p1mu, double u) {
final double[] x = new double[a.length];
for (int i = 0; i < x.length; i++) {
x[i] = p1mu * a[i] + u * b[i];
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/shape/TriangleSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/shape/TriangleSampler.java
index 660bfabb..ce3ed858 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/shape/TriangleSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/shape/TriangleSampler.java
@@ -127,7 +127,7 @@ public abstract class TriangleSampler implements SharedStateObjectSampler<double
}
@Override
- public double[] createSample(double p1msmt, double s, double t) {
+ protected double[] createSample(double p1msmt, double s, double t) {
return new double[] {p1msmt * ax + s * bx + t * cx,
p1msmt * ay + s * by + t * cy};
}
@@ -199,7 +199,7 @@ public abstract class TriangleSampler implements SharedStateObjectSampler<double
}
@Override
- public double[] createSample(double p1msmt, double s, double t) {
+ protected double[] createSample(double p1msmt, double s, double t) {
return new double[] {p1msmt * ax + s * bx + t * cx,
p1msmt * ay + s * by + t * cy,
p1msmt * az + s * bz + t * cz};
@@ -249,7 +249,7 @@ public abstract class TriangleSampler implements SharedStateObjectSampler<double
}
@Override
- public double[] createSample(double p1msmt, double s, double t) {
+ protected double[] createSample(double p1msmt, double s, double t) {
final double[] x = new double[a.length];
for (int i = 0; i < x.length; i++) {
x[i] = p1msmt * a[i] + s * b[i] + t * c[i];