numo-random 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +3 -1
- data/ext/numo/random/ext.cpp +1 -1
- data/ext/numo/random/ext.hpp +1 -1
- data/ext/numo/random/extconf.rb +18 -1
- data/lib/numo/random/version.rb +1 -1
- metadata +9 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1eeb10dc61a62c47df25d130d2974ad137b4ea580daac0eb49f6fe33cf0aa66e
|
4
|
+
data.tar.gz: a4c77b7d71ab7798c2c2fa142d272ea7e1e9f352c30cf11b8e397edc92b793e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb111e599ed0c0c4bedc2beb10fa0b89456622d6e6d3e61cb698cf6a3ba5771c6e1c4b47b18ce87ea4c51b6bcb4471f03897a9b77cc6c5cf5ecdd84378150a86
|
7
|
+
data.tar.gz: c19b5fb6c238762c462f659c078071ca90af8a17acc728c4c874cda52c2528ba1563830e63f03e8ae0cd25cbe0acb80b31ee0f84beadfe746240dd6e087a0d8b
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
+
## [[0.6.0](https://github.com/yoshoku/numo-random/compare/v0.5.1...v0.6.0)] - 2025-10-01
|
2
|
+
|
3
|
+
**Breaking change**
|
4
|
+
|
5
|
+
- Change dependency from numo-narray to [numo-narray-alt](https://github.com/yoshoku/numo-narray-alt).
|
6
|
+
|
7
|
+
## [0.5.1]
|
8
|
+
|
9
|
+
- Fix build failure with Xcode 14 and Ruby 3.1.x.
|
10
|
+
|
1
11
|
## [0.5.0]
|
12
|
+
|
2
13
|
- Support 32-bit PCG and Mersenne Twister.
|
3
14
|
|
4
15
|
```ruby
|
@@ -12,17 +23,22 @@ rng = Numo::Random::Generator.new(algorithm: 'mt64')
|
|
12
23
|
```
|
13
24
|
|
14
25
|
## [0.4.0]
|
26
|
+
|
15
27
|
- Add method for random number generation with bernoulli distribution: bernoulli, binomial, negative_binomial, and geometric.
|
16
28
|
|
17
29
|
## [0.3.0]
|
30
|
+
|
18
31
|
- Change native extension filename.
|
19
32
|
- Add methods for random number generation with poisson distributions: poisson, exponential, gamma, gumbel, and weibull.
|
20
33
|
|
21
34
|
## [0.2.0]
|
35
|
+
|
22
36
|
- Add discrete method.
|
23
37
|
|
24
38
|
### Breaking Changes
|
39
|
+
|
25
40
|
- Change to return array for all methods that fill array with random numbers in Generator class.
|
26
41
|
|
27
42
|
## [0.1.0]
|
43
|
+
|
28
44
|
- Initial release.
|
data/README.md
CHANGED
@@ -3,10 +3,12 @@
|
|
3
3
|
[](https://github.com/yoshoku/numo-random/actions/workflows/main.yml)
|
4
4
|
[](https://badge.fury.io/rb/numo-random)
|
5
5
|
[](https://github.com/yoshoku/numo-random/blob/main/LICENSE.txt)
|
6
|
-
[](https://
|
6
|
+
[](https://gemdocs.org/gems/numo-random/)
|
7
7
|
|
8
8
|
Numo::Random provides random number generation with several distributions for Numo::NArray.
|
9
9
|
|
10
|
+
Note: Since v0.6.0, this gem uses [Numo::NArray Alternative](https://github.com/yoshoku/numo-narray-alt) instead of Numo::NArray as a dependency.
|
11
|
+
|
10
12
|
## Installation
|
11
13
|
|
12
14
|
Add this line to your application's Gemfile:
|
data/ext/numo/random/ext.cpp
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* Numo::Random provides random number generation with several distributions for Numo::NArray.
|
3
3
|
*
|
4
|
-
* Copyright (c) 2022 Atsushi Tatsuma
|
4
|
+
* Copyright (c) 2022-2025 Atsushi Tatsuma
|
5
5
|
*
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
* you may not use this file except in compliance with the License.
|
data/ext/numo/random/ext.hpp
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* Numo::Random provides random number generation with several distributions for Numo::NArray.
|
3
3
|
*
|
4
|
-
* Copyright (c) 2022 Atsushi Tatsuma
|
4
|
+
* Copyright (c) 2022-2025 Atsushi Tatsuma
|
5
5
|
*
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
* you may not use this file except in compliance with the License.
|
data/ext/numo/random/extconf.rb
CHANGED
@@ -20,10 +20,27 @@ if RUBY_PLATFORM =~ /mswin|cygwin|mingw/
|
|
20
20
|
abort "libnarray.a not found." unless have_library("narray", "nary_new")
|
21
21
|
end
|
22
22
|
|
23
|
-
|
23
|
+
have_libcpp = false
|
24
|
+
if RUBY_PLATFORM.include?('darwin')
|
25
|
+
if have_library('c++')
|
26
|
+
have_libcpp = true
|
27
|
+
else
|
28
|
+
warn 'libc++ is not found.'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
if !have_libcpp && !RUBY_PLATFORM.include?('mswin')
|
33
|
+
warn 'libstdc++ is not found.' unless have_library('stdc++')
|
34
|
+
end
|
24
35
|
|
25
36
|
$CXXFLAGS << " -std=c++11"
|
26
37
|
$INCFLAGS << " -I$(srcdir)/src"
|
27
38
|
$VPATH << "$(srcdir)/src"
|
28
39
|
|
40
|
+
if RUBY_PLATFORM.match?(/darwin/) && Gem::Version.new('3.1.0') <= Gem::Version.new(RUBY_VERSION)
|
41
|
+
if try_link('int main(void){return 0;}', '-Wl,-undefined,dynamic_lookup')
|
42
|
+
$LDFLAGS << ' -Wl,-undefined,dynamic_lookup'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
29
46
|
create_makefile("numo/random/ext")
|
data/lib/numo/random/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numo-random
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: numo-narray
|
13
|
+
name: numo-narray-alt
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- - "
|
16
|
+
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.9.
|
18
|
+
version: 0.9.3
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
|
-
- - "
|
23
|
+
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.9.
|
25
|
+
version: 0.9.3
|
27
26
|
description: Numo::Random provides random number generation with several distributions
|
28
27
|
for Numo::NArray.
|
29
28
|
email:
|
@@ -54,9 +53,8 @@ metadata:
|
|
54
53
|
homepage_uri: https://github.com/yoshoku/numo-random
|
55
54
|
source_code_uri: https://github.com/yoshoku/numo-random
|
56
55
|
changelog_uri: https://github.com/yoshoku/numo-random/blob/main/CHANGELOG.md
|
57
|
-
documentation_uri: https://
|
56
|
+
documentation_uri: https://gemdocs.org/gems/numo-random/0.6.0/
|
58
57
|
rubygems_mfa_required: 'true'
|
59
|
-
post_install_message:
|
60
58
|
rdoc_options: []
|
61
59
|
require_paths:
|
62
60
|
- lib
|
@@ -71,8 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
69
|
- !ruby/object:Gem::Version
|
72
70
|
version: '0'
|
73
71
|
requirements: []
|
74
|
-
rubygems_version: 3.
|
75
|
-
signing_key:
|
72
|
+
rubygems_version: 3.6.9
|
76
73
|
specification_version: 4
|
77
74
|
summary: Numo::Random provides random number generation with several distributions
|
78
75
|
for Numo::NArray.
|