Skip to content

Commit 8851325

Browse files
committed
Cantor
1 parent f246530 commit 8851325

20 files changed

Lines changed: 779 additions & 84 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ Sequences are fun!
222222
* Start with cloning the module [NarayanaCows](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/NarayanaCows.jl)
223223
as a blueprint. Replace what is to be replaced.
224224

225-
* Execute the module 'BuildSequences' which will integrate your module into 'Sequences'.
225+
* Execute the module 'BuildSequences' which will integrate your module into 'IntegerSequences'.
226226

227227
* Send us a pull request.
228228

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name = "Sequences-docs"
1+
name = "IntegerSequences-docs"
22

33
[deps]
44
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

docs/src/developerguide.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ in a final step.
7777
All terms of all sequences have the same type. Currently this is the
7878
type fmpz as provided by the Nemo library.
7979

80-
Sequences supports the use of notation using unicode characters, especially the
81-
traditional notation used in number theory. For example we define
80+
IntegerSequences supports the use of notation using unicode characters, especially the traditional notation used in number theory. For example we define
8281
```
8382
τ(n) = Nemo.sigma(n, 0)
8483
μ(n) = Nemo.moebiusmu(n)
84+
V006171(n) = EulerTransform(τ)(n)
8585
```
8686
We also support new notations like the proposal from Knuth, Graham and
8787
Patashnik in Concrete Mathematics:
@@ -96,8 +96,7 @@ where `isPrimeTo` is defined as:
9696

9797
For example ``⊥(n, ϕ(n))`` indicates if there is just one group of order ``n``.
9898
But this is not only a concise mathematical formula, this is also valid Julia
99-
code (defined in Sequences). The predicate gives rise to the sequence of cyclic
100-
numbers, A003277 in the OEIS.
99+
code (defined in IntegerSequences). The predicate gives rise to the sequence of cyclic numbers, A003277 in the OEIS.
101100

102101
Similarly possible definitions of some sequences (not necessarily efficient ones
103102
in the computational sense) are
@@ -136,12 +135,12 @@ returned in the given order by a generating function.
136135

137136
In the OEIS, on the other hand, a sequence is an enumeration, a set with an index function where the first index (called offset o) is specified. With this we arrive at this picture:
138137

139-
``a_o, b_{o+1}, c_{o+2}, d_{o+3}, ...``
138+
``a_o, a_{o+1}, a_{o+2}, a_{o+3}, ...``
140139

141140
In this view a list (representing the initial segment of the sequence)
142141
takes the place of the iteration.
143142

144-
``[ a_{o}, b_{o+1}, c_{o+2}, ..., z_{o+n-1} ]``
143+
``[ a_{o}, a_{o+1}, a_{o+2}, ..., a_{o+n-1} ]``
145144

146145
In contrast in our setup the concept of offset and indexing does not occur at all but is transferred to the interpretation: only the application decides about indexing and offset. In practice our setup avoiding the use of an offset turns out
147146
to be more flexible.

docs/src/index.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@ BinaryIntegerLength
3737
Binomial
3838
```
3939
```@docs
40+
CantorBoustrophedonicEnumeration
41+
```
42+
```@docs
43+
CantorBoustrophedonicMachine
44+
```
45+
```@docs
46+
CantorBoustrophedonicPairing
47+
```
48+
```@docs
49+
CantorEnumeration
50+
```
51+
```@docs
52+
CantorMachine
53+
```
54+
```@docs
55+
CantorPairing
56+
```
57+
```@docs
4058
ClausenNumber
4159
```
4260
```@docs
@@ -64,6 +82,9 @@ Divides
6482
Divisors
6583
```
6684
```@docs
85+
EulerTransform
86+
```
87+
```@docs
6788
F!
6889
```
6990
```@docs
@@ -187,6 +208,15 @@ RiordanSquare
187208
RisingFactorial
188209
```
189210
```@docs
211+
RosenbergStrongBoustrophedonicEnumeration
212+
```
213+
```@docs
214+
RosenbergStrongBoustrophedonicMachine
215+
```
216+
```@docs
217+
RosenbergStrongBoustrophedonicPairing
218+
```
219+
```@docs
190220
Row
191221
```
192222
```@docs
@@ -346,6 +376,9 @@ toΔ
346376
σ
347377
```
348378
```@docs
379+
σ2
380+
```
381+
```@docs
349382
τ
350383
```
351384
```@docs
@@ -586,6 +619,9 @@ V001107
586619
V001147
587620
```
588621
```@docs
622+
V001157
623+
```
624+
```@docs
589625
V001221
590626
```
591627
```@docs
@@ -820,6 +856,12 @@ L005875
820856
L006012
821857
```
822858
```@docs
859+
L006171
860+
```
861+
```@docs
862+
V006171
863+
```
864+
```@docs
823865
L006229
824866
```
825867
```@docs
@@ -1177,6 +1219,12 @@ V061142
11771219
V061168
11781220
```
11791221
```@docs
1222+
L061256
1223+
```
1224+
```@docs
1225+
V061256
1226+
```
1227+
```@docs
11801228
L062980
11811229
```
11821230
```@docs
@@ -1339,6 +1387,12 @@ T106566
13391387
L107716
13401388
```
13411389
```@docs
1390+
L107895
1391+
```
1392+
```@docs
1393+
V107895
1394+
```
1395+
```@docs
13421396
L108624
13431397
```
13441398
```@docs
@@ -1435,6 +1489,12 @@ V181936
14351489
T184962
14361490
```
14371491
```@docs
1492+
L190905
1493+
```
1494+
```@docs
1495+
V190905
1496+
```
1497+
```@docs
14381498
F193338
14391499
```
14401500
```@docs
@@ -1546,6 +1606,12 @@ M271703
15461606
V271703
15471607
```
15481608
```@docs
1609+
L275585
1610+
```
1611+
```@docs
1612+
V275585
1613+
```
1614+
```@docs
15491615
L276285
15501616
```
15511617
```@docs
@@ -1567,6 +1633,12 @@ V295513
15671633
L319284
15681634
```
15691635
```@docs
1636+
L319514
1637+
```
1638+
```@docs
1639+
V319514
1640+
```
1641+
```@docs
15701642
T321620
15711643
```
15721644
```@docs

