Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
✋ start to work on #147
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisot committed Oct 16, 2019
1 parent f674f7c commit 6e58858
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 22 deletions.
46 changes: 28 additions & 18 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,20 @@ version = "0.7.0"

[[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 = "84aa74986c5b9b898b0d1acaf3258741ee64754f"
git-tree-sha1 = "ed2c4abadf84c53d9e58510b5fc48912c2336fbb"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "2.1.0"
version = "2.2.0"

[[DataAPI]]
git-tree-sha1 = "674b67f344687a88310213ddfa8a2b3c76cc4252"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.1.0"

[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "0809951a1774dc724da22d26e4289bbaab77809a"
git-tree-sha1 = "f94423c68f2e47db0d6f626a26d4872266e0ec3d"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.17.0"
version = "0.17.2"

[[Dates]]
deps = ["Printf"]
Expand All @@ -53,9 +58,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[Distributions]]
deps = ["LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"]
git-tree-sha1 = "2f25cc24d4370d9395344a0b8cf7e8d98407c650"
git-tree-sha1 = "b419fcf95ef9c8cf4d6610cd323890ad66d64240"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.21.0"
version = "0.21.3"

[[InteractiveUtils]]
deps = ["Markdown"]
Expand All @@ -79,10 +84,10 @@ deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[Missings]]
deps = ["SparseArrays", "Test"]
git-tree-sha1 = "f0719736664b4358aa9ec173077d4285775f8007"
deps = ["DataAPI"]
git-tree-sha1 = "de0a5ce9e5289f27df672ffabef4d1e5861247d5"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "0.4.1"
version = "0.4.3"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
Expand All @@ -95,19 +100,19 @@ version = "1.1.0"

[[PDMats]]
deps = ["Arpack", "LinearAlgebra", "SparseArrays", "SuiteSparse", "Test"]
git-tree-sha1 = "8b68513175b2dc4023a564cb0e917ce90e74fd69"
git-tree-sha1 = "035f8d60ba2a22cb1d2580b1e0e5ce0cb05e4563"
uuid = "90014a1f-27ba-587c-ab20-58faa44d9150"
version = "0.9.7"
version = "0.9.10"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Polynomials]]
deps = ["LinearAlgebra", "SparseArrays", "Test"]
git-tree-sha1 = "62142bd65d3f8aeb2226ec64dd8493349147df94"
deps = ["LinearAlgebra", "RecipesBase"]
git-tree-sha1 = "f7c0c07e82798aef542d60a6e6e85e39f4590750"
uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
version = "0.5.2"
version = "0.5.3"

[[Printf]]
deps = ["Unicode"]
Expand All @@ -127,6 +132,11 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[RecipesBase]]
git-tree-sha1 = "7bdce29bc9b2f5660a6e5e64d64d91ec941f6aa2"
uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
version = "0.7.0"

[[Requires]]
deps = ["Test"]
git-tree-sha1 = "f6fbf4ba64d295e146e49e021207993b6b48c7d1"
Expand Down Expand Up @@ -173,10 +183,10 @@ deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[StatsBase]]
deps = ["DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics"]
git-tree-sha1 = "2b6ca97be7ddfad5d9f16a13fe277d29f3d11c23"
deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics"]
git-tree-sha1 = "c53e809e63fe5cf5de13632090bc3520649c9950"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.31.0"
version = "0.32.0"

[[StatsFuns]]
deps = ["Rmath", "SpecialFunctions", "Test"]
Expand All @@ -185,7 +195,7 @@ uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
version = "0.8.0"

[[SuiteSparse]]
deps = ["Libdl", "LinearAlgebra", "SparseArrays"]
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"

[[Test]]
Expand Down
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name = "EcologicalNetworks"
uuid = "f03a62fe-f8ab-5b77-a061-bb599b765229"
repo = "https://github.com/PoisotLab/EcologicalNetworks.jl"
authors = ["Timothée Poisot <[email protected]>"]
repo = "https://github.com/PoisotLab/EcologicalNetworks.jl"
version = "0.2.1"

[compat]
julia = "1"

[deps]
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand All @@ -18,6 +15,9 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[compat]
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

Expand Down
8 changes: 8 additions & 0 deletions src/community/spectralradius.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function ρ(N::T; range::Bool=true) where {T <: AbstractUnipartiteNetwork}
@assert minimum(N.A) zero(eltype(N.A))

end

function ρ(N::T; varargs...) where {T <: AbstractBipartiteNetwork}
return ρ(convert(AbstractUnipartiteNetwork, N); varargs...)
end

0 comments on commit 6e58858

Please sign in to comment.