SimpleHypergraphs.jl icon indicating copy to clipboard operation
SimpleHypergraphs.jl copied to clipboard

Weight transformation function for 2-section view

Open pszufe opened this issue 6 years ago • 1 comments

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

  • what is the default function to calculate weights
  • should the view behave like weighted/unweighted graph depending on the function
  • provide documentation on how to materialize the view (for some scenarios constantly pulling the view for the data and calling the function each time will be very inefficient)

pszufe avatar Feb 18 '19 14:02 pszufe

This probably will be more efficient:

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

bkamins avatar Feb 18 '19 15:02 bkamins