figurate_numbers 1.1.0 → 1.2.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -4
  3. data/lib/figurate_numbers.rb +46 -0
  4. metadata +10 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7085cfc533bef2883851cae4cf8cece1bbbc85cac5d3c16a9a56001abad29f79
4
- data.tar.gz: e49e4db8395eb0c49b9f217d47f14ec5ca4097926f0c2542938f63727b696a82
3
+ metadata.gz: a5641cd56367a1aeafe786f318638aec399ee4d19370ab1438495c5cad50192d
4
+ data.tar.gz: 5c3ced655af6fea90399cc5c233780b70a215d704c876acaef9f5dca54508dba
5
5
  SHA512:
6
- metadata.gz: 0135ee29332aa3e667d1e084d23b6053c0a84901ed2c8278782958d6aed0f4c3f3b2b657525f3fc0fc2b8aca9480f5cb398c8283b04acd22fd0f3830ae0f5a4d
7
- data.tar.gz: d5711e1c67b696e46db5947df721ccb8d56bba6ed4f726c8d87189d66171b0ab6061909430b0dfd52a8f6df0e9b47a85411396290d5329160595767ac47d32bd
6
+ metadata.gz: 0b5d5c83119c203b0f0fcee6e47ac52b2b1cd4f43cf9518626237e535f6c08f7644021533b0f917d79863416f8fe98665b331445453c185ec3fe935b9fac1b1b
7
+ data.tar.gz: '095f5efba3092a8e0168629950742620014a366bbbddc385e55e23c83e1b7dc3388cc03026af15ca66103d1d56acaa1c87fcb90521f014d6e4b62fe173059049'
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/figurate_numbers.svg)](https://badge.fury.io/rb/figurate_numbers)
4
4
 
5
- `figurate_numbers` is a Ruby module that implements `234 infinite number sequences` based on the formulas from the wonderful book
5
+ `figurate_numbers` is a Ruby module that implements `239 infinite number sequences` based on the formulas from the wonderful book
6
6
  > [Figurate Numbers (2012)](https://books.google.com.pe/books/about/Figurate_Numbers.html?id=ERS7CgAAQBAJ&redir_esc=y) by Elena Deza and Michel Deza.
7
7
 
8
8
  This implementation uses the **Enumerator class** to deal with **INFINITE SEQUENCES**.
@@ -10,11 +10,11 @@ This implementation uses the **Enumerator class** to deal with **INFINITE SEQUEN
10
10
  Following the order of the book, the methods are divided into 3 types according to the spatial dimension (see complete list below):
11
11
 
12
12
  1. **Plane** figurate numbers implemented = `79`
13
- 2. **Space** figurate numbers implemented = `81`
13
+ 2. **Space** figurate numbers implemented = `86`
14
14
  3. **Multidimensional** figurate numbers implemented = `68`
15
15
  4. **Zoo of figurate-related numbers** implemented = `6`
16
16
 
17
- - [x] **TOTAL** = `234` infinite sequences of figurate numbers implemented
17
+ - [x] **TOTAL** = `239` infinite sequences of figurate numbers implemented
18
18
 
19
19
  ## Installation and use
20
20
 
@@ -170,7 +170,13 @@ end
170
170
  <li><code>icosinonagonal_pyramidal_numbers</code></li>
171
171
  <li><code>triacontagonal_pyramidal_numbers</code></li>
172
172
 
173
- <li><code>cubic_numbers != hex_pyramidal_numbers (equality only by quantity) </code></li>
173
+ <li><code>triangular_tetrahedral_numbers [finite]</code></li>
174
+ <li><code>triangular_square_pyramidal_numbers [finite]</code></li>
175
+ <li><code>square_tetrahedral_numbers [finite]</code></li>
176
+ <li><code>square_square_pyramidal_numbers [finite]</code></li>
177
+ <li><code>tetrahedral_square_pyramidal_number [finite]</code></li>
178
+
179
+ <li><code>cubic_numbers = perfect_cube_numbers != hex_pyramidal_numbers (equality only by quantity) </code></li>
174
180
  <li><code>tetrahedral_numbers</code></li>
175
181
  <li><code>octahedral_numbers</code></li>
176
182
  <li><code>dodecahedral_numbers</code></li>
@@ -865,6 +865,50 @@ module FigurateNumbers
865
865
  end
866
866
  end
867
867
 
868
+ def triangular_tetrahedral_numbers
869
+ Enumerator.new do |y|
870
+ finite_set = [1, 10, 120, 1540, 7140]
871
+ (finite_set).each do |delta|
872
+ y << delta
873
+ end
874
+ end
875
+ end
876
+
877
+ def triangular_square_pyramidal_numbers
878
+ Enumerator.new do |y|
879
+ finite_set = [1, 55, 91, 208335]
880
+ (finite_set).each do |delta|
881
+ y << delta
882
+ end
883
+ end
884
+ end
885
+
886
+ def square_tetrahedral_numbers
887
+ Enumerator.new do |y|
888
+ finite_set = [1, 4, 19600]
889
+ (finite_set).each do |delta|
890
+ y << delta
891
+ end
892
+ end
893
+ end
894
+
895
+ def square_square_pyramidal_numbers
896
+ Enumerator.new do |y|
897
+ finite_set = [1, 4900]
898
+ (finite_set).each do |delta|
899
+ y << delta
900
+ end
901
+ end
902
+ end
903
+
904
+ def tetrahedral_square_pyramidal_number
905
+ Enumerator.new do |y|
906
+ finite_set = [1]
907
+ (finite_set).each do |delta|
908
+ y << delta
909
+ end
910
+ end
911
+ end
868
912
 
869
913
  def cubic_numbers
870
914
  Enumerator.new do |y|
@@ -874,6 +918,8 @@ module FigurateNumbers
874
918
  end
875
919
  end
876
920
 
921
+ alias_method :perfect_cube_numbers, :cubic_numbers
922
+
877
923
  def tetrahedral_numbers
878
924
  Enumerator.new do |y|
879
925
  (1..Float::INFINITY).each do |delta|
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.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgar Armando Delgado Vega
@@ -10,7 +10,7 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Generates 234 infinite sequences of plane, space, and multidimensional
13
+ description: Generates 239 infinite sequences of plane, space, and multidimensional
14
14
  figurate numbers based on the book ‘Figurate Numbers’ (2012) by Elena Deza and Michel
15
15
  Deza. The methods are implemented using the Enumerator class and are designed for
16
16
  use in your math projects or in Sonic Pi.
@@ -28,9 +28,15 @@ licenses:
28
28
  - MIT
29
29
  metadata:
30
30
  documentation_uri: https://www.rubydoc.info/gems/figurate_numbers
31
+ source_code_uri: https://github.com/edelveart/figurate_numbers_sonic_pi
31
32
  homepage_uri: https://github.com/edelveart/figurate_numbers_sonic_pi
32
33
  post_install_message:
33
- rdoc_options: []
34
+ rdoc_options:
35
+ - "--main"
36
+ - README.md
37
+ - "--line-numbers"
38
+ - "--inline-source"
39
+ - "--quiet"
34
40
  require_paths:
35
41
  - lib
36
42
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -47,6 +53,6 @@ requirements: []
47
53
  rubygems_version: 3.3.7
48
54
  signing_key:
49
55
  specification_version: 4
50
- summary: Generates 234 infinite sequences of plane, space, and multidimensional figurate
56
+ summary: Generates 239 infinite sequences of plane, space, and multidimensional figurate
51
57
  numbers based on the book ‘Figurate Numbers’ (2012) by Elena Deza and Michel Deza.
52
58
  test_files: []