From 902a37af2b7811bfb9a08024312254e891e6d3b8 Mon Sep 17 00:00:00 2001 From: Andreas Noack Date: Sat, 15 Dec 2018 14:10:56 +0100 Subject: [PATCH] Add docs --- .gitignore | 2 ++ .travis.yml | 11 +++++++++++ README.md | 1 + docs/.gitignore | 2 ++ docs/Project.toml | 5 +++++ docs/make.jl | 15 +++++++++++++++ docs/src/index.md | 11 +++++++++++ src/svd.jl | 6 ++++++ 8 files changed, 53 insertions(+) create mode 100644 .gitignore create mode 100644 docs/.gitignore create mode 100644 docs/Project.toml create mode 100644 docs/make.jl create mode 100644 docs/src/index.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e3ea580 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +Manifest.toml +docs/build/ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index de1f443..9321ad6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,3 +14,14 @@ matrix: after_success: - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())'; + +jobs: + include: + - stage: "Documentation" + julia: 1.0 + os: linux + script: + - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); + Pkg.instantiate()' + - julia --project=docs/ docs/make.jl + after_success: skip diff --git a/README.md b/README.md index f74a2f2..192d449 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build Status](https://travis-ci.org/JuliaLinearAlgebra/GenericLinearAlgebra.jl.svg?branch=master)](https://travis-ci.org/JuliaLinearAlgebra/GenericLinearAlgebra.jl) [![Build Status](https://dev.azure.com/andreasnoack/GenericLinearAlgebra/_apis/build/status/andreasnoack.GenericLinearAlgebra.jl?branchName=master)](https://dev.azure.com/andreasnoack/GenericLinearAlgebra/_build/latest?definitionId=2) [![Coverage Status](https://coveralls.io/repos/github/JuliaLinearAlgebra/GenericLinearAlgebra.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/JuliaLinearAlgebra/GenericLinearAlgebra.jl?branch=master) +[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaLinearAlgebra.github.io/GenericLinearAlgebra.jl/stable) ### A fresh approach to numerical linear algebra in Julia diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..a303fff --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +build/ +site/ diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..ce87d15 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,5 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" + +[compat] +Documenter = "~0.21" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..a6d4e82 --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,15 @@ +using Documenter +using GenericLinearAlgebra + +makedocs( + sitename = "GenericLinearAlgebra", + format = Documenter.HTML(), + modules = [GenericLinearAlgebra] +) + +# Documenter can also automatically deploy documentation to gh-pages. +# See "Hosting Documentation" and deploydocs() in the Documenter manual +# for more information. +deploydocs( + repo = "https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl.git" +) diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..96e1d65 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,11 @@ +# GenericLinearAlgebra.jl + +Documentation for GenericLinearAlgebra.jl + +```@meta +CurrentModule = GenericLinearAlgebra +``` + +```@docs +svd! +``` diff --git a/src/svd.jl b/src/svd.jl index bcc8d33..c82f3c4 100644 --- a/src/svd.jl +++ b/src/svd.jl @@ -434,6 +434,12 @@ end # FixMe! The full keyword is redundant for Bidiagonal and should be removed from Base LinearAlgebra.svd!(B::Bidiagonal{T}; tol = eps(T), full = false, debug = false) where T<:Real = _svd!(B, tol = tol, debug = debug) + +""" + svd! + +A generic SVD implementation. +""" function LinearAlgebra.svd!(A::StridedMatrix{T}; tol = eps(real(eltype(A))), full = false, debug = false) where T m, n = size(A)