According to the definition of the 2-section of a hypergraph, defined in:
Alain Bretto. 2013. Hypergraph Theory: An Introduction. Springer Publishing Company, Incorporated (page 25),
we have implemented a 2-section view of H following the structure of the BipartiteView.
In particular:
the function LightGraphs.all_neighbors(t::TwoSectionView, v::Integer)
returns N(v)\{v};
returns an Array{Int64} for compatibility with the BipartiteView (thus performing a conversion from Set to Array).
According to the 2-section definition, function LightGraphs.SimpleGraph(t::TwoSectionView) does not add any self-loop. This means that if a hyperedge contains a single vertex, this information is lost in the 2-section view. How should we manage this situation?
As a general comment it would be good in the whole project we use @inferred macro in tests to check if we have type-stability of the return values of the methods we define.
According to the definition of the 2-section of a hypergraph, defined in: Alain Bretto. 2013. Hypergraph Theory: An Introduction. Springer Publishing Company, Incorporated (page 25),
we have implemented a 2-section view of H following the structure of the BipartiteView.
In particular: