public Hypergraph <T> Tr() { var H = new Hypergraph <T>(new List <List <T> >() { new List <T>() }); foreach (var e in E) { H = H.Product(EdgeHypergraph(e)).Min(); } return(H); }
public Hypergraph <T> Product(Hypergraph <T> other) { return(new Hypergraph <T>(E.SelectMany(e_i => other.E.Select(e_j => ListUtility.Union(e_i, e_j)).ToList()).ToList())); }
public Hypergraph <T> Union(Hypergraph <T> other) { return(new Hypergraph <T>(E.Union(other.E).ToList())); }