figurate_numbers 1.5.0 → 1.5.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a286c4ec17f817140054ae0c0b0aba3b3b7f8a47204fb4813eba687f6e1cba15
4
- data.tar.gz: 85f689294ce5b0e7fc30a06ba001cb7dda5d8fb70bbcfa92e5e5ecc249540607
3
+ metadata.gz: a7a822512082d91f884661e175847a905a585b6af6750582c754fa4a5549089c
4
+ data.tar.gz: ec4c00057331c5a9245449b8cf3be4720f24efc33cecffc0e6481679e94f5e8f
5
5
  SHA512:
6
- metadata.gz: c9ca9a1809ea6760cf8e2d6bcfead0eabc270bcfc2678e8c891921376514405d32d59e90a1187b4143e983f865765d9cfe258df736b93630189dbd695fabea1e
7
- data.tar.gz: bacbbc4997f8da85f48962149a9b118bd1f857843c41d0a43e085560540ac4770b3ed10439758e7214e14007643bd05ac7a919d3fcfe58c9d668e610e584c91c
6
+ metadata.gz: 07bf6918972beb76ec51764b5af47a3867edc33a57d0a17bad0ec4ae5a5f3bba1889ded68a105694a8ce9f4b11186c5587b1c88454a22dac1e4860e8e1ff0a6d
7
+ data.tar.gz: 4961e1cfc94f934331d2d46a4430a85c36d25ae892394446c857e605ee1004e78767b0b814b6a6348e547cce59cf0fdb758d1b40a68a890a8ba4572b4dffc645
data/README.md ADDED
@@ -0,0 +1,100 @@
1
+ <h1 align="center"> Figurate Numbers </h1>
2
+
3
+ **Figurate Numbers** is the most comprehensive and specialized library for figurate numbers, developed in Ruby to date.
4
+ It implements **241 infinite number sequences** inspired by the groundbreaking work [*Figurate Numbers*](https://books.google.com.pe/books/about/Figurate_Numbers.html?id=ERS7CgAAQBAJ&redir_esc=y) by Elena Deza and Michel Deza, published in 2012.
5
+
6
+ <p align="center">
7
+ <img src="https://img.shields.io/gem/v/figurate_numbers" alt="Gem Version">
8
+ <img src="https://img.shields.io/gem/dt/figurate_numbers" alt="Gem Total Downloads">
9
+ <img src="https://img.shields.io/github/stars/edelveart/figurate_numbers" alt="GitHub Repo stars">
10
+ <img src="https://img.shields.io/github/license/edelveart/figurate_numbers" alt="GitHub License">
11
+ </p>
12
+
13
+ [![figurate numbers image](https://raw.githubusercontent.com/edelveart/figurate_numbers/main/figurate_numbers.png)](https://rubygems.org/gems/figurate_numbers)
14
+
15
+
16
+ ## 💎 Installation
17
+
18
+ Install it from the gem repository:
19
+
20
+ ```rb
21
+ gem install figurate_numbers
22
+ ```
23
+
24
+ ## 🧊 Features
25
+
26
+ Figurate Numbers implements 241 infinite sequences using the Enumerator class in Ruby, each categorized by its geometric dimension. It is ideal for use in mathematical modeling, algorithmic composition, and integration with tools like Sonic Pi.
27
+
28
+ The sequences are organized following the structure of the *Figurate Numbers* book:
29
+
30
+ - 🟦 **PlaneFigurateNumbers**: 79 sequences (2D)
31
+ - 🟥 **SpaceFigurateNumbers**: 86 sequences (3D)
32
+ - 🟨 **MultiDimensionalFigurateNumbers**: 70 sequences (4D and beyond)
33
+ - 🧬 **Zoo of figurate-related numbers**: 6 additional sequences *(included in the MultiDimensional module)*
34
+ - ⚙️ **ArithTransform**: p-adic transformations and other arithmetic operations
35
+
36
+
37
+ ## 🧰 How to use in Ruby
38
+
39
+ ### Version 1.5.0
40
+
41
+ ```rb
42
+ require 'figurate_numbers'
43
+
44
+ ## Using take(integer)
45
+ FigurateNumbers.pentatope.take(10)
46
+
47
+ ## Storing and iterating
48
+ f = FigurateNumbers.centered_octagonal_pyramid
49
+ f.next
50
+ f.next
51
+ f.next
52
+ ```
53
+ Starting from version **1.5.0**, `figurate_numbers` not only supports global access via `FigurateNumbers` and the use of specific classes for separate access, but also introduces new p-adic transformations and other mathematical operations that can be applied directly to sequences.
54
+
55
+ ```rb
56
+ PlaneFigurateNumbers.polygonal(19)
57
+ SpaceFigurateNumbers.rhombic_dodecahedral
58
+ MultiDimensionalFigurateNumbers.six_dimensional_hyperoctahedron
59
+ seq = MultiDimensionalFigurateNumbers.five_dimensional_hypercube.take(15)
60
+ ArithTransform.ring_padic_val(seq, 3)
61
+ ```
62
+ > 📚 Explore the detailed list of figurate numbers and arithmetic transformations [here 🔍.](https://github.com/edelveart/figurate_numbers/blob/main/docs/METHODS.md)
63
+
64
+ ## 🎶 How to use in Sonic Pi
65
+
66
+ Simply copy the entry point path from the `lib/figurate_numbers.rb` file where the *gem* is installed.
67
+
68
+ ```rb
69
+ require "<PATH>"
70
+
71
+ pol_num = FigurateNumbers.polygonal(8)
72
+ 350.times do
73
+ play pol_num.next % 12 * 7 # Some mathematical function or transformation
74
+ sleep 0.125
75
+ end
76
+
77
+ amp_seq = SpaceFigurateNumbers.centered_hendecagonal_pyramidal
78
+ 100.times do
79
+ sample :bd_sone, amp: ArithTransform.padic_norm(amp_seq.next, 3) # p-adic amplitude control
80
+ sleep 0.25
81
+ end
82
+ ```
83
+
84
+ ### Version 1.3.0 (legacy)
85
+
86
+ The main change introduced after version **1.3.0** is that you must now import the file using **require** instead of **run_file**; otherwise, it will not function.
87
+
88
+ See discussion in the [**Sonic Pi community thread right here!**](https://in-thread.sonic-pi.net/t/figurate-numbers-for-sonic-pi-new-ruby-gem-for-infinite-number-sequences-and-patterns/8962)
89
+
90
+ ## 📚 List of Sequences in `figurate_numbers` and Arithmetic Transformations Methods
91
+
92
+ Explore the complete list of figurate number sequences:
93
+
94
+ - [View all implemented methods and sequences 🔍](https://github.com/edelveart/figurate_numbers/blob/main/docs/METHODS.md)
95
+
96
+ ## 📝 Book Errata
97
+
98
+ Corrections to formulas and data found in *Figurate Numbers* (2012):
99
+
100
+ - [See full list of known errata 🔍](https://github.com/edelveart/figurate_numbers/blob/main/docs/ERRATA.md)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FigurateNumbers
4
- VERSION = '1.5.0'
4
+ VERSION = '1.5.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: figurate_numbers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgar Armando Delgado Vega
@@ -18,11 +18,13 @@ email:
18
18
  executables: []
19
19
  extensions: []
20
20
  extra_rdoc_files:
21
- - "./LICENSE"
21
+ - LICENSE
22
+ - README.md
22
23
  - docs/ERRATA.md
23
24
  - docs/METHODS.md
24
25
  files:
25
- - "./LICENSE"
26
+ - LICENSE
27
+ - README.md
26
28
  - docs/ERRATA.md
27
29
  - docs/METHODS.md
28
30
  - lib/figurate_numbers.rb
@@ -38,7 +40,7 @@ homepage: https://github.com/edelveart/figurate_numbers
38
40
  licenses:
39
41
  - MIT
40
42
  metadata:
41
- documentation_uri: https://www.rubydoc.info/gems/figurate_numbers/
43
+ documentation_uri: https://www.rubydoc.info/gems/figurate_numbers/1.5.2
42
44
  source_code_uri: https://github.com/edelveart/figurate_numbers/
43
45
  homepage_uri: https://github.com/edelveart/figurate_numbers
44
46
  rdoc_options: