diff --git a/Manifest.toml b/Manifest.toml index 2df7ec7..dcef4a6 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,90 +1,5 @@ # This file is machine-generated - editing it directly is not advised -[[Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[BinaryProvider]] -deps = ["Compat", "CredentialsHandler", "Libdl", "Pkg", "SHA", "TOML", "Test"] -uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" - -[[ColorTypes]] -deps = ["FixedPointNumbers", "Random", "Test"] -git-tree-sha1 = "f73b0e10f2a5756de7019818a41654686da06b09" -uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.7.5" - -[[Colors]] -deps = ["ColorTypes", "FixedPointNumbers", "InteractiveUtils", "Printf", "Reexport", "Test"] -git-tree-sha1 = "9f0a0210450acb91c730b730a994f8eef1d3d543" -uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.9.5" - -[[Compat]] -deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] -git-tree-sha1 = "49269e311ffe11ac5b334681d212329002a9832a" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "1.5.1" - -[[Contour]] -deps = ["LinearAlgebra", "StaticArrays", "Test"] -git-tree-sha1 = "b974e164358fea753ef853ce7bad97afec15bb80" -uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" -version = "0.5.1" - -[[CredentialsHandler]] -deps = ["Base64", "HTTP", "TOML"] -uuid = "864e158e-919d-11e8-198e-cfe890ec4681" - -[[DataStructures]] -deps = ["InteractiveUtils", "OrderedCollections", "Random", "Serialization", "Test"] -git-tree-sha1 = "ca971f03e146cf144a9e2f2ce59674f5bf0e8038" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.15.0" - -[[Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[DelimitedFiles]] -deps = ["Mmap"] -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" - -[[Distributed]] -deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" - -[[FixedPointNumbers]] -deps = ["Test"] -git-tree-sha1 = "b8045033701c3b10bf2324d7203404be7aef88ba" -uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.5.3" - -[[GR]] -deps = ["Base64", "DelimitedFiles", "LinearAlgebra", "Pkg", "Printf", "Random", "Serialization", "Sockets", "Test"] -git-tree-sha1 = "3c62c19ddf86ff016829fdac1663cd3c75558c34" -uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.37.0" - -[[HTTP]] -deps = ["Base64", "Dates", "Distributed", "IniFile", "MbedTLS", "Sockets", "Test"] -uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" - -[[IniFile]] -uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" - -[[InteractiveUtils]] -deps = ["LinearAlgebra", "Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[JSON]] -deps = ["Dates", "Distributed", "Mmap", "Sockets", "Test", "Unicode"] -git-tree-sha1 = "1f7a25b53ec67f5e9422f1f551ee216503f4a0fa" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.20.0" - -[[LibGit2]] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - [[Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -92,146 +7,17 @@ uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" deps = ["Libdl"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -[[Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[MbedTLS]] -deps = ["BinaryProvider", "Dates", "Libdl", "Pkg", "Random", "Sockets"] -uuid = "739be429-bea8-5141-9913-cc70e7f3736d" - -[[Measures]] -deps = ["Test"] -git-tree-sha1 = "ddfd6d13e330beacdde2c80de27c1c671945e7d9" -uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" -version = "0.3.0" - -[[Missings]] -deps = ["Dates", "InteractiveUtils", "SparseArrays", "Test"] -git-tree-sha1 = "d1d2585677f2bd93a97cfeb8faa7a0de0f982042" -uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "0.4.0" - -[[Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" - -[[NaNMath]] -deps = ["Compat"] -git-tree-sha1 = "ce3b85e484a5d4c71dd5316215069311135fa9f2" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "0.3.2" - -[[OrderedCollections]] -deps = ["Random", "Serialization", "Test"] -git-tree-sha1 = "85619a3f3e17bb4761fe1b1fd47f0e979f964d5b" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.0.2" - -[[Pkg]] -deps = ["BinaryProvider", "CredentialsHandler", "Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "TOML", "UUIDs"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" - -[[PlotThemes]] -deps = ["PlotUtils", "Requires", "Test"] -git-tree-sha1 = "f3afd2d58e1f6ac9be2cea46e4a9083ccc1d990b" -uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" -version = "0.3.0" - -[[PlotUtils]] -deps = ["Colors", "Dates", "Printf", "Random", "Reexport", "Test"] -git-tree-sha1 = "fd28f30a294a38ec847de95d8ac7ac916ccd7c06" -uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" -version = "0.5.5" - -[[Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - [[Random]] deps = ["Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -[[RecipesBase]] -deps = ["Random", "Test"] -git-tree-sha1 = "0b3cb370ee4dc00f47f1193101600949f3dcf884" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "0.6.0" - -[[Reexport]] -deps = ["Pkg"] -git-tree-sha1 = "7b1d07f411bc8ddb7977ec7f377b97b158514fe0" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "0.2.0" - -[[Requires]] -deps = ["Test"] -git-tree-sha1 = "f6fbf4ba64d295e146e49e021207993b6b48c7d1" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "0.5.2" - -[[SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" - [[Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" - -[[Showoff]] -deps = ["Compat"] -git-tree-sha1 = "276b24f3ace98bec911be7ff2928d497dc759085" -uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" -version = "0.2.1" - -[[Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[SortingAlgorithms]] -deps = ["DataStructures", "Random", "Test"] -git-tree-sha1 = "03f5898c9959f8115e30bc7226ada7d0df554ddd" -uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "0.3.1" - [[SparseArrays]] deps = ["LinearAlgebra", "Random"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -[[StaticArrays]] -deps = ["InteractiveUtils", "LinearAlgebra", "Random", "Statistics", "Test"] -git-tree-sha1 = "1eb114d6e23a817cd3e99abc3226190876d7c898" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "0.10.2" - [[Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[StatsBase]] -deps = ["DataStructures", "DelimitedFiles", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "Test"] -git-tree-sha1 = "7b596062316c7d846b67bf625d5963a832528598" -uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.27.0" - -[[TOML]] -deps = ["Dates"] -uuid = "9d418dce-91a8-11e8-0173-7b01a971d501" - -[[Test]] -deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[UUIDs]] -deps = ["Random"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" diff --git a/Project.toml b/Project.toml index 36c1825..e78b1ba 100644 --- a/Project.toml +++ b/Project.toml @@ -1,11 +1,11 @@ name = "PosDefManifold" uuid = "f45a3650-5c51-11e9-1e9a-133aa5e309cf" authors = ["congedom "] -version = "0.4.0" - -[compat] -julia = "1.3" +version = "0.4.1" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[compat] +julia = "1.1, 1.2, 1.3" diff --git a/docs/Manifest.toml b/docs/Manifest.toml index b29260b..0e4b168 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -3,65 +3,42 @@ [[Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -[[BinaryProvider]] -deps = ["Compat", "CredentialsHandler", "Libdl", "Pkg", "SHA", "TOML", "Test"] -uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" - -[[Compat]] -deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"] -git-tree-sha1 = "49269e311ffe11ac5b334681d212329002a9832a" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "1.5.1" - -[[CredentialsHandler]] -deps = ["Base64", "HTTP", "TOML"] -uuid = "864e158e-919d-11e8-198e-cfe890ec4681" - [[Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -[[DelimitedFiles]] -deps = ["Mmap"] -uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" - [[Distributed]] -deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"] +deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[DocStringExtensions]] deps = ["LibGit2", "Markdown", "Pkg", "Test"] -git-tree-sha1 = "1df01539a1c952cef21f2d2d1c092c2bcf0177d7" +git-tree-sha1 = "88bb0edb352b16608036faadcc071adda068582a" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.6.0" +version = "0.8.1" [[Documenter]] -deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "LibGit2", "Logging", "Markdown", "Pkg", "REPL", "Random", "Test", "Unicode"] -git-tree-sha1 = "de745be4b00336588ab3269d5f43517e5c012973" +deps = ["Base64", "Dates", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"] +git-tree-sha1 = "0be9bf63e854a2408c2ecd3c600d68d4d87d8a73" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "0.21.1" - -[[HTTP]] -deps = ["Base64", "Dates", "Distributed", "IniFile", "MbedTLS", "Sockets", "Test"] -uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" - -[[IniFile]] -uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" +version = "0.24.2" [[InteractiveUtils]] -deps = ["LinearAlgebra", "Markdown"] +deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +[[JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.0" + [[LibGit2]] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" [[Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -[[LinearAlgebra]] -deps = ["Libdl"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - [[Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -69,15 +46,17 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -[[MbedTLS]] -deps = ["BinaryProvider", "Dates", "Libdl", "Pkg", "Random", "Sockets"] -uuid = "739be429-bea8-5141-9913-cc70e7f3736d" - [[Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +[[Parsers]] +deps = ["Dates", "Test"] +git-tree-sha1 = "0139ba59ce9bc680e2925aec5b7db79065d60556" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "0.3.10" + [[Pkg]] -deps = ["BinaryProvider", "CredentialsHandler", "Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "TOML", "UUIDs"] +deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" [[Printf]] @@ -98,31 +77,15 @@ uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" [[Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" - [[Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -[[SparseArrays]] -deps = ["LinearAlgebra", "Random"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[TOML]] -deps = ["Dates"] -uuid = "9d418dce-91a8-11e8-0173-7b01a971d501" - [[Test]] deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[UUIDs]] -deps = ["Random"] +deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" [[Unicode]] diff --git a/docs/Project.toml b/docs/Project.toml index 3471378..86fdb26 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,10 +1,8 @@ authors = ["congedom "] -version = "0.4.0" +version = "0.4.1" [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -#[compat] -#Documenter = "~0.23" +[compat] +Documenter = "~0.24" diff --git a/src/LOCAL_BUILD.jl b/src/LOCAL_BUILD.jl index 4b2f7d1..1d82359 100644 --- a/src/LOCAL_BUILD.jl +++ b/src/LOCAL_BUILD.jl @@ -29,7 +29,7 @@ begin push!(LOAD_PATH, srcDir) - using Documenter, LinearAlgebra, Statistics, Base.Threads, + using Documenter, LinearAlgebra, Statistics, Revise, PosDefManifold # add other local moduls to be used, e.g., diff --git a/src/PosDefManifold.jl b/src/PosDefManifold.jl index 29ebf3c..3cb0676 100644 --- a/src/PosDefManifold.jl +++ b/src/PosDefManifold.jl @@ -1,5 +1,5 @@ # Main Module of the PosDefManifold Package for julia language -# v 0.4.0 - last update 3rd of December 2019 +# v 0.4.1 - last update 11th of December 2019 # # MIT License # Copyright (c) 2019, Marco Congedo, CNRS, Grenobe, France: diff --git a/src/linearAlgebra.jl b/src/linearAlgebra.jl index a962cd4..d3433d7 100644 --- a/src/linearAlgebra.jl +++ b/src/linearAlgebra.jl @@ -1,5 +1,4 @@ # Unit linearAlgebra.jl, part of PosDefManifold Package for julia language -# v 0.4.0 - last update 3rd of December 2019 # # MIT License # Copyright (c) 2019, Marco Congedo, CNRS, Grenobe, France: @@ -1351,7 +1350,7 @@ function spectralFunctions(P::ℍ{T}, func::Function) where T<:RealOrComplex F = eigen(P) ispos(F.values, msg="function "*string(func)*": at least one eigenvalue is smaller than the default tolerance") # optimize by computing only the upper trinagular part - return ℍ(F.vectors * 𝔻(func.(F.values)) * F.vectors') + return ℍ((F.vectors * 𝔻(func.(F.values))) * F.vectors') end spectralFunctions(D::𝔻{T}, func::Function) where T<:Real = fDiag(func, D) @@ -1394,7 +1393,7 @@ function pow(P::ℍ{T}, args...) where T<:RealOrComplex # several arguments (Ξ›, U) = evd(P) ispos(Ξ›, msg="function pow: at least one eigenvalue is smaller than the default tolerance") # optimize by computing only the upper trinagular part - return (ℍ(U * Ξ›^p * U') for p in args) + return (ℍ((U * Ξ›^p) * U') for p in args) end function pow(D::𝔻{T}, args...) where T<:Real # several arguments diff --git a/src/riemannianGeometry.jl b/src/riemannianGeometry.jl index 8f5d38e..698d986 100644 --- a/src/riemannianGeometry.jl +++ b/src/riemannianGeometry.jl @@ -1,5 +1,4 @@ # Unit riemannianGeometry.jl, part of PosDefManifold Package for julia language -# v 0.4.0 - last update 3rd of December 2019 # # MIT License # Copyright (c) 2019, Marco Congedo, CNRS, Grenobe, France: @@ -1144,7 +1143,15 @@ spEmb=spectralEmbedding @benchmark(mean(logEuclidean, Pset)) # multi-threaded """ -mean(metric::Metric, P::ℍ{T}, Q::ℍ{T}) where T<:RealOrComplex = geodesic(metric, P, Q, 0.5) +mean(metric::Metric, P::ℍ{T}, Q::ℍ{T}) where T<:RealOrComplex = + if metric==Fisher && size(P, 1)>=120 #(faster proc: Congedo et al., 2005) + Ξ», B=eigen(P, Q) # the eigenvalues of Q are all 1.0 after diagonalization + A=(Diagonal(Ξ»))^(0.25)*inv(B) + return ℍ(A'*A) + else + return geodesic(metric, P, Q, 0.5) + end + mean(metric::Metric, D::𝔻{T}, E::𝔻{T}) where T<:Real = geodesic(metric, D, E, 0.5) function mean(metric::Metric, 𝐏::ℍVector; diff --git a/src/signalProcessing.jl b/src/signalProcessing.jl index 791cf45..419383e 100644 --- a/src/signalProcessing.jl +++ b/src/signalProcessing.jl @@ -1,5 +1,4 @@ # Unit signalProcessing.jl, part of PosDefManifold Package for julia language -# v 0.4.0 - last update 3rd of December 2019 # # MIT License # Copyright (c) 2019, Marco Congedo, CNRS, Grenobe, France: diff --git a/src/statistics.jl b/src/statistics.jl index 7a6372d..c375cec 100644 --- a/src/statistics.jl +++ b/src/statistics.jl @@ -1,5 +1,4 @@ # Unit statistics.jl, part of PosDefManifold Package for julia language -# v 0.4.0 - last update 3rd of December 2019 # # MIT License # Copyright (c) 2019, Marco Congedo, CNRS, Grenobe, France: diff --git a/src/test.jl b/src/test.jl index c45b381..0a71905 100644 --- a/src/test.jl +++ b/src/test.jl @@ -1,5 +1,4 @@ # Unit test.jl, part of PosDefManifold Package for julia language -# v 0.4.0 - last update 3rd of December 2019 # # MIT License # Copyright (c) 2019, Marco Congedo, CNRS, Grenobe, France: