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/05/17 13:33:47 UTC
[commons-rng] 02/03: Fixed typo and updated deprecated generator.
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 5cf993a22bcedfe8c66dd9ae6536c1ee2db146ea
Author: aherbert <ah...@apache.org>
AuthorDate: Fri May 17 14:31:40 2019 +0100
Fixed typo and updated deprecated generator.
---
.../commons/rng/examples/sampling/UniformSamplingVisualCheck.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 8875934..a912791 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
@@ -26,14 +26,14 @@ import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
/**
* Creates 2D plot of sampling output.
- * It is a "manual" check that could help ensure that no artefacts
+ * It is a "manual" check that could help ensure that no artifacts
* exist in some tiny region of the expected range, due to loss of
* accuracy, e.g. when porting C code based on 32-bits "float" to
* "Commons RNG" that uses Java "double" (64-bits).
*/
public class UniformSamplingVisualCheck {
/** RNG. */
- private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S);
+ private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S_PHI);
/** Samplers. */
private final ContinuousSampler[] samplers = new ContinuousSampler[] {
new ZigguratNormalizedGaussianSampler(rng),
Re: [commons-rng] 02/03: Fixed typo and updated deprecated generator.
Posted by Alex Herbert <al...@gmail.com>.
On 17/05/2019 15:27, Gilles Sadowski wrote:
> Hello.
>
> Le ven. 17 mai 2019 à 16:10, Alex Herbert <al...@gmail.com> a écrit :
>>
>> On 17/05/2019 14:41, Gilles Sadowski wrote:
>>> Hi Alex.
>>>
>>> Le ven. 17 mai 2019 à 15:33, <ah...@apache.org> a écrit :
>>>> 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 5cf993a22bcedfe8c66dd9ae6536c1ee2db146ea
>>>> Author: aherbert <ah...@apache.org>
>>>> AuthorDate: Fri May 17 14:31:40 2019 +0100
>>>>
>>>> Fixed typo and updated deprecated generator.
>>>> ---
>>>> .../commons/rng/examples/sampling/UniformSamplingVisualCheck.java | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> 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 8875934..a912791 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
>>>> @@ -26,14 +26,14 @@ import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
>>>>
>>>> /**
>>>> * Creates 2D plot of sampling output.
>>>> - * It is a "manual" check that could help ensure that no artefacts
>>>> + * It is a "manual" check that could help ensure that no artifacts
>>> That was not a typo. ;-)
>> Apparently 'Artefact' is the British spelling and 'Artifact' is the US
>> spelling [1].
> Indeed, I use British spelling. :-)
>
>> So I do not know why my British configured IDE picked the
>> original out as wrong.
>>
>> Anyway does commons use US spelling?
> I don't know that there is such a rule.
> [Why did the Americans change the spelling? ;-)]
>
>> If so it should stay updated,
>> otherwise I can revert.
> Either is fine, I guess.
OK. Java uses US spelling (e.g. 'synchronized') so I thought it may
apply here.
Anyway, I'll leave it alone as the commit is more about updating the
deprecated RNG.
>
> Regards,
> Gilles
>
>> https://en.oxforddictionaries.com/definition/artefact
>>
>>>> * exist in some tiny region of the expected range, due to loss of
>>>> * accuracy, e.g. when porting C code based on 32-bits "float" to
>>>> * "Commons RNG" that uses Java "double" (64-bits).
>>>> */
>>>> public class UniformSamplingVisualCheck {
>>>> /** RNG. */
>>>> - private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S);
>>>> + private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S_PHI);
>>>> /** Samplers. */
>>>> private final ContinuousSampler[] samplers = new ContinuousSampler[] {
>>>> new ZigguratNormalizedGaussianSampler(rng),
>>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [commons-rng] 02/03: Fixed typo and updated deprecated generator.
Posted by Gilles Sadowski <gi...@gmail.com>.
Hello.
Le ven. 17 mai 2019 à 16:10, Alex Herbert <al...@gmail.com> a écrit :
>
>
> On 17/05/2019 14:41, Gilles Sadowski wrote:
> > Hi Alex.
> >
> > Le ven. 17 mai 2019 à 15:33, <ah...@apache.org> a écrit :
> >> 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 5cf993a22bcedfe8c66dd9ae6536c1ee2db146ea
> >> Author: aherbert <ah...@apache.org>
> >> AuthorDate: Fri May 17 14:31:40 2019 +0100
> >>
> >> Fixed typo and updated deprecated generator.
> >> ---
> >> .../commons/rng/examples/sampling/UniformSamplingVisualCheck.java | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> 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 8875934..a912791 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
> >> @@ -26,14 +26,14 @@ import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
> >>
> >> /**
> >> * Creates 2D plot of sampling output.
> >> - * It is a "manual" check that could help ensure that no artefacts
> >> + * It is a "manual" check that could help ensure that no artifacts
> > That was not a typo. ;-)
>
> Apparently 'Artefact' is the British spelling and 'Artifact' is the US
> spelling [1].
Indeed, I use British spelling. :-)
> So I do not know why my British configured IDE picked the
> original out as wrong.
>
> Anyway does commons use US spelling?
I don't know that there is such a rule.
[Why did the Americans change the spelling? ;-)]
> If so it should stay updated,
> otherwise I can revert.
Either is fine, I guess.
Regards,
Gilles
>
> https://en.oxforddictionaries.com/definition/artefact
>
> >
> >> * exist in some tiny region of the expected range, due to loss of
> >> * accuracy, e.g. when porting C code based on 32-bits "float" to
> >> * "Commons RNG" that uses Java "double" (64-bits).
> >> */
> >> public class UniformSamplingVisualCheck {
> >> /** RNG. */
> >> - private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S);
> >> + private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S_PHI);
> >> /** Samplers. */
> >> private final ContinuousSampler[] samplers = new ContinuousSampler[] {
> >> new ZigguratNormalizedGaussianSampler(rng),
> >>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [commons-rng] 02/03: Fixed typo and updated deprecated generator.
Posted by Alex Herbert <al...@gmail.com>.
On 17/05/2019 14:41, Gilles Sadowski wrote:
> Hi Alex.
>
> Le ven. 17 mai 2019 à 15:33, <ah...@apache.org> a écrit :
>> 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 5cf993a22bcedfe8c66dd9ae6536c1ee2db146ea
>> Author: aherbert <ah...@apache.org>
>> AuthorDate: Fri May 17 14:31:40 2019 +0100
>>
>> Fixed typo and updated deprecated generator.
>> ---
>> .../commons/rng/examples/sampling/UniformSamplingVisualCheck.java | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> 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 8875934..a912791 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
>> @@ -26,14 +26,14 @@ import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
>>
>> /**
>> * Creates 2D plot of sampling output.
>> - * It is a "manual" check that could help ensure that no artefacts
>> + * It is a "manual" check that could help ensure that no artifacts
> That was not a typo. ;-)
Apparently 'Artefact' is the British spelling and 'Artifact' is the US
spelling [1]. So I do not know why my British configured IDE picked the
original out as wrong.
Anyway does commons use US spelling? If so it should stay updated,
otherwise I can revert.
https://en.oxforddictionaries.com/definition/artefact
>
>> * exist in some tiny region of the expected range, due to loss of
>> * accuracy, e.g. when porting C code based on 32-bits "float" to
>> * "Commons RNG" that uses Java "double" (64-bits).
>> */
>> public class UniformSamplingVisualCheck {
>> /** RNG. */
>> - private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S);
>> + private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S_PHI);
>> /** Samplers. */
>> private final ContinuousSampler[] samplers = new ContinuousSampler[] {
>> new ZigguratNormalizedGaussianSampler(rng),
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [commons-rng] 02/03: Fixed typo and updated deprecated generator.
Posted by Alex Herbert <al...@gmail.com>.
On 17/05/2019 14:41, Gilles Sadowski wrote:
> Hi Alex.
>
> Le ven. 17 mai 2019 à 15:33, <ah...@apache.org> a écrit :
>> 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 5cf993a22bcedfe8c66dd9ae6536c1ee2db146ea
>> Author: aherbert <ah...@apache.org>
>> AuthorDate: Fri May 17 14:31:40 2019 +0100
>>
>> Fixed typo and updated deprecated generator.
>> ---
>> .../commons/rng/examples/sampling/UniformSamplingVisualCheck.java | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> 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 8875934..a912791 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
>> @@ -26,14 +26,14 @@ import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
>>
>> /**
>> * Creates 2D plot of sampling output.
>> - * It is a "manual" check that could help ensure that no artefacts
>> + * It is a "manual" check that could help ensure that no artifacts
> That was not a typo. ;-)
Sorry. I am using a British spell checker in my IDE.
I assume commons uses US English. I'll update my spell checker and revert.
>
>> * exist in some tiny region of the expected range, due to loss of
>> * accuracy, e.g. when porting C code based on 32-bits "float" to
>> * "Commons RNG" that uses Java "double" (64-bits).
>> */
>> public class UniformSamplingVisualCheck {
>> /** RNG. */
>> - private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S);
>> + private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S_PHI);
>> /** Samplers. */
>> private final ContinuousSampler[] samplers = new ContinuousSampler[] {
>> new ZigguratNormalizedGaussianSampler(rng),
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [commons-rng] 02/03: Fixed typo and updated deprecated generator.
Posted by Gilles Sadowski <gi...@gmail.com>.
Hi Alex.
Le ven. 17 mai 2019 à 15:33, <ah...@apache.org> a écrit :
>
> 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 5cf993a22bcedfe8c66dd9ae6536c1ee2db146ea
> Author: aherbert <ah...@apache.org>
> AuthorDate: Fri May 17 14:31:40 2019 +0100
>
> Fixed typo and updated deprecated generator.
> ---
> .../commons/rng/examples/sampling/UniformSamplingVisualCheck.java | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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 8875934..a912791 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
> @@ -26,14 +26,14 @@ import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
>
> /**
> * Creates 2D plot of sampling output.
> - * It is a "manual" check that could help ensure that no artefacts
> + * It is a "manual" check that could help ensure that no artifacts
That was not a typo. ;-)
> * exist in some tiny region of the expected range, due to loss of
> * accuracy, e.g. when porting C code based on 32-bits "float" to
> * "Commons RNG" that uses Java "double" (64-bits).
> */
> public class UniformSamplingVisualCheck {
> /** RNG. */
> - private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S);
> + private final UniformRandomProvider rng = RandomSource.create(RandomSource.XOR_SHIFT_1024_S_PHI);
> /** Samplers. */
> private final ContinuousSampler[] samplers = new ContinuousSampler[] {
> new ZigguratNormalizedGaussianSampler(rng),
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org