docs/src/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Modules
22

3-
[Abundant](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Abundant.jl)   🔶  [AndreNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/AndreNumbers.jl)   🔶  [BellNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/BellNumbers.jl)   🔶  [BernoulliNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/BernoulliNumbers.jl)   🔶  [BinaryInteger](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/BinaryInteger.jl)   🔶  [BinaryQF](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/BinaryQF.jl)   🔶  [CarmichaelNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/CarmichaelNumbers.jl)   🔶  [ClausenNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/ClausenNumbers.jl)   🔶  [CombinationsIterator](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/CombinationsIterator.jl)   🔶  [Compositions](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Compositions.jl)   🔶  [Counts](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Counts.jl)   🔶  [DedekindEta](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/DedekindEta.jl)   🔶  [Deleham](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Deleham.jl)   🔶  [Fibonacci](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Fibonacci.jl)   🔶  [FigurativeNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/FigurativeNumbers.jl)   🔶  [GaussFactorialRecords](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/GaussFactorialRecords.jl)   🔶  [GeneralizedBinomial](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/GeneralizedBinomial.jl)   🔶  [HighlyAbundant](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/HighlyAbundant.jl)   🔶  [Hyper1F1](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Hyper1F1.jl)   🔶  [JacobiTheta](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/JacobiTheta.jl)   🔶  [Kolakoski](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Kolakoski.jl)   🔶  [NarayanaCows](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/NarayanaCows.jl)   🔶  [NumberTheory](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/NumberTheory.jl)   🔶  [OEISUtils](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/OEISUtils.jl)   🔶  [OrthoPolynomials](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/OrthoPolynomials.jl)   🔶  [Partitions](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Partitions.jl)   🔶  [PrimesIterator](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/PrimesIterator.jl)   🔶  [PrimeSwingFactorial](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/PrimeSwingFactorial.jl)   🔶  [Products](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Products.jl)   🔶  [QueensProblems](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/QueensProblems.jl)   🔶  [RecordSearch](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/RecordSearch.jl)   🔶  [RiordanSquares](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/RiordanSquares.jl)   🔶  [SelfConvolutive](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SelfConvolutive.jl)   🔶  [SeqUtils](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SeqUtils.jl)   🔶  [SeriesExpansion](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SeriesExpansion.jl)   🔶  [StirlingLahNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/StirlingLahNumbers.jl)   🔶  [SwingFactorial](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SwingFactorial.jl)   🔶  [S_INDEX](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/S_INDEX.jl)   🔶  [Triangles](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Triangles.jl)   🔶  [UlamNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/UlamNumbers.jl)   🔶  [ZumkellerNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/ZumkellerNumbers.jl)   🔶  
3+
[Abundant](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Abundant.jl)   🔶  [AndreNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/AndreNumbers.jl)   🔶  [BellNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/BellNumbers.jl)   🔶  [BernoulliNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/BernoulliNumbers.jl)   🔶  [BinaryInteger](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/BinaryInteger.jl)   🔶  [BinaryQF](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/BinaryQF.jl)   🔶  [CantorMachines](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/CantorMachines.jl)   🔶  [CarmichaelNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/CarmichaelNumbers.jl)   🔶  [ClausenNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/ClausenNumbers.jl)   🔶  [CombinationsIterator](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/CombinationsIterator.jl)   🔶  [Compositions](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Compositions.jl)   🔶  [Counts](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Counts.jl)   🔶  [DedekindEta](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/DedekindEta.jl)   🔶  [DelehamDelta](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/DelehamDelta.jl)   🔶  [EulerTransforms](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/EulerTransforms.jl)   🔶  [Fibonacci](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Fibonacci.jl)   🔶  [FigurativeNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/FigurativeNumbers.jl)   🔶  [GaussFactorialRecords](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/GaussFactorialRecords.jl)   🔶  [GeneralizedBinomial](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/GeneralizedBinomial.jl)   🔶  [HighlyAbundant](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/HighlyAbundant.jl)   🔶  [Hyper1F1](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Hyper1F1.jl)   🔶  [JacobiTheta](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/JacobiTheta.jl)   🔶  [Kolakoski](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Kolakoski.jl)   🔶  [NarayanaCows](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/NarayanaCows.jl)   🔶  [NumberTheory](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/NumberTheory.jl)   🔶  [OEISUtils](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/OEISUtils.jl)   🔶  [OrthoPolynomials](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/OrthoPolynomials.jl)   🔶  [Partitions](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Partitions.jl)   🔶  [PrimesIterator](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/PrimesIterator.jl)   🔶  [PrimeSwingFactorial](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/PrimeSwingFactorial.jl)   🔶  [Products](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Products.jl)   🔶  [QueensProblems](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/QueensProblems.jl)   🔶  [RecordSearch](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/RecordSearch.jl)   🔶  [RiordanSquares](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/RiordanSquares.jl)   🔶  [SelfConvolutive](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SelfConvolutive.jl)   🔶  [SeqUtils](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SeqUtils.jl)   🔶  [SeriesExpansion](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SeriesExpansion.jl)   🔶  [StirlingLahNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/StirlingLahNumbers.jl)   🔶  [SwingFactorial](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SwingFactorial.jl)   🔶  [Triangles](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/Triangles.jl)   🔶  [UlamNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/UlamNumbers.jl)   🔶  [ZumkellerNumbers](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/ZumkellerNumbers.jl)   🔶  

