Skip to content

Commit

Permalink
Merge pull request #137 from Marco-Congedo/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Marco-Congedo committed Jan 2, 2021
2 parents eca2e94 + 557cf66 commit 5ae693c
Show file tree
Hide file tree
Showing 10 changed files with 1,115 additions and 946 deletions.
27 changes: 17 additions & 10 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,34 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "88bb0edb352b16608036faadcc071adda068582a"
git-tree-sha1 = "50ddf44c53698f5e784bbebb3f4b21c5807401b1"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.1"
version = "0.8.3"

[[Documenter]]
deps = ["Base64", "Dates", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "0be9bf63e854a2408c2ecd3c600d68d4d87d8a73"
deps = ["Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "a4875e0763112d6d017126f3944f4133abb342ae"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.24.2"
version = "0.25.5"

[[IOCapture]]
deps = ["Logging"]
git-tree-sha1 = "377252859f740c217b936cebcd918a44f9b53b59"
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
version = "0.1.1"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e"
git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.0"
version = "0.21.1"

[[LibGit2]]
deps = ["Printf"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
Expand All @@ -50,10 +57,10 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[Parsers]]
deps = ["Dates", "Test"]
git-tree-sha1 = "0139ba59ce9bc680e2925aec5b7db79065d60556"
deps = ["Dates"]
git-tree-sha1 = "50c9a9ed8c714945e01cd53a21007ed3865ed714"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "0.3.10"
version = "1.0.15"

[[Pkg]]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
Expand Down
4 changes: 2 additions & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
authors = ["Marco Congedo <marco.congedo@gmail.com>"]
version = "0.4.8"
version = "0.4.9"

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

[compat]
Documenter = "~0.24"
Documenter = "~0.25"
41 changes: 28 additions & 13 deletions docs/src/MainModule.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ All packages above are built-in julia packages.
### types

#### Metric::Enumerated type
```
```julia
@enum Metric begin
Euclidean =1
invEuclidean =2
Expand All @@ -67,10 +67,9 @@ end
Riemannian manipulations are defined for a given *metric* (see [metrics](@ref)).
An instance for this type is requested as an argument in many functions
contained in the [riemannianGeometry.jl](@ref) unit in order to specify
the metric.
the metric, for example:

```
## Example
```julia
# generate a 15x15 symmetric positive definite matrix
P=randP(15)
# distance from P to the identity matrix according to the logdet0 metric
Expand All @@ -85,15 +84,21 @@ end
and then pass `metric` as argument in all your computations,
*e.g.*, referring to the above example,

d=distance(metric, P).
```julia
d=distance(metric, P).
```

To know what is the current metric, you can get it as a string using:

s=string(metric)
```julia
s=string(metric)
```

To see the list of metrics in type `Metric` use:

instances(Metric)
```julia
instances(Metric)
```

#### Array of Matrices types

Expand Down Expand Up @@ -312,22 +317,30 @@ To see the list of metrics in type `Metric` use:

- Typecasting `Adjoint` matrices:

```Matrix(X')```
```julia
Matrix(X')
```

- here is how to get an `Hermitian` matrix out of the diagonal part of an `Hermitian` matrix H:

```Hermitian(Matrix(Diagonal(H)))```
```julia
Hermitian(Matrix(Diagonal(H)))
```

- here is how to get a `LowerTriangular` matrix out of an `Hermitian` matrix H:

```LowerTriangular(Matrix(H))```
```julia
LowerTriangular(Matrix(H))
```

For example, you can use this to pass a full inter-distance matrix to the [`laplacian`](@ref) function to obtain the Laplacian matrix.

A useful function is [`typeofMatrix`](@ref). For example, the following line
typecasts matrix `M` to the type of matrix `P` and put the result in `A`:

A=typeofMatrix(P)(M)
```julia
A=typeofMatrix(P)(M)
```

#### Threads
Some functions in **PosDefManifold** explicitly call BLAS routines
Expand All @@ -336,8 +349,10 @@ concerned functions. Most functions calls BLAS routine implicitly
via Julia. You can set the number of threads
the BLAS library should use by:

using LinearAlgebra
BLAS.set_num_threads(n)
```julia
using LinearAlgebra
BLAS.set_num_threads(n)
```

where `n` is the number of threads.
By default, **PosDefManifold** reserves to BLAS
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To obtain the latest development version execute instead
## About the Author

[Marco Congedo](https://sites.google.com/site/marcocongedo) is
a research scientist of CNRS (Centre National de la Recherche Scientifique),
a Research Director of CNRS (Centre National de la Recherche Scientifique),
working in Grenoble, France.


Expand Down
3 changes: 1 addition & 2 deletions src/PosDefManifold.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Main Module of the PosDefManifold Package for julia language
# v0.4.8 last update 9th of April 2020

# MIT License
# Copyright (c) 2019, Marco Congedo, CNRS, Grenobe, France:
# Copyright (c) 2019-21, Marco Congedo, CNRS, Grenobe, France:
# https://sites.google.com/site/marcocongedo/home

# __precompile__()
Expand Down
Loading

0 comments on commit 5ae693c

Please sign in to comment.