Patent val/Properties: Difference between revisions
m Clarify |
|||
Line 46: | Line 46: | ||
== Application == | == Application == | ||
Given a finite prime limit, the above properties offer a way to iterate through all GPVs. | Given a finite prime limit, the above properties offer a way to iterate through all GPVs. To roll forwards: | ||
# Enter a GPV. Set ''i'' = 1. | # Enter a GPV. Set ''i'' = 1. | ||
Line 53: | Line 53: | ||
# If it is, return it and back to step 1; otherwise, increment ''i'' by 1 and back to step 2. | # If it is, return it and back to step 1; otherwise, increment ''i'' by 1 and back to step 2. | ||
Notice that the all-zero val is a GPV, you can always enter it for the first one. It is guaranteed that you can iterate through all GPVs in this method. In practice it is | To roll backwards: | ||
# Enter a GPV. Set ''i'' = 1. | |||
# Copy the input and decrement its ''i''-th entry by 1. | |||
# Test if it is a GPV. | |||
# If it is, return it and back to step 1; otherwise, increment ''i'' by 1 and back to step 2. | |||
Notice that the all-zero val is a GPV, you can always enter it for the first one. It is guaranteed that you can iterate through all GPVs in this method. In practice it is recommended to start with the last entry and going backwards in step 2 for better performance, because the largest prime is most likely to increment. | |||
[[Category:Regular temperament theory]] | [[Category:Regular temperament theory]] | ||
[[Category:Math]] | [[Category:Math]] | ||
[[Category:Val]] | [[Category:Val]] |