docs/src/useofoeis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ We emphasize that references to the Online Encyclopedia of Integer Sequences alw
44

55
There is a variety of reasons to deviate occasionally from the definitions used in the OEIS.
66

7-
* Many sequences there are frozen by the editor in chief for so-called 'historical reasons' (for example because they were published in this form in printed versions of the encyclopedia).
7+
* Many sequences there are frozen by the editor in chief for so-called 'historical reasons' (for example because they were published in this form in printed versions of the encyclopedia or referenced in scientific papers).
88

99
* Conventions in the OEIS are used that made more sense in times of punch cards than today, for example the suppression of 0's in many series expansions.
1010

src/AndreNumbers.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ export André, C000111, V000111, V178963, V178964, V181936, V250283
2020
Return the generalized André numbers which are the ``m``-alternating permutations of length ``n``, cf. A181937.
2121
"""
2222
function André(m::Int, n::Int)
23-
if haskey(CacheAndré, (m, n))
24-
return CacheAndré[(m, n)]
25-
end
23+
haskey(CacheAndré, (m, n)) && return CacheAndré[(m, n)]
2624
n 0 && return fmpz(1)
2725
r = range(0, step=m, stop=n-1)
2826
S = sum(binom(n, k) * André(m, k) for k in r)

src/BellNumbers.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ The Bell transform transforms an integer sequence into an integer triangle; also
105105
Let ``F`` be an integer sequence generating function, then ``B_{n,k}(F) = \\sum_{m=1}^{n-k+1} \\binom{n-1}{m-1} F(m) B_{n-m,k-1}(F)`` where ``B_{0,0} = 1, B_{n,0} = 0`` for ``n≥1, B_{0,k} = 0`` for ``k≥1``.
106106
"""
107107
function BellTrans(n::Int, k::Int, F::Function)
108-
if haskey(CacheBellF, (n, k, F))
109-
return CacheBellF[(n, k, F)]
110-
end
108+
haskey(CacheBellF, (n, k, F)) && return CacheBellF[(n, k, F)]
111109
a = fmpz(1); s = fmpz(0)
112110

113111
if (n == 0) && (k == 0) return a end

src/BuildSequences.jl

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,35 @@
1212
(@__DIR__) LOAD_PATH && push!(LOAD_PATH, (@__DIR__))
1313

1414
module BuildSequences
15-
using Dates
16-
using UUIDs
15+
using Dates, UUIDs
1716
export build_all
1817

1918
cloudpath = "https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/"
2019

