diff --git a/.gitignore b/.gitignore index d9e1fc1..13829b9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ actual/ *.log *.so *.dll +/docs/site/ diff --git a/.travis.yml b/.travis.yml index c0a092c..cfc1387 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,3 +13,4 @@ after_success: - julia -e 'cd(Pkg.dir("RNG")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' # push coverage results to Codecov - julia -e 'cd(Pkg.dir("RNG")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' + - julia -e 'cd(Pkg.dir("RNG")); Pkg.add("Documenter"); include(joinpath("docs", "make.jl"))' diff --git a/docs/.documenter.enc b/docs/.documenter.enc new file mode 100644 index 0000000..fbca45e Binary files /dev/null and b/docs/.documenter.enc differ diff --git a/docs/make.jl b/docs/make.jl index 76952bb..bb839aa 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,5 +1,9 @@ using Documenter, RNG -makedocs( - modules = [RNG] +makedocs() + +deploydocs( + deps = Deps.pip("mkdocs", "python-markdown-math", "mkdocs-material"), + repo = "github.com/sunoru/RNG.jl.git", + osname = "linux" ) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 9e23535..158e3f3 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -32,10 +32,10 @@ pages: - Manual: - Bases: man/bases.md - Benchmark: man/benchmark.md - - PCG: man/pcg.md - - MersenneTwisters: man/mersenne-twisters.md - - Random123: man/random123.md - - Xorshifts: man/xorshifts.md + - Permuted Congruential Generators: man/pcg.md + - Mersenne Twisters: man/mersenne-twisters.md + - Random123 Family: man/random123.md + - Xorshift Family: man/xorshifts.md - Library: - RNG: lib/rng.md - PCG: lib/pcg.md diff --git a/docs/src/lib/mersenne-twisters.md b/docs/src/lib/mersenne-twisters.md index f2d5205..f972425 100644 --- a/docs/src/lib/mersenne-twisters.md +++ b/docs/src/lib/mersenne-twisters.md @@ -1 +1 @@ -# Mersenne Twisters +# MersenneTwisters diff --git a/docs/src/lib/pcg.md b/docs/src/lib/pcg.md index d64163e..3aacbf8 100644 --- a/docs/src/lib/pcg.md +++ b/docs/src/lib/pcg.md @@ -1 +1 @@ -# Permuted Congruential Generators +# PCG diff --git a/docs/src/lib/rng.md b/docs/src/lib/rng.md index e69de29..35f24cc 100644 --- a/docs/src/lib/rng.md +++ b/docs/src/lib/rng.md @@ -0,0 +1 @@ +# RNG diff --git a/docs/src/man/bases.md b/docs/src/man/bases.md index 6db0af9..8559550 100644 --- a/docs/src/man/bases.md +++ b/docs/src/man/bases.md @@ -52,14 +52,13 @@ defined in `Base.Random` still work. The constructors of all the types of RNG are designed to take `seed` as their parameters, and can be called with no parameter. For example: -```julia +```jldoctest julia> using RNG.Xorshifts julia> r1 = Xorshift128Star(123) # Create a RNG of Xorshift128Star with the seed "123" RNG.Xorshifts.Xorshift128Star{UInt64}(0x000000003a300074,0x000000003a30004e,0x228e12c83a9b5ed6,false) -julia> r2 = Xorshift128Star() # Use a random value to be the seed. -RNG.Xorshifts.Xorshift128Star{UInt64}(0x784c0ed3d830bb42,0x4d268014e74d6e25,0x4ef0aea8ee776b31,false) +julia> r2 = Xorshift128Star(); # Use a random value to be the seed. julia> rand(r1) # Generate a number uniformly distributed in [0, 1). 0.12555060351645186 @@ -75,7 +74,7 @@ julia> rand!(r1, A) # Refill `A` with random numbers. 0xc0c5a8df4c1b160f 0x8b5269ed6c790e08 0x930b89985ae0c865 ``` -People will get the same results in their own computers of the above lines, except for the third one. For +People will get the same results in their own computers of the above lines. For more interfaces and usage examples, please refer to the manual pages of each RNG. diff --git a/docs/src/man/random123.md b/docs/src/man/random123.md index 6404447..a84bb31 100644 --- a/docs/src/man/random123.md +++ b/docs/src/man/random123.md @@ -1 +1 @@ -# Random123 +# Random123 Family diff --git a/docs/src/man/xorshifts.md b/docs/src/man/xorshifts.md index 6f47d8d..b8fab9c 100644 --- a/docs/src/man/xorshifts.md +++ b/docs/src/man/xorshifts.md @@ -1 +1 @@ -# Xorshifts +# Xorshift Family