number-wall 0.1.0.0 → 0.1.0.1
raw patch · 3 files changed
+25/−9 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- number-wall.cabal +7/−6
- src/NumberWall.hs +13/−3
CHANGELOG.md view
@@ -3,3 +3,8 @@ ## 0.1.0.0 -- 2022-9-3 * First version. Released on an unsuspecting world.++## 0.1.0.1 -- 2022-9-3++* Added example usage to documentation.+* Fixed image and math in description.
number-wall.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: number-wall-version: 0.1.0.0+version: 0.1.0.1 author: Owen Bechtel maintainer: ombspring@gmail.com @@ -13,8 +13,9 @@ Number walls can be defined in terms of determinants, but can also be calculated using a recursive algorithm. .- Formally, let \( R \) be an integral domain. The number wall of a sequence- \( S : \mathbb{Z} \to R \) is an infinite grid of numbers \( W \), defined as follows:+ Formally, let \( R \) be an integral domain. The number wall of a+ sequence \( S : \mathbb{Z} \to R \) is an infinite grid of+ numbers \( W \), defined as follows: . \[ W(x, y) = \begin{cases}@@ -34,14 +35,14 @@ \end{vmatrix} \] .- The values in any number wall satisfy the relation- \( W(x, y - 1) W(x, y + 1) + W(x - 1, y) W(x + 1, y) = W(x, y)^2 \),+ The values in any number wall satisfy the+ relation \( W(x, y - 1) W(x, y + 1) + W(x - 1, y) W(x + 1, y) = W(x, y)^2 \), and some other more complicated relations. You can use these to define a recursive algorithm for generating number walls. . Here are some cool images created using the functions in this package: .- +  . See [this video](https://www.youtube.com/watch?v=NO1_-qptr6c) for more information and fun facts.
src/NumberWall.hs view
@@ -2,6 +2,16 @@ Module: NumberWall Copyright: (c) Owen Bechtel, 2022 License: MIT++Example usage:++@+wall = numberWall (pagoda :: Int -> Mod 2)+color x = case unMod x of+ 0 -> (181, 118, 46)+ 1 -> (0, 0, 0)+saveImage "pagoda.png" color (0, 256) (0, 128) wall+@ -} {-# LANGUAGE BlockArguments #-}@@ -119,7 +129,7 @@ | otherwise = Just col {-|-The pagoda sequence ([A301849](https://oeis.org/A301849)).+The pagoda sequence (​[A301849](https://oeis.org/A301849)). In mod 2, its number wall is a self-similar fractal. In mod 3 and mod 7, all zeros in its number wall are isolated. -}@@ -133,7 +143,7 @@ | otherwise = one {-|-The Fredholm-Rueppel sequence ([A036987](https://oeis.org/A036987)).+The Fredholm-Rueppel sequence (​[A036987](https://oeis.org/A036987)). @rueppel n@ evaluates to 1 if n + 1 is a power of 2, and 0 otherwise. Its number wall contains zero-windows of exponentially increasing size, and an infinite diagonal line of ones.@@ -148,7 +158,7 @@ data Alpha = A | B | C | D | E | F {-|-([A039974](https://oeis.org/A039974)). The mod-3 number wall of this sequence+(​[A039974](https://oeis.org/A039974)). The mod-3 number wall of this sequence has an infinite central region with no zeros. -} ternary :: Ring a => Int -> a