21-
srcdir = realpath(joinpath(dirname(@__FILE__)))
22-
pkgdir = dirname(srcdir)
20+
#srcdir = realpath(joinpath(dirname(@__FILE__)))
21+
#pkgdir = dirname(srcdir)
22+
#docdir = joinpath(pkgdir, "docs")
23+
#docsrcdir = joinpath(docdir, "src")
24+
#tstdir = joinpath(pkgdir, "test")
25+
26+
pkgdir = dirname((@__DIR__))
27+
@info("Package directory is: " * pkgdir)
28+
29+
srcdir = dirname((@__FILE__))
30+
cd(srcdir)
31+
@info("Working directory is: " * pwd())
32+
2333
docdir = joinpath(pkgdir, "docs")
34+
@info("Docs directory is: " * docdir)
35+
2436
docsrcdir = joinpath(docdir, "src")
37+
@info("Docs sources are in: " * docsrcdir)
38+
2539
tstdir = joinpath(pkgdir, "test")
40+
@info("Test files are in: " * tstdir)
2641

27-
exclude = ["BuildSequences.jl", "IntegerSequences.jl", "SeqTests.jl", "_EXPORT.jl", "_TEMP.jl", "_INDEX.jl", "S_Index.jl"]
42+
exclude = ["BuildSequences.jl", "IntegerSequences.jl", "SeqTests.jl",
43+
"_EXPORT.jl", "_TEMP.jl", "_INDEX.jl", "_SINDEX.jl", "_IS.jl", "tempCodeRunnerFile.jl"]
2844

2945
function header(f)
3046
println(f, "# This file is part of IntegerSequences.")
@@ -42,7 +58,7 @@ end
4258
function sortnames()
4359

4460
index = open("_INDEX.jl", "r")
45-
sindex = open("S_INDEX.jl", "w")
61+
sindex = open("_SINDEX.jl", "w")
4662

4763
dict = Dict{Int64, Array{String}}()
4864

@@ -185,8 +201,8 @@ function build_seq(docdefs)
185201
sortnames()
186202

187203
tmp = open("_TEMP.jl", "r")
188-
sor = open("S_INDEX.jl", "r")
189-
target = joinpath(srcdir, "_IntegerSequences.jl")
204+
sor = open("_SINDEX.jl", "r")
205+
target = joinpath(srcdir, "_IS.jl")
190206
olm = open(target, "w")
191207
header(olm)
192208
println(olm, "__precompile__()")
@@ -197,8 +213,7 @@ function build_seq(docdefs)
197213
for l in eachline(sor, keep=true)
198214
print(olm, l)
199215
end
200-
println("ROOTDIR name:")
201-
println(dirname(realpath(joinpath(dirname(@__FILE__)))))
216+
202217
for l in eachline(tmp, keep=true) print(olm, l) end
203218
print(olm, "end")
204219

@@ -341,7 +356,7 @@ end
341356
function make_index()
342357
path = joinpath(docsrcdir, "index.md")
343358
ind = open(path, "w")
344-
tind = open("S_INDEX.jl", "r")
359+
tind = open("_SINDEX.jl", "r")
345360

346361
first = true
347362
for l in eachline(tind, keep=false)
@@ -382,6 +397,7 @@ function make_modules()
382397
close(ind)
383398
end
384399

400+
385401
function nextline(srcfile)
386402

387403
while !eof(srcfile)
@@ -414,7 +430,7 @@ function addsig(srcfile, docfile)
414430
n = nextline(srcfile)
415431
n == nothing && return
416432
end
417-
433+
418434
println(docfile, "\$(SIGNATURES)")
419435
println(docfile, n)
420436
end
@@ -423,32 +439,32 @@ end
423439

424440
function addsignature()
425441

426-
docdir = realpath(joinpath(dirname(@__FILE__)))
427-
pkgdir = dirname(docdir)
428-
srcdir = joinpath(pkgdir, "src")
429-
srcfile = open(joinpath(srcdir, "_IntegerSequences.jl"), "r")
430-
docfile = open(joinpath(docdir, "IntegerSequences.jl"), "w")
442+
srcdir = dirname(@__FILE__)
443+
srcfile = open(joinpath(srcdir, "_IS.jl"), "r")
444+
profile = open(joinpath(srcdir, "IntegerSequences.jl"), "w")
431445

432-
addsig(srcfile, docfile)
446+
addsig(srcfile, profile)
433447

434448
close(srcfile)
435-
close(docfile)
436-
rm("_IntegerSequences.jl")
449+
close(profile)
437450
end
438451

452+
439453
function build_all(docdefs=false)
454+
440455
build_seq(docdefs)
441456
addsignature()
442-
443457
build_test()
444458
build_perf()
445459
make_index()
460+
446461
make_modules()
447462

448-
rm("_TEMP.jl")
449463
rm("_EXPORT.jl")
450464
rm("_INDEX.jl")
451-
rm("S_INDEX.jl")
465+
rm("_IS.jl")
466+
rm("_SINDEX.jl")
467+
rm("_TEMP.jl")
452468
end
453469

454470
build_all()

0 commit comments

Comments
 (0)