pszufe / SimpleHypergraphs.jl

A simple hypergraphs package for the Julia programming language
MIT License
74 stars 12 forks source link

Weight transformation function for 2-section view #15

Open pszufe opened 5 years ago

pszufe commented 5 years ago

Provide a weight transformation function in TwoSectionView constructor.

struct TwoSectionView{T<:Real} <: AbstractGraph{Int}
    h::Hypergraph{T}
    f::Function
end

We need to discuss/check

bkamins commented 5 years ago

This probably will be more efficient:

struct TwoSectionView{T<:Real, F<:Union{Function, Type}} <: AbstractGraph{Int}
    h::Hypergraph{T}
    f::F
end