Skip to content

Commit

Permalink
docs corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
pszufe committed May 8, 2020
1 parent e8be392 commit 634b0da
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
11 changes: 8 additions & 3 deletions docs/src/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Creating a hypergraph

```@docs
Hypergraph
random_model(::Int, ::Int)
random_kuniform_model(::Int, ::Int, ::Int)
random_dregular_model(::Int, ::Int, ::Int)
random_preferential_model
```

Manipulating vertices and hyperedges
Expand All @@ -26,6 +30,7 @@ get_vertex_meta(::Hypergraph{T, V, E}, ::Int) where {T <: Real, V, E}
set_hyperedge_meta!(::Hypergraph{T, V, E}, ::Union{E,Nothing}, ::Int) where {T <: Real, V, E}
get_hyperedge_meta(::Hypergraph{T, V, E}, ::Int) where {T <: Real, V, E}
remove_vertex!(::Hypergraph, ::Int)
remove_hyperedge!(::Hypergraph, ::Int)
```

Hypergraph array getters and setters
Expand Down Expand Up @@ -77,11 +82,11 @@ gethyperedges(::Hypergraph, ::Int)
get_connected_components(::Hypergraph)
conductance(::Hypergraph, ::Set{Int})
modularity(::Hypergraph, ::Vector{Set{Int}}, ::SimpleHypergraphs.HypergraphAggs)
random_walk(::Hypergraph, ::Int; heselect::Function, vselect::Function)
get_twosection_adjacency_mx
random_walk(::Hypergraph, ::Int; ::Function, ::Function)
modularity(::Hypergraph, ::Vector{Set{Int}}, ::SimpleHypergraphs.HypergraphAggs)
SimpleHypergraphs.HypergraphAggs
randompartition(::Int64,::Int64)
Expand Down
1 change: 0 additions & 1 deletion src/conductance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ For more information see `1. Introduction` at:
Generalizing the Hypergraph Laplacian via a Diffusion Processwith Mediators,
auhtors: T-H. Hubert Chan, Xhibin Liang.
"""

function conductance(h::Hypergraph, subset::Set{Int})::Float64
if isempty(subset) error("`subset` is not allowed empty.") end
if subset == Set(1:nhv(h)) error("`subset` is not allowed true subset of `h`.") end
Expand Down
7 changes: 0 additions & 7 deletions src/hypergraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ If a vertex does not belong to a hyperedge `nothing` is returned.
get(h.v2he[idx[1]], idx[2], nothing)
end

@inline function Base.pop!(d::SortedDict,key::Int,::Nothing)
if haskey(d,key)
return pop!(d,key)
else
return nothing
end
end

"""
Base.setindex!(h::Hypergraph, ::Nothing, idx::Vararg{Int,2})
Expand Down
6 changes: 3 additions & 3 deletions src/models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


"""
random_model(nVertices, nEdges)
random_model(nVertices::Int, nEdges::Int)
Generate a *random* hypergraph without any structural constraints.
Expand Down Expand Up @@ -39,7 +39,7 @@ end


"""
random_kuniform_model(nVertices, nEdges, k)
random_kuniform_model(nVertices::Int, nEdges::Int, k::Int)
Generates a *k*-uniform hypergraph, i.e. an hypergraph where each hyperedge has size *k*.
Expand All @@ -57,7 +57,7 @@ end


"""
random_dregular_model(nVertices, nEdges, d)
random_dregular_model(nVertices::Int, nEdges::Int, d::Int)
Generates a *d*-regular hypergraph, where each node has degree *d*.
Expand Down
2 changes: 1 addition & 1 deletion src/twosection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ LightGraphs.zero(::Type{TwoSectionView{T}}) where T = TwoSectionView(Hypergraph{
get_twosection_adjacency_mx(h::Hypergraph{T,V,E}; count_self_loops::Bool=false,
replace_weights::Union{Nothing,Real}=nothing ) where {T<:Real, V, E}
Returns an adjacency matrix for a two section view of a hypergraph `h`.
Returns an adjacency matrix for a two section view of a hypergraph `h`.
"""
function get_twosection_adjacency_mx(h::Hypergraph{T,V,E}; count_self_loops::Bool=false,
replace_weights::Union{Nothing,Real}=nothing ) where {T<:Real, V, E}
Expand Down

2 comments on commit 634b0da

@pszufe
Copy link
Owner Author

@pszufe pszufe commented on 634b0da May 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/14436

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.10 -m "<description of version>" 634b0da31e94fd9ba45a16203b125af977ab0e23
git push origin v0.1.10

Please sign in to comment.